"""A lonely moment, checked exactly: four runners with speeds 1, 3, 4, 9 laps per unit time leave 0 together, where a fifth runner stands still. At t = 5/12 every moving runner is at least 1/5 = 1/(n+1) of a lap from 0, so the stretch the conjecture promises to empty is empty (the field's colour). Faint trails show the last 0.02 time units of each run, so their lengths are the speeds.""" import math from fractions import Fraction from pathlib import Path import kit V, t = (1, 3, 4, 9), Fraction(5, 12) n = len(V) gap = lambda t: min(abs(t * v - round(t * v)) for v in V) # distance of the nearest runner to 0, in laps assert gap(t) >= Fraction(1, n + 1), gap(t) # 1/4 here cx, cy, r = kit.W / 2, 136, 108 P = lambda u: (cx + r * math.sin(2 * math.pi * u), cy - r * math.cos(2 * math.pi * u)) # 0 at the top, clockwise arc = lambda a, b: [P(a + (b - a) * i / 40) for i in range(41)] body = kit.circle(cx, cy, r, 'faint-s', ' stroke-width="2"') body += kit.polyline(arc(-1 / (n + 1), 1 / (n + 1)), 'f-s', 7) # within 1/(n+1) of 0: empty at this moment body += ''.join(kit.polyline(arc(float(t * v) - 0.02 * v, float(t * v)), 'faint-s', 6) for v in V) body += ''.join(kit.dot(*P(float(t * v)), 9) for v in V) body += kit.dot(*P(0), 10, 'f') kit.write(__file__, 'mathematics', body, label=f'speeds 1,3,4,9 · all ≥ 1/{n + 1} lap from the still one')