# Thread: Number Thry Card Shuffling

1. ## Number Thry Card Shuffling

Are there any cool theorems to card shuffling in number theory? I have to do a presentation on card shuffling..so things like ord, primitive roots, etc etc. Some theorems and proofs would be helpful, definitions etc..anyone got some ideas?

2. Originally Posted by Ideasman
Are there any cool theorems to card shuffling in number theory? I have to do a presentation on card shuffling..so things like ord, primitive roots, etc etc. Some theorems and proofs would be helpful, definitions etc..anyone got some ideas?
See here

RonL

3. I know what several things about card shuffling involved especially in the rifle shuffle. But I will not say them because one of my hobbies besides for math is card magic/manipulation/cheating. Thus, I know how to let someone else rifle shuffle the cards and yet know most the the stuff which is going one.

But I tell you one.

A shuffle which I love is the "Faro shuffle" it is done by perfectly seperating the deck 26 vs. 26 and then doing a perfect (1 to 1) rifle shuffle. (Takes practice).

If you do an "out faro" (bottom and face cards are unchanged) 8 times you return back to original position.

And an "in faro" (bottom and face cards are changed) 52 times you return back to the orginal position.

4. Originally Posted by ThePerfectHacker
I know what several things about card shuffling involved especially in the rifle shuffle. But I will not say them because one of my hobbies besides for math is card magic/manipulation/cheating. Thus, I know how to let someone else rifle shuffle the cards and yet know most the the stuff which is going one.

But I tell you one.

A shuffle which I love is the "Faro shuffle" it is done by perfectly seperating the deck 26 vs. 26 and then doing a perfect (1 to 1) rifle shuffle. (Takes practice).

If you do an "out faro" (bottom and face cards are unchanged) 8 times you return back to original position.

And an "in faro" (bottom and face cards are changed) 52 times you return back to the orginal position.
And if you're wondering how TPH came up with those numbers, here is a brief extension to what he said, especially since you were interested in orders.

ord_(2)(51) or 2^8 = 256 = 1 (mod 51), and therefore 8 cycles (specifically, out shuffles), will recycle the deck.

Similarly, a deck of size 50 is recycled by 8 shuffles (using in shuffles).

2^(52) = 1 (mod 53) (You can use Fermat's Little Theorem to show this); we further note that 2 is a primitive root mod 53 (and thus 52 is the smallest power), which says that a deck of 54 cards will recycle after 52 out shuffles or if you ignore the top/bottom cards, a deck of size 52 cards will recycle after 52 in shuffles.

In general, cards with size 2^k will recycle after k out shuffles, since 2^k = 1 (mod 2^k - 1).

This leads to asking why do we use ord 2? It's one of the mysteries of math..there's lots of interesting stuff..this inadvertantly leads to the questions of whether there exists arbitrarily large 2n integers such that 2 is a primitive root of mod 2n - 1..which could be proven to be true if the riemann hypothesis is proved to be true which ...

Lots of interesting info. out there.