Skip to content
Vamshi Jandhyala

Books · The Riddler

Chapter 223

How Many Times A Day Is A Broken Clock Right?

Riddler Express

Both hands of your new clock look identical: hour hand and minute hand are indistinguishable. Sometimes this matters and sometimes it does not; for example, at 12:3012{:}30 the minute hand is exactly on the 66 and the hour hand is halfway between the 1212 and the 11, which uniquely identifies the time because the alternative interpretation (hour hand on 66, minute hand halfway between 1212 and 11) is not a valid clock configuration. How many times during the day are you not able to tell the time?

The Riddler, FiveThirtyEight, April 12, 2019(original post)

Solution

Parametrise hand positions as fractions of a full revolution measured clockwise from the 1212-o’clock mark. At elapsed time tt measured in hours since midnight (with 0t<120 \le t < 12 for a 1212-hour cycle), the hour-hand position and minute-hand position are h(t)  =  t12(mod1),m(t)  =  t(mod1).h(t) \;=\; \frac{t}{12} \pmod 1, \qquad m(t) \;=\; t \pmod 1. The minute hand turns 1212 times for every revolution of the hour hand, so m12h(mod1)m \equiv 12 h \pmod 1.

When are the hands indistinguishable? The two hands give an unambiguous reading unless there exists a different valid time tt' at which the hour and minute hands sit at the positions of the minute and hour hands of tt, respectively. That is, h(t)  =  m(t),m(t)  =  h(t).h(t') \;=\; m(t), \qquad m(t') \;=\; h(t). Substituting and using m12h(mod1)m \equiv 12 h \pmod 1: t12    t(mod1),t    t12(mod1).\frac{t'}{12} \;\equiv\; t \pmod 1, \qquad t' \;\equiv\; \frac{t}{12} \pmod 1. The first says t12t(mod12)t' \equiv 12 t \pmod{12}; the second says tt/12(mod1)t' \equiv t/12 \pmod 1. Subtracting, 12t    t/12(mod1),equivalently143t/12    0(mod1),i.e.,143t    0(mod12).\begin{aligned} 12 t &\;\equiv\; t/12 \pmod 1, \\ \text{equivalently}\quad 143\,t / 12 &\;\equiv\; 0 \pmod 1, \\ \text{i.e.,}\quad 143 t &\;\equiv\; 0 \pmod{12}. \end{aligned} With u=t/12[0,1)u = t/12 \in [0, 1) this is 143uZ143 u \in \mathbb{Z}, so u=k/143u = k/143 for k=0,1,,142k = 0, 1, \ldots, 142. That is 143143 ambiguous instants every 1212 hours, or 286\mathbf{286} every 2424 hours.

Subtract the times when the hands actually overlap. If the two hands coincide, h(t)=m(t)h(t) = m(t), so swapping them changes nothing and you can read the clock without ambiguity. That happens when t/12t(mod1)t/12 \equiv t \pmod 1, equivalently 11t0(mod12)11 t \equiv 0 \pmod {12}, or u=j/11u = j/11 for j=0,1,,10j = 0, 1, \ldots, 10: 1111 instants every 1212 hours, or 2222 every day.

The ambiguous instants are therefore 28622=264286 - 22 = 264 per day.

You cannot tell the time at 264 instants per day.\boxed{\text{You cannot tell the time at }264\text{ instants per day.}}

Each of those 264264 instants is a single moment, not an interval: if your eyesight resolves fractions of a second, you see the hands cross the ambiguous configuration and move on.

Why 143143. The geometric content of the derivation is that the two hands together trace a closed curve on the torus [0,1)2[0,1)^{2} (hour-fraction ×\times minute-fraction), and the swap symmetry intersects this curve exactly 143143 times per period. The integer 143=12121143 = 12 \cdot 12 - 1 is the determinant of the relation m=12h(mod1)m = 12 h \pmod 1.

The computation

Walk a fine grid of u[0,1)u \in [0, 1) and count exactly the candidate-ambiguous and overlap configurations. Confirm the closed-form 28622=264286 - 22 = 264.

  1. For u{k/143:k=0,,142}u \in \{k/143 : k = 0, \ldots, 142\}, check that uu satisfies the swap condition (it does, by construction); count 143143.

  2. For u{j/11:j=0,,10}u \in \{j/11 : j = 0, \ldots, 10\}, check overlap hmh \equiv m; count 1111.

  3. Verify these overlap instants are a subset of the swap instants (they are, since each is some k/143k/143).

  4. Multiply (14311143 - 11) by two to convert from 1212-hour to 2424-hour day.

from fractions import Fraction

# Swap-ambiguous instants in [0, 12) hours: u = t/12 = k/143.
swap = {Fraction(k, 143) for k in range(143)}
# Overlap instants: u = j/11.
overlap = {Fraction(j, 11) for j in range(11)}
print(f"|swap|    = {len(swap)}")
print(f"|overlap| = {len(overlap)}")
print(f"overlap subset of swap? {overlap <= swap}")
ambiguous_per_12h = len(swap) - len(overlap)
print(f"ambiguous per 12h = {ambiguous_per_12h}")
print(f"ambiguous per day = {2 * ambiguous_per_12h}")

# Verify the swap relation algebraically: for u = k/143, we need t' such that
# t' / 12 = 12u mod 1 and t' = u mod 1 (with t = 12 u).
def check(k):
    u = Fraction(k, 143)
    t = 12 * u
    m = t - int(t)                   # minute fraction = t mod 1
    h = u                            # hour fraction
    # t' must satisfy t'/12 = m mod 1, t' = h mod 1
    # Existence: pick t' = h + 12 * floor(...). Confirm: t'/12 mod 1 = m.
    return (12 * m - u) * 1 == int(12 * m - u)   # 143u is an integer

print("all 143 satisfy 143u integer:", all(check(k) for k in range(143)))

The script prints swap=143|swap| = 143, overlap=11|overlap| = 11, “overlap subset of swap” = True, ambiguous per 1212h =132= 132, ambiguous per day =264= \mathbf{264}, and the algebraic check confirms each of the 143143 candidates indeed satisfies the swap relation.

Riddler Classic

The Classic asks you to count the “transitive national champions” from the 20182018-1919 NCAA men’s and women’s basketball seasons. The chain begins at the actual champion (Virginia on the men’s side, Baylor on the women’s) and walks backward: any team that beat any team in the chain joins it. Compute how many such teams exist for each side, using the linked season game logs.

The Riddler, FiveThirtyEight, April 12, 2019(original post)

Status

This is graph reachability over the directed game graph for the entire 20182018-1919 NCAA season: nodes are teams, an edge points from winner to loser, and the transitive champions are the ancestors of the actual champion in this DAG. The mathematics is two lines (compute the set of ancestors). The puzzle’s bite comes from the data: the men’s count uses every Division-I result, and the women’s count includes Division I, Division II, Division III, and Canadian teams.

The puzzle is deferred because the answer is a property of an external dataset (the 20182018-1919 game logs) that the puzzle links to but does not include. Re-running the reachability with a different copy of the season’s results would change the count. The official report (FiveThirtyEight, April 19, 2019) gives 359\mathbf{359} transitive champions on the men’s side (every single Division-I school, plus many beyond) and 1,775\mathbf{1{,}775} on the women’s side (every Division-I women’s team except Eastern Kentucky, which went 22-2727 and beat no Division-I opponent), with the longest chain on the women’s side spanning 2525 games.

If a successor edition pins the dataset (or distributes a sanitised game-log CSV), the chapter becomes a five-line breadth-first search over the directed game graph.