All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > General
Perfect Shuffle (Posted on 2004-05-19) Difficulty: 5 of 5
You have a deck of 52 cards - for convenience, number them 1 through 52. You cut the cards into two equal halves and shuffle them perfectly. That is, the cards were in the order
1,2,3,...,52
and now they are
1,27,2,28,...,26,52. Let's call this a perfect in-shuffle.

If you repeat this in-shuffling process, how many in-shuffles will it take for the deck to return to its initial ordering (taking for granted that the cards will eventually do so)?
________________________

How does the solution change if you have a deck of 64 cards, or 10, or in general, n cards? For odd integer values of n, in-shuffling will take 1,2,3,...,n to 1,(n+3)/2,2,(n+5)/2,...,n,(n+1)/2. For example, when n=5, the first in-shuffle yields 1,4,2,5,3.

No Solution Yet Submitted by SilverKnight    
Rating: 4.2500 (4 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
re(3): Making a sequence (spoilers on the numbers) | Comment 4 of 20 |
(In reply to re(2): Making a sequence (spoilers on the numbers) by Charlie)

Charlie: Your numbers agree with http://www.research.att.com/cgi-bin/access.cgi/as/njas/sequences/eisA.cgi?Anum=A024222

which gives

"0,1,2,2,4,4,3,3,6,6,10,10,12,12,4,4,8,8,18,18,6,6,11,11,20,
           20,18,18,28,28,5,5,10,10,12,12,36,36,12,12,20,20,14,14,12,
           12,23,23,21,21,8,8,52,52,20,20,18,18,58,58,60,60,6,6,12,12,
           66,66,22,22,35,35,9,9,20,20
Name:      Shuffles (perfect faro shuffles with cut) required to return a deck of
              size n to original order.
References Tim Folger, "Shuffling Into Hyperspace," Discover, Jan 1991 (vol 12,
              no 1), pages 66-67.
           Martin Gardner, "Card Shuffles," Mathematical Carnival chapter 10,
              pages 123-138. New York: Vintage Books, 1977.
           S. Brent Morris, Magic Tricks, Card Shuffling and Dynamic Computer
              Memories, Math. Assoc. Am., 1998, p. 107.
Example:   a(52)=8: a deck of size 52 returns to original order in 8 perfect faro
              shuffles.
See also:  A002326 is really the fundamental sequence for this problem."

The A002326 sequence gives

"1,2,4,3,6,10,12,4,8,18,6,11,20,18,28,5,10,12,36,12,20,14,12,
           23,21,8,52,20,18,58,60,6,12,66,22,35,9,20,30,39,54,82,8,28,
           11,12,10,36,48,30,100,51,12,106,36,36,28,44,12,24,110,20,
           100,7,14,130,18,36,68,138,46,60,28
Name:      Multiplicative order of 2 mod 2n+1.
Comments:  Number of riffle shuffles of 2n cards required to return a deck to
              initial state. A riffle shuffle replaces a list s(1), s(2), ..., s(m) by
              s(1), s((i/2)+1), s(2), s((i/2)+2), ...
           In other words, least k such that (2n+1) divides (2^k-1)."

These also give references to interesting printed and online articles.


  Posted by Richard on 2004-05-20 00:04:46
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (15)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information