Skip to main content

2023 AIME I Problem 14

Problem 14 of 15HarderNumber TheoryCombinatorics

The following analog clock has two hands that can move independently of each other. Initially, both hands point to the number 12.12. The clock performs a sequence of hand movements so that on each movement, one of the two hands moves clockwise to the next number on the clock face while the other hand does not move. Let NN be the number of sequences of 144144 hand movements such that during the sequence, every possible positioning of the hands appears exactly once, and at the end of the 144144 movements, the hands have returned to their initial position. Find the remainder when NN is divided by 1000.1000.

Your answer

Integer from 0 to 999
Show solution

Solution

Record the hands as an ordered pair (a,b)∈Z12×Z12;(a, b) \in \mathbb{Z}_{12} \times \mathbb{Z}_{12}; each movement replaces (a,b)(a, b) by (a+1,b)(a+1, b) or (a,b+1),(a, b+1), so a valid sequence is a closed tour through all 144144 positions — equivalently, a choice, at each position, of which hand moves next. Sort the positions into 1212 rows according to b,b, and let Sb⊆Z12S_b \subseteq \mathbb{Z}_{12} be the set of aa-values at which the tour leaves row bb (a bb-move). A bb-move from row b−1b - 1 enters row bb at the same aa-value, and the tour then runs through consecutive aa-values until its next exit. For these runs to cover row bb exactly once they must partition Z12,\mathbb{Z}_{12}, which forces each entry point to sit one step past an exit: Sb−1=Sb+1.S_{b-1} = S_b + 1. In particular every SbS_b has the same size c,c, and Sb=S0−b.S_b = S_0 - b. Leaving row bb at its ii-th exit (in cyclic order) leads to a run ending at the (i+1)(i+1)-st exit of row b+1:b + 1: each bb-move advances the row index by 11 modulo 1212 and the exit index by 11 modulo c.c. The tour therefore closes after lcm⁡(12,c)\operatorname{lcm}(12, c) bb-moves, while a full tour must use all 12c12c exits, so the tour is a single cycle through all 144144 positions precisely when gcd⁡(c,12)=1.\gcd(c, 12) = 1. Conversely, every choice of S0S_0 with gcd⁡(∣S0∣,12)=1\gcd(|S_0|, 12) = 1 yields exactly one valid movement sequence from the starting position. Hence N=(121)+(125)+(127)+(1211)=12+792+792+12=1608, \begin{aligned} N &= \binom{12}{1} + \binom{12}{5} \\ &\quad {}+ \binom{12}{7} + \binom{12}{11} \\ &= 12 + 792 + 792 \\ &\quad {}+ 12 = 1608, \end{aligned} and the remainder when NN is divided by 10001000 is 608.608.
AoPS wiki

Tagged: graph theory · modular arithmetic · combinations

More practice