Go back
Deck of Cards in Order

Deck of Cards in Order

Posers and Puzzles

talzamir
Art, not a Toil

60.13N / 25.01E

Joined
19 Sep 11
Moves
59804
Clock
11 Feb 13
Vote Up
Vote Down

Start with a deck of cards, in order, by suit and number;
Ace of clubs, 2C, 3C, ..., KC, AD, 2D, ..., KD, AH, 2H, .., KH, AS, 2S, ... KS.

Deal the deck into four hands of 13 cards each, so the first hand consists of AC, 5C, 9C etc, the last card the ten of spades.
* does any hand have a pair of cards of the same number?

Stack the four hands as a pile, first hand on top, then 2nd, 3rd, and 4th, and deal out again for four new hands.
* how many times do you need to repeat this to end up with a deck where the cards are in the original order, AC, 2C, ... KS ?

iamatiger

Joined
26 Apr 03
Moves
26771
Clock
13 Feb 13
1 edit
Vote Up
Vote Down

Question 1 answer - No, 13 mod 4 is 1, so each suit slips back by 1 and the same numbers will only recur on the 5th suit, which there isn't.

Are we supposed to do B mathematically, or by simulation?

talzamir
Art, not a Toil

60.13N / 25.01E

Joined
19 Sep 11
Moves
59804
Clock
14 Feb 13
Vote Up
Vote Down

The simulation gives a brute force answer easily, but is not really elegant. Unless of course the number is fairly small, which it is, and one uses real cards, which is not an option here. A mathematical answer could be more interesting. Where does the n'th card end up after m times the deck is dealt?

Z

Joined
15 Feb 07
Moves
11841
Clock
04 Apr 13
Vote Up
Vote Down

Let's list the card 0,1,2,...,51 to make the maths slightly smoother.

Now every number between 0 and 51 can be written uniquely as 4a+b where 0<=a<13 and 0<=b<4 and if a card is in (4a+b)th position then it will end up in the (a+13b)th position after one "shuffle".

The 0th and 51st card are fixed by a shuffle so let's just consider the numbers 1,2,...,50 and let's consider them modulo 51. If we do this then a card in position x before a shuffle will be in position 13x (mod 51) after the shuffle as:

13(4a+b)=52a+13b=a+13b (mod 51)

So after n shuffles a card that started in position x will be in position (13^n)x (mod 51). So the answer to the question is the minimal n such that (13^n)=1 (mod 51). This is 4.

talzamir
Art, not a Toil

60.13N / 25.01E

Joined
19 Sep 11
Moves
59804
Clock
08 Apr 13
Vote Up
Vote Down

nice work. =)

Cookies help us deliver our Services. By using our Services or clicking I agree, you agree to our use of cookies. Learn More.