English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

A deck of cards numbered 1 through n is randomly shuffled. Repeat the following process:
Take the top card, call the number on that card k. Reverse the order of the first k cards. Prove that this process will eventually stop with 1 at the top of the deck.

2007-03-17 19:38:32 · 3 answers · asked by Tony Z 2 in Science & Mathematics Mathematics

You're not actually throwing the cards out, so how do you know it will actually get to 1 rather than cycling?

2007-03-17 19:49:43 · update #1

The process stops when you hit 1. The question is why do you eventually hit 1 given any initial permutation?

2007-03-17 19:50:31 · update #2

3 answers

Proof by contradiction:

Assume that it is possible to reach a steady state cycle other than the degenerate case of the single 1 card. Consider the cards involved in the cycle to be k_1, k_2, k_3, . . .k_q where q is the length of the cycle. Without loss of generality order the cycle so that k_1 > all other k in the cycle.

When k_1 is processed it will move to the k_1 position in the deck. all further flips will never involve k_1 as they will involve flips of size less than k_1 and k_1 exceeded the sizes of the other k's. As a result k_1 will never be moved out of the k_1 position in the deck, and therefore never moved into the first position. As a result we will never see the k_1 card again in the cycle. But this is a contradiction, hence our original assumption must be incorrect.

2007-03-17 20:28:13 · answer #1 · answered by vinniepescado 2 · 1 0

Well if you go through all the cards until eventually you come to 1 than it has to get there, unless you throw 1 away or something.

2007-03-17 19:47:14 · answer #2 · answered by Anonymous · 0 0

If the first card is 1, the process will stop. Thus the process will stop at 1.

2007-03-17 19:49:04 · answer #3 · answered by ag_iitkgp 7 · 0 1

fedest.com, questions and answers