Chinese Remainder Theorem and Cards - Numberphile

Поділитися
Вставка
  • Опубліковано 26 лис 2024

КОМЕНТАРІ • 400

  • @numberphile
    @numberphile  6 років тому +65

    Numberphile Playing Cards: bit.ly/NumberphileCards
    More card videos: bit.ly/Cards_Shuffling

    • @X_Baron
      @X_Baron 6 років тому

      What's the back of the cards like? The ones on the video have non-symmetrical backs, meaning they are cheaters' cards.

    • @jamescolovos
      @jamescolovos 6 років тому

      In this video, it looks something like the Penrose tiling

    • @htmlguy88
      @htmlguy88 5 років тому

      the number you want for 10 cards is 2519 lol

  • @MrJ3
    @MrJ3 6 років тому +1060

    Tadashi has the most soothing voice.

  • @conoroneill8067
    @conoroneill8067 6 років тому +330

    For those wondering, here is the smallest word length needed for a certain number of cards:
    2 cards: 1
    3 cards: 5
    4 cards: 11
    5 cards: 59
    6 cards: 59
    7 cards: 419
    8 cards: 839
    9 cards: 2519
    10 cards: 2519
    In general, it must be the LCM(2,3,4,...,m)-1 where m is the number of cards.
    So, while Tadashi is right that it's theoretically possible to get a word length that's the appropriate length for this trick to work, it doesn't work so well in practice for longer than four letters.

    • @knightriderultimate
      @knightriderultimate 6 років тому +18

      Conor O'Neill you could use a sentence/phrase instead of a word for 5 and 6 though.

    • @garmo1968
      @garmo1968 6 років тому +14

      with a bit of fiddling with the mathamatics behind LCM i started calcluating by hand farther up the table. the largest stagnant part so far is 32, 33, 34, 35, 36 all having a value of 144,403,552,893,600 (minus one). the answer for 52 is over 3 sextillion

    • @diribigal
      @diribigal 6 років тому +31

      So for 5 or 6 cards I could use "This may be really tedious but it will soon turn out to have been worth it"

    • @karlmuster263
      @karlmuster263 6 років тому +18

      For 7 cards, "America" + up to the end of the first paragraph of the Declaration of Independence.

    • @abcdefg54321x
      @abcdefg54321x 6 років тому

      Conor O'Neill You sure your last name isn’t Chang🤓 rather than O’Neill🍺?

  • @sirjohnnyg
    @sirjohnnyg 6 років тому +509

    Just a heads up if you want to try this trick on the masses: Abracadabra has 11 letters.

  • @Mortiis558
    @Mortiis558 6 років тому +402

    Tadashi is by far my favorite person on Numberphile! His videos are always fun and interesting and he is a great teacher.

    • @MagicDoorHinge
      @MagicDoorHinge 6 років тому +13

      Second favorite for me. Gotta love Cliff Stoll!

    • @dAGriddo
      @dAGriddo 6 років тому +8

      And don't forget about James Grime, Matt Parker, ... ;)

    • @pierregirardeau806
      @pierregirardeau806 6 років тому +6

      And Hannah Fry !

    • @NICHOLSON7777
      @NICHOLSON7777 6 років тому +3

      He is to Numberphile what Copeland is to 60 symbols for me. Can't help but like the guy.

    • @Bigpimping-by6yj
      @Bigpimping-by6yj 6 років тому +2

      Tom Michalak cliff is a legend

  • @LeoStaley
    @LeoStaley 6 років тому +54

    I really appreciate Professor Tadashi Tokieda's command of the English language. He speaks with more wit, clarity, and awareness in English than 99% of native English speakers that he meets. I hear him communicate so masterfully in English that my ear almost wants to start hearing his Japanese accent as the natural way to speak English.

    • @twwc960
      @twwc960 6 років тому +18

      According to his Wikipedia page, he speaks at least nine languages and he studied philology before turning to mathematics.

    • @LeoStaley
      @LeoStaley 6 років тому +4

      This is why I love him. He just jumped into my top 3 favorite scholars.

  • @pkeshish
    @pkeshish 6 років тому +89

    "You gotta do magic at some point" -- Dr. Tadashi

  • @YingwuUsagiri
    @YingwuUsagiri 6 років тому +44

    I learned this one with a story. You pick 4 Jacks, 4 Queens, 4 Kings and 4 Aces. You explain that there is a hotel with four rooms and that when the Jacks arrive they all get a room. Now the Queens arrive and they all get added to the Jacks, etc. etc. up to 4 Aces. During the night they start to visit eachother and argue and fight (gather the stacks clockwise and shuffling) and as long as you do not leave 1 card on the table or pick up 1 card the order will never ever change from what you need it to be to after shuffling say something along the lines of. OKAY! Now the manager of the hotel is sick and tired of the arguing and will re-order the people into the rooms. If you now take off the top card and go into 4 piles again you end up with 4 neat piles of All Jacks, All Queens, All Kings and All Aces.

  • @espenskeys
    @espenskeys 6 років тому +10

    Tadashi is one of my Numberphile favorites! He doesn't use confusing jargon to explain stuff. He gives it straight, so that you can understand these concepts intuitively!

  • @bonez565
    @bonez565 6 років тому +85

    Always love a video with Tadashi!

  • @user-me7hx8zf9y
    @user-me7hx8zf9y 6 років тому +42

    Tadashi is always correct

    • @hazenoki628
      @hazenoki628 6 років тому +4

      I got that!
      (at least with an extra i)

    • @shirou9790
      @shirou9790 6 років тому +7

      Well his given name is indeed 正 in Japanese, so the same kanji as in 正しい (tadashii)

  • @TheRedfire21
    @TheRedfire21 6 років тому +7

    i love tadashi videos i hope i can meet him in my life and tell him he's awesome

  • @nikhilpatel6214
    @nikhilpatel6214 6 років тому +3

    To find 11, you can also just take the LCM of 2, 3, and 4 and subtract 1. You know this'll be -1 mod all of them, b/c their LCM is mod 0 all of them. Similarly, you can take the LCM of 2, 3, 4, and 5 and subtract 1 to get 59, to get the smallest positive integer that is -1 (mod 2, 3, 4, and 5)

  • @Deguiko
    @Deguiko 6 років тому +1

    Tadashi had the best presentation in the whole ICM 2018!

  • @charlottedarroch
    @charlottedarroch 6 років тому +110

    You'd need a phrase with 2519 letters (that's the shortest) to get the trick to work with 10 cards.

    • @NestorAbad
      @NestorAbad 6 років тому +16

      That's right. And generally, if you want to do it with sets of m cards, the magic number is LCM(2,3,...,m)-1.

    • @charlottedarroch
      @charlottedarroch 6 років тому +12

      Right. And that grows at least as fast as 2^(m/log(m)) and at most as fast as m^(m/log(m)). The reason is that LCM(2,3,...,m) is the product of the highest power of each prime less than m. For example 2^3 < 10 < 2^4, so 2^3 divides LCM(2,3,...,10) and 3^2 < 10 < 3^3, so 3^2 divides LCM(2,3,...,10). The number of primes up to m grows like m/log(m) and each of these primes at least 2, hence the lower bound. The upper bound comes from the fact that the prime powers are at most m.

    • @shirou9790
      @shirou9790 6 років тому +10

      I would suggest you'd rather use consecutive words of a given sentence so that :
      The 1st word (10 cards) has length 9 (or 19, 29...)
      The 2nd word (9 cards) has length 8 (or 17, 26...)
      The 3rd word (8 cards) has length 7 (or 15, 23...)
      ...
      The 8th word (3 cards) has length 2 (or 5, 8...)
      The 9th word (2 cards) has length 1 (or 3, 5...)
      Well you still have to find such a sentence

    • @robin888official
      @robin888official 6 років тому +24

      Might work in German.

    • @sp10sn
      @sp10sn 3 роки тому +2

      "It was the best of times, it was the worst of times..."

  • @garmo1968
    @garmo1968 6 років тому +1

    i don't know how to evaluate a mod function, but i did manage to get to the answer anyway. the answer is the [least common multiple of 1, 2, 3, ..., M] minus one.
    so here's the table
    1 card needs 0 shuffles to match
    2 cards needs 1 shuffle to match
    3 cards needs 5 shuffles to match
    4 cards needs 11 shuffles to match
    5 cards needs 59 shuffles to match
    6 cards also needs 59 shuffles to match
    7 cards needs 419 shuffles to match
    8 cards needs 839 shuffles to match
    9 cards needs 2919 shuffles to match
    10 cards also needs 2919 shuffles to match
    this number explodes really rapidly. especially each time you reach and pass a prime number
    11 cards needs 27,719 shuffles
    12 cards also needs 27, 719 shuffles
    13 cards needs 360,359 shuffles
    14 cards also needs 360,359 shuffles
    15 cards also also needs 360,359 shuffles
    every time you reach a new power of a prime, the LCM jumps by a factor of that prime
    the next number of cards in this table would be 2^4 so 360,360 will double (raise by a factor of 2), and the number after that is 17^1 so it will go up by a factor of 17.
    16 cards needs 720,720 - 1
    17 cards needs 12,252,240 - 1
    it won't change until 19^1 where it will multiply by a factor of 19, and so on
    23^1 (23)
    5^2 (25)
    3^3 (27)
    29^1 (29)
    31^1 (31)
    2^5 (32)
    where we reach our longest stagnant break yet. 32, 33, 34, 35, 36 all share the same answer of 144,403,552,893,600... minus one shuffles needed.
    whelp we are in this for the long haul we better make our way to 52 and do the whole deck, we are almost there anyway
    37^1 (37)
    41^1 (41)
    43^1 (43)
    47^1 (47)
    7^2 (49)
    before finally reaching our answer that 49, 50, 51, and 52 (but not 53 because that's our next prime) requires a whopping 3 sextillion shuffles
    3,099,044,504,245,996,706,400 ... minus one

  • @aryanshshrivastava2650
    @aryanshshrivastava2650 6 років тому +3

    Tadashi is amazing. Keep doing videos with him!!!!

  • @e.s.f.8185
    @e.s.f.8185 6 років тому +1

    An easier way to do this trick is to ask the espectator a number from one to m (current number of cards) to shuffle from one pile. Then you choose a number from the other pile so that the sum of those numbers is k*m-1 (if there are 12 cards and the espectator chooses 11, you choose 12; if chooses 2, you choose 10).
    Also, I've calculated the lowest common number for each posssible number of cards:
    1 card -> 1
    2 cards -> 1
    3 cards -> 2
    4 cards -> 11
    5 cards -> 59
    6 cards -> 59
    7 cards -> 419
    8 cards -> 839
    9 cards -> 2 519
    10 cards -> 2 519
    11 cards -> 27 719
    12 cards -> 27 719
    13 cards -> 360 359

  • @zh84
    @zh84 6 років тому +80

    I think this would require a phrase of 59 characters to do it with a set of 5 cards; that is, 59 is the smallest number I can find which is equivalent to -1 mod 2, 3, 4 and 5.

    • @NestorAbad
      @NestorAbad 6 років тому +37

      That's right. And generally, if you want to do it with sets of m cards, the magic number is LCM(2,3,...,m)-1.

    • @andymcl92
      @andymcl92 6 років тому +19

      The general method (I think) is to work out the prime decomposition for each number, find the highest power for each prime, and then multiply those primes with those powers together, and take off 1. So for 6 cards, we have 2,3,2*2,5,2*3. The highest powers of 2, 3 and 5 in this sequence are 2, 1 and 1. So 2*2*3*5-1=59, which is the same as for 5 cards :)

    • @TheArmyofWin
      @TheArmyofWin 6 років тому +15

      We can verify that pretty easily. It must end with either 4 or 9 (-1 mod 5), But must be odd (-1 mod 2). That leaves us with 9, 19, 29, 39,... now for -1 mod 3 leaves us with every third on that list (9 is congruent to 0 mod 3, 19 = +1 mod 3, 29 is -1 mod 3), so the list becomes:
      29, 59, 89, 119,...
      Then we check for mod 4:
      +1, -1, +1, -1...
      And the first number that is -1 in mods 2 through 5 is indeed 59
      Edit: the smallest solution for 10 cards is 2519!

    • @bilonay
      @bilonay 6 років тому +5

      That's correct. To further generalize, the number of "shuffles" required would be LCM [m,m-1,m-2,...] - 1 so for 10 cards like suggested in the end of the video, you would need 2519 shuffles!!

    • @CacchiusMan
      @CacchiusMan 6 років тому +1

      zh84 29 should also work, because the solution is unique up to adding or subtracting multiples of 30 (30=5*3*2, the coprime numbers of the sistem). And in fact it works!
      29=25+4=30-1
      29=27+2=30-1
      29=28+1=30-1

  • @Ququestion
    @Ququestion 4 роки тому +1

    Tbh, this is the first video with Tadashi, that i didn't understood.
    Doesn't matter, was still fun.

  • @Scy
    @Scy 6 років тому +37

    I like how he explained the -1 mod m for about five minures and never mentioned the number 12, which is sort of the key.

  • @fizixx
    @fizixx 6 років тому +1

    I could listen to him talk all day!

  • @nayutaito9421
    @nayutaito9421 6 років тому +134

    Me trying to do it with 5 cards: Since there are 5 cards, we need to use a truly magic word.
    You: What is it?
    Me: pneumonoultramicroscopicsilicovolcanoconiosisologisticalize
    You: OMG

    • @TechnoHackerVid
      @TechnoHackerVid 6 років тому +11

      Use the full chemical name of the Titin protein. 180K letters

    • @CGoody564
      @CGoody564 6 років тому +2

      Is this correct? I always thought pneumonoultramicroscopicsilicovolcanoconiosis was the full word. Would logisticalization be the process in which it forms?

    • @TechnoHackerVid
      @TechnoHackerVid 6 років тому +1

      You can always twist long words. Not many bother to read :P

    • @nayutaito9421
      @nayutaito9421 6 років тому +1

      I just added random suffixes to the word, so it's not a real word (Of course you can guess the meaning easily).

    • @alexwang982
      @alexwang982 5 років тому +1

      Logisticalization, to make it a noun

  • @Qwerty-qx3ts
    @Qwerty-qx3ts 3 роки тому +3

    *Checks dictionary to see if there is a word with -1 letters*

  • @tibortresla
    @tibortresla 6 років тому +1

    Dr. Tadashi's videos never cease to amaze!

  • @mickeydee3464
    @mickeydee3464 5 років тому

    Tadashi teaches complex topics in a way that is so simple I am amazed he look like he would be the most confusing lesson of my life

  • @alswo9628
    @alswo9628 6 років тому +389

    I'm a simple man. I see Tadashi in the thumbnail, I click.

    • @faastex
      @faastex 6 років тому +5

      I'm a simpler man. I see a Numberphile video, I click.

    • @vka337
      @vka337 6 років тому +10

      Fastex I'm the simplest man. I see any video I click.

    • @hazenoki628
      @hazenoki628 6 років тому +2

      I was going to comment the same thing, but you beat me to it. He's great!

    • @Alpha-1-Omega
      @Alpha-1-Omega 6 років тому +1

      I'm even more simple. I start internet and I click.

    • @Pacvalham
      @Pacvalham 6 років тому +2

      I'm the most simple: I just click; that's it.

  • @wokeupinapanic
    @wokeupinapanic 6 років тому +5

    If you want to do this exact thing at home, a simple way to force 11 is to use the phrase “magic tricks” to get your 11 letters!

  • @UnkleRiceYo
    @UnkleRiceYo 3 роки тому +2

    I miss Tadashi

  • @ongemakkelijkegladjakker
    @ongemakkelijkegladjakker 6 років тому +1

    I could listen to Prof. Tokieda forever.

  • @Sam_on_YouTube
    @Sam_on_YouTube 6 років тому +23

    How many Math tricks and puzzles were NOT published by Martin Gardner. Probably a shorter list.

    • @andymcl92
      @andymcl92 6 років тому +1

      Try watching Scam School and you'll find that list will gradually shrink even further!

  • @raunaksarada
    @raunaksarada 6 років тому +1

    Look Who Is Back
    My fav Tadashi is back😍

  • @PhilerinoBTW
    @PhilerinoBTW 6 років тому +17

    A Tadashi video?
    feelsgoodman

  • @alephnull4044
    @alephnull4044 5 років тому +2

    I just saw this guy's Wikipedia page and can confirm he is an all-round genius.

  • @ZieWeaver
    @ZieWeaver 6 років тому +2

    I remember reading about Chinese Remainder Theorem in the number theory book one of my professors gave me. It's cool to see a practical application ^.^

  • @badrunna-im
    @badrunna-im 6 років тому

    Another way of visualising why the trick works is to superpose the two cycles (with one flipped) and go clockwise or counterclockwise for right and left. If you shuffle right m times (or any multiple of m) you end up at the starting point, but 1 less and you end up at the same point that left starts at and vice versa. With a constant sum, the variation of l and r just shifts the end point around the clock.

  • @davidt01
    @davidt01 Рік тому +1

    The fact that I guessed each shuffle on the first round before you picked it proves humans are terrible at randomness.

  • @lebumbcrack7248
    @lebumbcrack7248 6 років тому +3

    Tadashi once again with the goods!!

  • @timothymckane6362
    @timothymckane6362 6 років тому +1

    You're a wizard, Tadashi!

  • @jeromelee428
    @jeromelee428 6 років тому +8

    Or you can just use Lowest Common Multiple(for 1,2,3 and 4 in this case) - 1

    • @samus88
      @samus88 6 років тому +1

      Yeah, I have no idea what "mod" is, but I gathered from the video that 11 + 1 is definitely 12, and it's divisible by 4, 3, 2 and 1.

  • @kblakeney09
    @kblakeney09 6 років тому +2

    "Luck comes to the deserving" -Tadashi

  • @nymalous3428
    @nymalous3428 6 років тому +21

    I wonder if you could somehow get three (or more) piles to do the same thing. You would probably have to change the rules a bit...

    • @bestserg
      @bestserg 6 років тому +9

      The main thing here that you shuffle two sets in different order. If you have 3 or more, two of them would be shuffled in the same order, so you always have to shuffle them the same number of times (or with some constant difference) and these sets would be dependent on each other. In case of two sets you can solve these equations l+r=x (mod m) and l+1=m-r (mod m) and solution is -1.

    • @raydarable
      @raydarable 6 років тому +1

      Another problem would be that the person you're doing the trick on may only want to shuffle one deck.

  • @venkatbabu186
    @venkatbabu186 4 роки тому

    Whether numbers or equations or vectors or matrix etc division gives sometimes reminder. The left outs of filling called gaps. Gaps are usually prime. So division is process of opposite time patterns. When you hit a drum with sand piles the pattern is a division patterns. So spin angles are called time. It can be relative to each other. What is distance. Prime variations of angle.

  • @CarterColeisInfamous
    @CarterColeisInfamous 6 років тому +1

    3:10 cyclic order is preserved when doing straight cuts

  • @menachemsalomon
    @menachemsalomon 6 років тому +4

    Tadashi mentioning the Chinese Remainder Theorem was the answer to a question I've had for about 20 years. A friend introduced me to the 3/5/7 version in a 15th century Hebrew book, and we worked out why it worked, and the significance of multiplying the remainders by 70, 21, and 15, respectively.
    I wrote a small program (in QBasic) to figure out the multipliers for other sets of numbers. However, I had no idea what the source of this "trick" was, its purpose, uses, or popularity.
    Now I know it's (literally) the textbook case of the Chinese Remainder Theorem. Perhaps a video on this specific topic would be of interest to others, as well.

  • @andrewleblanc2070
    @andrewleblanc2070 6 років тому +58

    Luck only comes to the deserving. 😊

    • @guest_informant
      @guest_informant 6 років тому +9

      Alternatively:
      _The rain it raineth on the just_
      _And also on the unjust fella;_
      _But chiefly on the just, because_
      _The unjust hath the just’s umbrella._

    • @diwakarism
      @diwakarism 6 років тому +2

      There's Mathematics for less-deserving.

  • @ZipplyZane
    @ZipplyZane 6 років тому

    Seems to me that the easiest way to get that number is to get the least common multiple of those numbers and subtract one.
    So, for 5 cards, it would be LCM(2,3,4,5) - 1= (2^2*3*5) - 1 = 59
    6 cards: LCM(2,3,4,5,6) - 1 = (2^2*3*5) - 1 = 59
    7 cards: LCM(2,3,4,5,6,7) - 1 = (2^2*3*5*7) - 1 = 419.
    8 cards: LCM(2,3,4,5,6,7,8) - 1 = (2^3*3*5*7) - 1 = 839
    9 cards: LCM(2,3,4,5,6,7,8,9) - 1 = (2^3*3^2*5*7) - 1 = 2519
    10 cards: LCM(2,3,4,5,6,7,8,9,10) - 1 = (2^3*3^2*5*7) - 1 = 2519

  • @matrixstuff3512
    @matrixstuff3512 6 років тому

    I feel this is the most mathematical video he's done.

  • @ChilledfishStick
    @ChilledfishStick 6 років тому

    Counting cards is hard. Keeping track of the cards at the top was about the limit of my ability. I really take my hat off for people who can do a running count in blackjack.
    Also, obviously Tadashi is awesome.

    • @MondoLeStraka
      @MondoLeStraka 6 років тому

      You have to practice, practice, practice and, BTW, you also have to practice.

  • @dajusta87
    @dajusta87 5 років тому

    Tadashi is the real spirit of numberphile

  • @alexandersanchez9138
    @alexandersanchez9138 6 років тому

    Indeed the word would have to be long to perform this trick with 10 cards; it would have to be 2,519 letters long! That's longer than standard words in any language--you would need to resort to so-called "verbal formulae" to achieve such staggering lengths. Or, you could just use a few short paragraphs, but that seems much less impressive.
    For anybody concerned with the details of how I got this number, I'll give some hints for those interested:
    1) Solve directly for n+1 instead of n, so that the congruences are all equal to 0 instead of -1, then get n by subtracting 1 at the end.
    2) Think of this as a divisibility problem.
    3) Use prime decomposition.

  • @nO_d3N1AL
    @nO_d3N1AL 6 років тому +2

    I wish he explained the whole -1 mod M thing more. Felt rushed.

  • @MexieMex
    @MexieMex 6 років тому

    Paul Daniels used to do a great version of this. And just by coincidence, his name has 11 letters in it, so he used that as the key.

  • @yeoman588
    @yeoman588 6 років тому +3

    If I understand things correctly, to play this game with 10 cards would require using a phrase with 2,519 letters - it seems to me that 2,520 is the first number where mod(2), mod(3), mod(4), ... mod(8), mod(9), and mod(10) are all equal, thus requiring 2,519 swaps at each stage to guarantee that each set of cards will match.

    • @koharaisevo3666
      @koharaisevo3666 6 років тому

      How to find such number?

    • @Krieglocke
      @Krieglocke 6 років тому

      You have to find the lowest number that has all of the numbers from 10 to 1 as factors. Then you subtract one from that number. So for example two piles of 3 cards require a number that has 3,2,1 as factors and the lowest one is 6 and 6-1=5 so you need a word with 5 letters to do the trick with two piles of 3 cards.

    • @koharaisevo3666
      @koharaisevo3666 6 років тому

      But how you find LCM of ten numbers?

    • @DanDart
      @DanDart 6 років тому +1

      Multiply them all together but ignore the duplicate prime factors if you've already got one.
      2: 2
      3: 3
      4: 2 * 2 (but there's already a 2 so just keep one)
      5: 5
      6: 2 * 3 (you've already got both so ignore)
      7: 7
      8: 2 * 2 * 2 (you've got 2 2s already so keep one)
      9: 3 * 3 (you've got one 3 already so keep one)
      Answer: multiply everything not already crossed off = 2 * 3 * 2 * 5 * 7 * 2 * 3 = 2520

  • @RMoribayashi
    @RMoribayashi 6 років тому +7

    Of course Tadashi is the King card.

    • @KuraIthys
      @KuraIthys 6 років тому

      Well, what are your options? XD
      Realistically you can only assign people to King, Queen, Jack, and depending on the deck, the two jokers.
      Still... King of hearts huh... Interesting... XD

  • @Bronzescorpion
    @Bronzescorpion 6 років тому

    In danish he word for a magic act is "tryllekunst", which as you can see is eleven characters long, making it the ideal word for this trick as you can use it in all kind of scenarios while still maintaining the illusion of the magic the specific word possess.

  • @NielsKouwenhoven
    @NielsKouwenhoven 6 років тому +1

    "So if I had two piles of ten, there'd be some other word I would be having to find". That would be twice the video description plus 15 times "Numberphile" plus 10 times "Brady"

  • @jaydendickson
    @jaydendickson 6 років тому

    Every number congruent to -1 (mod 4) is also congruent to -1 (mod 2). So, in fact we can just ignore modulo 2 for CRT. And we see that 11 is congruent to -1(Mod 3x4=12)

  • @12mjk21
    @12mjk21 6 років тому +1

    if Tadashi sensei is talking about the chinese remainder theory through a card trick, then the next video might be a lesson about RSA cryptography using a bunny in a hat trick

  • @d34d10ck
    @d34d10ck 6 років тому

    That's actually a very cool trick. Hard to believe that this actually works when you see it.

  • @macsergeapple9671
    @macsergeapple9671 6 років тому

    that's awesome, also you could use a different phrase or key, one that works for 4, another for 3 and so on, so you don't have to figure out a super large phrase if you wanna try the trick with 10 cards

  • @maxdudek4911
    @maxdudek4911 6 років тому

    I wrote a Python script to see how this would scale to larger amounts of cards.
    5/6 cards = 59 shuffles
    7 cards = 419 shuffles
    8 cards = 839 shuffles
    9/10 cards = 2519 shuffles
    For 11 or 12 cards you’d need 27,719 shuffles.
    For a full set of 13 you need 360,359, and this also works for 14.

  • @HorzaPanda
    @HorzaPanda 6 років тому

    I feel happy I could at least partially stay ahead of this one. As soon as you put down that numberphile is 11 characters I realised, oh, that's -1mod4 XD

  • @ProbabilityOverdrive
    @ProbabilityOverdrive 5 років тому +1

    “Luck doesn’t come...except to the deserving.”

  • @MrCyanGaming
    @MrCyanGaming 6 років тому

    Starting from 3 and go to the number of cards you have: for 4 cards(3*4-1) for 5 cards(3*4*5-1) and so on, this will give you how many times you need to shuffle the cards. This is only if you want to use the same about of shuffles each time, otherwise you can just shuffle it the number of times of cards you have left.

    • @DanDart
      @DanDart 6 років тому

      When you get to 6 you'll get a number that works but isn't the minimum, since you already have a 3 and a 2 from the prime factors of 6, you can miss it out. So the number you have for 5 will also work for 6 for this reason.

    • @MrCyanGaming
      @MrCyanGaming 6 років тому

      I don't think thats how it works since 4 has factor 2

    • @DanDart
      @DanDart 6 років тому

      Yes, that's why it worked, as you started at 3 and missed out the first 2 which you'd normally have
      so:
      for 2: 2
      for 3: 2 x 3
      for 4: 2 x 3 x 2 (don't need the second 2 in the 4 as we already have 2 2s now)
      for 5: 2 x 3 x 2 x 5
      for 6: 2 x 3 x 2 x 5 again (since we already have a 2 and 3 in the 6, we don't need to add any more in, there are no new original primes)
      for 7: 2 x 3 x 2 x 5 x 7 (new prime factors)
      etc

  • @Folko
    @Folko 6 років тому

    Tadashi is my spirit animal.

  • @sweepingtime
    @sweepingtime 2 роки тому

    "You have to do magic at some point."

  • @jonopriestley9461
    @jonopriestley9461 6 років тому +10

    Would it ever be worth doing a video with, say, both James and Matt? Or will we always be seeing one person at a time?

    • @xahiru
      @xahiru 6 років тому +1

      I'd love to see that

    • @andymcl92
      @andymcl92 6 років тому +3

      There's a Maths Gear video with them in, but it's serious Grime Time TV!

    • @KatanaBart
      @KatanaBart 6 років тому +1

      And collaborate with Scam School.

  • @rohitg1529
    @rohitg1529 6 років тому

    If you have m cards, you can always choose a phrase which has m!-1 letters in it. However, this would grow really fast (with 10 cards, you will need a phrase with 3,628,999 letters lol); and this does not seem to always give the smallest required number. Case in point: 4 cards works with m=11, smaller than m=4!-1=23.

  • @arcaneminded
    @arcaneminded 6 років тому +3

    Awesome as always

  • @livedandletdie
    @livedandletdie 6 років тому

    So the number of shuffles necessary for the 10 first cards are.
    1 Card/Pile = 0 ; 2 Cards/Pile = 1 ; 3 Cards/Pile = 5 ; 4 Cards/Pile = 11 ; 5 Cards/Pile = 59 ; 6 Cards/Pile = 59 ; 7 Cards/Pile = 419 ; 8 Cards/Pile = 839 ; 9 Cards/Pile = 2519 ; 10 Cards/Pile = 2519

  • @coolbeams6885
    @coolbeams6885 6 років тому +2

    We don't deserve the angel that is Tadashi. Or should I call him an angle?

  • @fredrikkirkemo2087
    @fredrikkirkemo2087 6 років тому

    Nice deck of cards ;o) I wish I could have attended the conference in Trondheim (the deck is from the host of the conference, Matematikksenteret) in November and heard dr. Tokieda live!

  • @venkatbabu186
    @venkatbabu186 4 роки тому

    You can always have a equation arrangements to get the solution for normal pattern analysis. That's called number magic tricks. Time sequester is different arrangements pattern.

  • @rupamsingh9787
    @rupamsingh9787 Рік тому

    Wow yaar, awesome 👏 you guys are amazing 🤩

  • @isaacburnett8410
    @isaacburnett8410 4 роки тому

    I found that the formula (m!/(m/2)!)-1 where m is the number of cards will give you the number of shuffles needed for this to be true. You need to round the m/2 term down to the nearest integer.

  • @stefangrothe7766
    @stefangrothe7766 6 років тому +7

    If you want to do the trick with 10 card piles, the phrase would have to be 2519 letters long.

  • @Waggles1123
    @Waggles1123 6 років тому +1

    If you wanted to do 10 cards all the way down to a pair at the end, you'd need a 2520 character phrase. And a lot of patience.
    (5*2)*(3*3)*(2*2)*(7)
    Edit: if you wanted to do a full deck, matching hearts with spades and diamonds with clubs, you'd need a 26771144400 character phrase.
    (13×2) (5×5) (3×2×2)×23×11×19×3×17×2×7
    Edit 2: see below, but I only came up with 0 mod m. Subtract 1 from each of the character counts to get -1 mod m.

    • @Richard40011
      @Richard40011 6 років тому

      I think you need 2519 in fact as 2520 is zero mod everything and it needs to be -1.

    • @Waggles1123
      @Waggles1123 6 років тому

      Richard Carter Right, my bad, I only came up with the number that is 0 mod m, not -1 mod m. Thanks!

  • @skoockum
    @skoockum 6 років тому +8

    Blue pen, red pen, green pen. Yay!

  • @w3sp
    @w3sp 6 років тому

    I doubt myself at l+1, and gave up when the modulo started to join the party.

    • @AsukaYaoi
      @AsukaYaoi 6 років тому

      you start at 1 so when you move l steps you are in l+1. -1 mod m would be (-1 plus a multiple of m); -1 mod m = -1 + n(m), where n is a integer number. So yeah 11 = -1 + 12 = -1 + 3(4).

  • @MrZooganopolos
    @MrZooganopolos 5 років тому

    This would have been a cool trick to share with someone - if they seemingly won't already know the outcome.... and there is a simple issue and why some might appear boring to others. This video is great by the way. The comment is for a kind of "staller."

  • @BigDBrian
    @BigDBrian 6 років тому

    i figured the number of 'shuffles' wasn't chosen arbitrarily, as much as his initial presentation would like you to believe =P

  • @TheActualCathal
    @TheActualCathal 6 років тому +1

    Am I the first person to notice that NUMBERPHILE has the same number of letters as ABRACADABRA?

  • @evobatman
    @evobatman 6 років тому +3

    His playing cards are from the Norwegian Center of Mathematics (Matematikksenteret).

  • @RazzlePhoxx
    @RazzlePhoxx 6 років тому +3

    Id quite like to see a video on how you actually work out the shuffle number, and what being equal to -1 mod m means

  • @williamboyles9590
    @williamboyles9590 6 років тому

    Brady's example of 2010 cards would need a 302688943139520963560995225600158362813993826633719417826165492659419954073661511014209688215937900724813883881584679824596480499314408029528173573700868594093861238393315134392222553292963609926134639490671471629619916006234116792178185020039355554580727000219997570262993769471006267711758854364692490297372521129957036151106114630207988002568487506209719913422408141287700972070783153784527242680993929561278128232265802551238966260887195877205163444266634408750903064605739992593978974192893493584649677649666373191090997789967819458007014178221987394372388459275375413376001169114845982298488420929979490232780308110723697830142989554796557489752483164837264981217520028534654695764897061617014782137742553217934049675000471398109849306249335625128061407804710992169913577101705418782363032308476368598839218061560882901350776876013349686300556154190858343751039999 (that's 870 digits) letter phrase.

    • @williamboyles9590
      @williamboyles9590 6 років тому

      I just realized he said "two piles of ten" not "two thousand and ten." Oh well.

  • @MathForLife
    @MathForLife 6 років тому

    I love this video! I wonder is there anything similar for 3 piles of cards?

  • @robinek1
    @robinek1 6 років тому

    This trick works with a full deck of cards. You just need a phrase with 3099044504245996706399 letters.

  • @KatzRool
    @KatzRool 6 років тому

    I'd love to see a plot with m on the x-axis and the lowest value of r+l such that mod(r+l,n)=mod(-1,n) and n is a list containing every natural number less than and equal to m, on the y-axis.

  • @GLAKJack
    @GLAKJack 6 років тому +1

    Oh I love magic!

  • @KingGrio
    @KingGrio 4 роки тому

    Dang. M Tadashi is right again

  • @AbiGail-ok7fc
    @AbiGail-ok7fc 6 років тому +2

    Isn't the Chinese Remainder Theorem overkill to find the required "magic" number? The CRT works great if the remainder differs for each modulus, but since for this trick you need it to be equivalent to -1 mod m, for m = 2 .. N, wouldn't one less than the Least Common Multiply of the numbers 2 .. n be the right number? So, for 5 (and 6) cards, 59 works, for 7 cards 419, for 8 cards 839, for 9 and 10 cards, 2519, etc.

    • @MathNerd1729
      @MathNerd1729 5 років тому

      I know right?
      I was thinking that same thing!

  • @igt3928
    @igt3928 6 років тому +11

    The guys down there in Hogwarts have like 5th grade mathematics, so this is incomprehensible magic for them

  • @robertobuenafe
    @robertobuenafe 6 років тому

    *My favorite ninja in disguise, Tadashi.* 😊

  • @skipthesparrow2905
    @skipthesparrow2905 6 років тому

    What a wonderful voice

  • @elguapob3766
    @elguapob3766 Рік тому

    For m cards, you should think of a word with M letters where m=LCM(2,3,...,m)

  • @shivamgumber
    @shivamgumber 2 роки тому

    Luck doesn't come except to the deserving.

  • @Jengis369
    @Jengis369 6 років тому

    So much this! Seeing "tricks" like this in a theatrical manner, once you realize that it is maths behind it the magic is gone.
    You guys should do a video on more such tricks, the way you're presenting it is such an incredible introduction to different maths that you never lose that sense of wonder as one seeks to understand why this does what it does.

  • @HL-iw1du
    @HL-iw1du 6 років тому

    can’t wait for the video on h

  • @bestserg
    @bestserg 6 років тому

    If you want to impress your friends with a 52-deck (13 card of the same suit) you would need a phrase of 360359 letters. 358..357..356...