I have stack of x/2 green poker chips, sitting on top of x/2 red poker chips. When I shuffle my stack of chips, I separate the chips into the top half and the bottom half. I then alternate laying down a chip from the left and then right stack. How many times must I shuffle my stack of x chips such that they return to their original formation of green on top, red on bottom?
I've heard it takes forever to grow a woman from the ground
When you separate the big pile into two stacks, does the top pile go to the left or right stack? I'm sensing an off-by-one error If top -> left, then for x=1 the answer is 2, if top -> right, the answer is 1. --Tim
You could argue that the answer is zero for all x, but I think you have to assume there's at least one shuffle. I'd say the answer for x = 2 is 1 :-) Meanwhile, I'm still tearing up bits of paper on my desk to use as poker chips :-/
Hey everyone- I made a program for this and figured it all out for all x up to 500. I don't see any pattern, and it's starting to bug me. Check out what I found at http://www.freewebs.com/sedatesnail . (Sorry, the program's not up yet, but the list is).
I'm new here, so I don't know if making a program is the "easy cop-out" answer... but it's all I've got. -Mario
Hey... oh yeah, the "Java Ranch" hehe. Well I only know C++ so far- I took one course in it in high school. I'll be learning Java as I start college in a few days... I just found this site on a Google search.
One thing that might affect it is the factors of each number... for example, multiples of 7 tend to take very few shuffles. Even numbers tend to take more shuffles than odd numbers. There are probably a bunch of other patterns like this. What's interesting is when the patterns collide... for example, 7's take few shuffles but 2's take many... then 14 takes a whopping 28 shuffles.
Also, it seems that the highest number of shuffles it can possibly take is double the number of chips.
This means that number of shuffles required for two stacks of 5 chips to return to there original position is 6. This is the same result we get when we actually try shuffling the chips. Try it for other numbers- it works!
By the way- for odd numbers, just use the equation 2^x-1= 0[modulo(n)], which will give you the same result as the even number of chips immediately following (# of shuffles for 5 chips = # of shuffles for 6 chips).
What do you have in that there bucket? It wouldn't be a tiny ad by any chance ...