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
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

which gives

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
See also:  A002326 is really the fundamental sequence for this problem."

The A002326 sequence gives

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:
Remember me:
Sign up! | Forgot password

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

Copyright © 2002 - 2019 by Animus Pactum Consulting. All rights reserved. Privacy Information