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.)
there's a pattern there. I just know it! | Comment 11 of 20 |
(In reply to re(6): Making a sequence (spoilers on the numbers) by Charlie)

Since I didn't really understand much of what you said, I decided to look at the numbers more closely and I noticed a few patterns. The powers of 2 are pretty obvious...

2=1, 4=2, 8=3, 16=4 32=5 etc.

The answer is equal to the exponent of 2. But there's a pattern for other numbers too.

3=2, 9=6, 27=18, 81=54, 243=162

It looks like for all numbers 3^x, each answer is equal to 3^(x-1) * 2. IOW, it's 3 times more than the last one. So for 3^8 (6561) I'm guessing the answer is (3^7) * 2 or 4374.

The pattern for 4 is just double the exponent. But 4 is already an exponent of 2 so that's obvious.

5 follows a similar pattern to 3. For all numbers 5^x the answer is 5^(x-1) * 4.

6 is weird.

6=4, 36=12, 216=28

1296 could be either 72 or 68 or even 36. i dunno, i need more numbers.

7=3, 49=21, So 343 would probably be 147.

It looks like all prime numbers have the same pattern. x^(n-1) * (x-1). Like 3, 5, 11, 13, even 2 works. But not 7 because it's one less than 8 which is a power of 2, so starts with a 3 instead of 6. So all odd numbers have to be the same as the even number higher immediately after it, before it can follow that formula. Like 7 and 31. But not 3 because it would have been a 2 anyway. And if the prime number is one less than a number that has a factor that is a prime then it can't follow that formula either. Like 17 is only 8 because 18 is a multiple of 9. But 29 works because 30 is NOT a multiple of a square. !!! BLLAH!!!! it's too complicated, forget it, i give up!

Edited on May 25, 2004, 1:46 pm
  Posted by Danny on 2004-05-25 10:53:44

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 (0)
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