# Coin Weighing > The counterfeit-coin balance puzzle, playable, with an exhaustive search that settles > exactly how many coins each number of weighings can handle — and why the famous > twelve-coin puzzle sits one coin short of its own counting bound. https://coin-weighing.skillsafe.ai/ ## What it does One coin in a pile is counterfeit. A two-pan balance gives three answers: left heavier, right heavier, level. You have a fixed number of weighings. Find the fake. The app is an independent reimplementation of a public-domain mathematical puzzle. It runs entirely in the browser: no account, no network calls, no model, no telemetry. ## Five variants, which are five different problems The answer depends on exactly what you are told and exactly what you must report, and conflating them is the usual way to get a confident wrong number. | Variant | What you know | What you must say | Coins in 3 weighings | | --- | --- | --- | --- | | Classic | exactly one fake, heavy or light unknown | which coin, and which way | 12 | | With a true coin | as Classic, plus one coin known to be genuine | which coin, and which way | 13 | | Find it only | exactly one fake, heavy or light unknown | which coin | 13 | | Known heavy | exactly one fake, and it is heavier | which coin | 27 | | Or none at all | at most one fake, heavy or light unknown | which coin and which way, or "the pile is clean" | 12 | ## The headline "With three weighings you can find the fake among twelve, so four weighings handles sixteen" is false. Four weighings handle 39. Each weighing multiplies the reach by about three; it does not add a constant. Twelve, 39, 120, 363 — the sequence is (3^k − 3)/2. ## The gap, and where it comes from Three weighings distinguish at most 27 futures, and twelve coins of unknown direction make 24 stories, so the counting bound is 13. Twelve is the most that can actually be done. The obstruction is parity, not information: with no coin known to be genuine the first weighing must be m against m, so a tilt leaves an even number of stories and so does a balance — but each branch must fit inside 9, which is odd. Enumerating every opening for 13 coins finds none that works. Hand the solver one coin it already knows is genuine and the opening can be m against m−1 plus that coin, leaving an odd count, and the gap closes exactly. ## Deciding every weighing in advance costs nothing An exhaustive search over schemes whose weighings are all fixed before the first one is made reaches the same maximum as fully adaptive play, in every variant and every number of weighings searched here. Adaptivity buys nothing in this problem. ## How the numbers are produced Every figure on the page is searched in the page at load time, not quoted. The achievable maximum comes from an exhaustive decision-tree search; the counting bound is computed separately from the outcome tree; the fixed-in-advance maximum comes from an exhaustive search over sets of weighing codes. Offline, a second brute force that shares no code — it works on concrete coins and simulated physical weights — reproduces the same table, and an adversary takes each finished strategy and tries to find two situations it cannot tell apart. ## Credits Independent reimplementation of a public-domain puzzle. See /CREDITS.txt for the citations, what is documented and what is measured, what differs from the original, and an honest account of a trademark check in which no register could be reached. ## Pages - / — the app - /CREDITS.txt — credits, provenance and what differs - /LICENSE.txt — MIT, for the code and artwork only