Suppose that is a positive integer. An in-shuffle is performed on a list with items to produce a new list of items in the following way: - The first items from the original are placed in the odd positions of the new list in the same order as they appeared in the original list. - The remaining items from the original are placed in the even positions of the new list, in the same order as they appeared in the original list. For example, an in-shuffle performed on the list gives the new list . A second in-shuffle now gives the list . Ping has a list of the 66 integers from 1 to 66, arranged in increasing order. He performs 1000 in-shuffles on this list, recording the new list each time. In how many of these 1001 lists is the number 47 in the 24th position?
Solution
Starting with a list of items, the items in the first 33 positions are moved by an in-shuffle to the odd positions of the resulting list, namely to the positions respectively. This means that an item in position with is moved by an in-shuffle to position . We can see why this formula works by first moving the items in positions to the even positions (doubling the original position numbers) and then shifting each backwards one position to . Also, the items in the second 33 positions are moved by an in-shuffle to the even positions of the resulting list, namely to the positions respectively. This means that an item in position with is moved by an in-shuffle to position . We can see why this formula works by first moving the items in positions backwards 33 positions to and then doubling their position numbers to obtain . In summary, the item in position is moved by an in-shuffle to position - if - if Therefore, the integer 47 is moved successively as follows: List | Position 1 | 47 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | Because the integer 47 moves back to position 47 in list 13, this means that its positions continue in a cycle of length 12: This is because the position to which an integer moves is completely determined by its previous position and so the list will cycle once one position repeats. We note that the integer 47 is thus in position 24 in every 12th list starting at the 12th list. Since and , the cycle occurs a total of 83 complete times and so the integer 47 is in the 24th position in 83 lists. Even though an 84th cycle begins, it does not conclude and so 47 does not occur in the 24th position for an 84th time among the 1001 lists.