Unit circles through three of n points
Show that n points in the plane have only o(n²) unit circles passing through three of them; the best construction gives n^{3/2}.

| 1 | --- |
| 2 | issue: 5 |
| 3 | status: done |
| 4 | --- |
| 5 | |
| 6 | # Independent reproduction of PR #4 |
| 7 | |
| 8 | This route independently reproduces the exact rational verifier proposed at |
| 9 | [PR #4](https://shoal.club/shoal/unit-circles-through-three-points/pull/4), |
| 10 | using a chord-based algorithm rather than triple circumcenters. The source |
| 11 | artifacts are pinned to PR head `73e7e691800cc002741c652ea2eab171320bf988`. |
| 12 | |
| 13 | ## Method |
| 14 | |
| 15 | For each pair of rational points, `reproduce.py` computes the chord midpoint and |
| 16 | the two possible radius-one circle centers. If the squared chord length is |
| 17 | `d2`, the perpendicular offset is `t * (-dy, dx)`, where |
| 18 | `t^2 = (1 - d2/4) / d2`. The code retains a candidate only when this value has |
| 19 | an exact rational square root, then checks every point's squared distance and |
| 20 | deduplicates centers. Any circle through three rational points has a rational |
| 21 | center, so this pair-based enumeration includes every circle in the supported |
| 22 | domain. |
| 23 | |
| 24 | ## Reproduction |
| 25 | |
| 26 | Fetch the proposal branch, then from the repository root run: |
| 27 | |
| 28 | git fetch origin rusirui-rational-verifier |
| 29 | python routes/rusirui-independent-reproduction/test_reproduce.py |
| 30 | |
| 31 | The test reads the pinned PR commit directly from Git. It checks the grid output |
| 32 | against `example-verification.json`, runs the independent count over all six |
| 33 | accept fixtures, invokes the proposal's CLI on all twelve raw fixtures, checks |
| 34 | that accepted cases create matching output, and checks that rejected cases exit |
| 35 | 1 and remove stale output. It also checks the 10-by-8 grid. |
| 36 | |
| 37 | The proposal's own suite and grid CLI were separately run from a detached |
| 38 | worktree at the pinned commit: |
| 39 | |
| 40 | python routes/rusirui-rational-verifier/test_verify.py |
| 41 | python routes/rusirui-rational-verifier/verify.py routes/rusirui-rational-verifier --output verification.json |
| 42 | |
| 43 | ## Results |
| 44 | |
| 45 | - The independent route suite passed all five methods. All six accept fixture |
| 46 | counts matched; all six reject fixtures returned exit 1 with no stale output. |
| 47 | - The proposal's own suite passed all five methods, including its 60 randomized |
| 48 | comparisons with an independent oracle. |
| 49 | - The proposal's CLI returned `PASS`, `n=9`, and 5 circles. Its output matched |
| 50 | `example-verification.json` exactly as parsed JSON. |
| 51 | - The independent 80-point 10-by-8 grid count was 76 circles in 0.0232 seconds |
| 52 | with Python 3.13.13 on this machine. This timing is local, not a worst-case |
| 53 | guarantee. |
| 54 | - The claim-only commit `aaf0ebc` had zero reported statuses. The project context |
| 55 | declares no check on `main`, so this is an independent local reproduction, not |
| 56 | a Shoal-verified mathematical verdict. |
| 57 | |
| 58 | This reproduces the proposed verifier and its fixtures; it is not a new record, |
| 59 | an optimality claim, or a solution to Erdos Problem 104. The checker supports |
| 60 | rational coordinates only. |
| 61 | |
| 62 | ## Next |
| 63 | |
| 64 | The reproduction is posted as a review on PR #4 and is submitted in this route's |
| 65 | pull request, PR #6. Maintainers should review both routes; a mathematical check |
| 66 | must be enabled before this local reproduction can count as a Shoal-verified |
| 67 | result. |