What's going on with the math?


There is one more rule to use when the prime factorization of a modulo involves powers.

When the prime factorization involves powers, the shuffle will include color groups of different sizes for each of the powers. The factor determines the size of the smallest color group(s). Each additional set of color groups in then the size of the factor times the size of the previous set.

I can't really think of a less confusing way to say that. Perhaps it will make sense after an example...

Take a shuffle of 124 cards (mod 125). The prime factorization of 125 is 5·5·5 or 5³. The power is 3 so 3 different sizes of color groups will be included. The size of the first is determined by the factor in this case 5. From the prime modulo table we know that this is a color group of 4 cards. The second color group will be the size of this initial color group (4) times the size of the factor (5). 4·5 is 20. So a color group of 20 will be included. The third color group will be the size of this last color group (20) times the size of the factor (5). 20·5=100. So the perfect shuffle of 24 card includes:
  • 1 color group of size 4
  • 1 color groups of size 20
  • 1 color groups of size 100
Note that I said there is a set of color groups for each power of the factor. I phrased it this way because it is possible that the factor itself divides into more than one color group. Take for example a shuffle of 48 cards (mod 49). 49 is 7². From the prime modulo table we know that a shuffle of 6 cards (mod 7) forms 2 color groups of size 3. So a shuffle of 49 has a set of 2 color groups size 3. In also has another set 7 times this size, or two color groups size 21 (3·7).
  • 2 color group of size 3
  • 2 color groups of size 21
Notice that the total size of these groups does indeed add up to 48 cards.

Now all these rules can be combined to determine the color groups of a perfect shuffle of any size, provided the color groups of all the prime factors are known. Try it on your own now. What color groups would be created by a prefect shuffle of 278 cards?

Continue
Page 1 2 3 4 5


Home
What is a perfect shuffle anyway?
See more perfect shuffle scarves
Knit your own perfect shuffle scarf.
Who came up with this brilliant idea?
Find out more