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 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 be the number of sequences of hand movements such that during the sequence, every possible positioning of the hands appears exactly once, and at the end of the movements, the hands have returned to their initial position. Find the remainder when is divided by
Your answer
Integer from 0 to 999
Show solution
Solution
Record the hands as an ordered pair each movement replaces by or so a valid sequence is a closed tour through all positions — equivalently, a choice, at each position, of which hand moves next. Sort the positions into rows according to and let be the set of -values at which the tour leaves row (a -move). A -move from row enters row at the same -value, and the tour then runs through consecutive -values until its next exit. For these runs to cover row exactly once they must partition which forces each entry point to sit one step past an exit: In particular every has the same size and
Leaving row at its -th exit (in cyclic order) leads to a run ending at the -st exit of row each -move advances the row index by modulo and the exit index by modulo The tour therefore closes after -moves, while a full tour must use all exits, so the tour is a single cycle through all positions precisely when Conversely, every choice of with yields exactly one valid movement sequence from the starting position.
Hence and the remainder when is divided by is
Tagged: graph theory · modular arithmetic · combinations