# Z32 frozen route-family calibration The independent recount found **zero exact text–route matches and observed S = 0**. The pinned search reports the same result. The printed-order baseline also has zero exact matches and is excluded from S. ## Frozen inputs and route enumeration The ciphertext is `C9J|#Ok[AMf8?ORTGX6FDVj%HCELzPW9`, as supplied in the task and the upstream result. The ten exact candidate texts appear in the table below and in the runnable code. Their SHA-256 is `f64b62d0764290fe042b908e34ed11d48f9bdd8274c2426d59d4510442f7b8b3` over ASCII text sorted lexicographically and joined with LF, with no trailing LF. The comparison source is the supplied `after-frozen-ten` JSON from `e03-route-family-search/items/frozen-ten/result.json`, available locally at `.imd/reads/artifacts/after-frozen-ten`. Its bytes verified against the pinned SHA-256 `9985817b1982c4f376b7bcd42039909819d93ed40476b158c7404ac8280271bf`. No external sources were used. The upper row carries positions 1–17. For each lower-row offset 0, 1, or 2, positions 18–32 occupy 15 consecutive cells starting at that offset, and the other two cells are blank. From each of the 34 cells, including blank starts, take 34 visits with step `(+1,+2)` or `(+1,-2)`, wrapping row modulo 2 and column modulo 17. Read the current cell before stepping and omit blank cells. The 204 generated walks give **192 distinct full gather permutations**. IDs are one-based in lexicographic gather order. Letter k aligns to the glyph at the kth gathered position. ## Independent match comparison The ciphertext has three doubled glyphs, `C` at positions 1 and 26, `9` at 2 and 32, and `O` at 6 and 14. The other 26 glyphs occur once each. The recount groups assigned letters by glyph for each candidate and route. A doubled glyph contributes one conflict when its two assigned letters differ. Distinct glyphs may map to the same letter. The upstream comparison found **no discrepancies** in generated walk count, deduplicated permutations and route IDs, generator multiplicities, per-text conflict histograms and minimum-route IDs, exact matches, or baseline conflicts and matches. Both counts give zero fitting texts and zero fitting text–route pairs across all 1,920 alignments. The columns 0–3 show the number of routes with that many conflicting glyphs. Each histogram matches the source. | Frozen text | 0 | 1 | 2 | 3 | Printed-order conflicts | |---|---:|---:|---:|---:|---:| | ELEVENINCHESALONGTHETHREERADIANS | 0 | 1 | 28 | 163 | 3 | | FIVERADIANSANDONEINCHALONGTHERAY | 0 | 0 | 16 | 176 | 3 | | FOURRADIANSANDONEINCHALONGTHERAY | 0 | 0 | 16 | 176 | 3 | | ONERADIANANDSIXINCHESALONGTHERAY | 0 | 0 | 12 | 180 | 3 | | ONERADIANANDTENINCHESALONGTHERAY | 0 | 0 | 22 | 170 | 3 | | ONERADIANANDTWOINCHESALONGTHERAY | 0 | 0 | 14 | 178 | 3 | | THREERADIANSANDELEVENINCHESALONG | 0 | 1 | 24 | 167 | 3 | | THREERADIANSANDTWELVEINCHESALONG | 0 | 0 | 18 | 174 | 3 | | TWELVEINCHESALONGTHETHREERADIANS | 0 | 0 | 26 | 166 | 3 | | ZERORADIANSANDONEINCHALONGTHERAY | 0 | 0 | 18 | 174 | 3 | ## Shuffle calibration Each trial shuffles a fresh list of the original glyphs with one advancing Python `random.Random(32003)`. All glyph multiplicities were checked after each shuffle. Every text is tested for a fit anywhere in the family against the same shuffled list for that trial. S counts each fitting text once, including when it fits multiple routes. For speed, the simulation uses the inverse gather to look up the letters at each doubled glyph's two positions. Checking these three equalities is equivalent to the direct glyph-group recount because every other glyph occurs once. | Null S | Trials | |---:|---:| | 0 | 14,626 | | 1 | 3,314 | | 2 | 1,021 | | 3 | 808 | | 4 | 170 | | 5 | 38 | | 6 | 17 | | 7 | 5 | | 8 | 1 | | 9 | 0 | | 10 | 0 | | **Total** | **20,000** | - Estimated **Pr(S > 0) = 5,374 / 20,000 = 0.26870**. The binomial Monte Carlo standard error is **0.00313**, about 0.31 percentage points. The approximate 95% Wilson interval is **[0.26260, 0.27489]**. - Observed **S = 0**. All 20,000 trials have S at least as large as observed, so the specified plus-one upper tail is **(1 + 20,000) / 20,001 = 1**. Since S is nonnegative by definition, the tail at this threshold is identically one. ## Interpretation An exact fit somewhere in this frozen family and vocabulary occurs in roughly one quarter of multiplicity-preserving shuffles. The real glyph order yields no exact fit for these choices. The calibration applies only to this particular union of routes and texts. Past searches, alternate wording, and other routes are outside its scope. The shuffle frequency cannot estimate the probability that the encipherer intended any candidate. A fit would establish compatibility with the tested constraints alone, so it would require further evidence to support a decipherment. ## Reproduction Save the block as `family.py` and run `python3 family.py`. To repeat the upstream comparisons, pass the pinned JSON as the sole argument. The numerical results run directly from the embedded inputs. ```python from collections import Counter, defaultdict from hashlib import sha256 from itertools import product from math import sqrt from pathlib import Path import json import random import sys CIPHER = 'C9J|#Ok[AMf8?ORTGX6FDVj%HCELzPW9' TEXTS = ( 'ELEVENINCHESALONGTHETHREERADIANS', 'FIVERADIANSANDONEINCHALONGTHERAY', 'FOURRADIANSANDONEINCHALONGTHERAY', 'ONERADIANANDSIXINCHESALONGTHERAY', 'ONERADIANANDTENINCHESALONGTHERAY', 'ONERADIANANDTWOINCHESALONGTHERAY', 'THREERADIANSANDELEVENINCHESALONG', 'THREERADIANSANDTWELVEINCHESALONG', 'TWELVEINCHESALONGTHETHREERADIANS', 'ZERORADIANSANDONEINCHALONGTHERAY', ) INPUT_DIGEST = "9985817b1982c4f376b7bcd42039909819d93ed40476b158c7404ac8280271bf" VOCAB_DIGEST = "f64b62d0764290fe042b908e34ed11d48f9bdd8274c2426d59d4510442f7b8b3" TRIALS = 20_000 def enumerate_routes(): counts = Counter() for offset, row, col, step in product(range(3), range(2), range(17), (-2, 2)): positions = [] for visit in range(34): r = (row + visit) % 2 c = (col + visit * step) % 17 if r == 0: positions.append(c) elif offset <= c < offset + 15: positions.append(17 + c - offset) assert sorted(positions) == list(range(32)) counts[tuple(positions)] += 1 return counts def conflicts(text, gathered): letters_by_glyph = defaultdict(set) for glyph, letter in zip(gathered, text): letters_by_glyph[glyph].add(letter) return sum(len(letters) > 1 for letters in letters_by_glyph.values()) def score_rows(routes): orders = ["".join(CIPHER[p] for p in route) for route in routes] rows, matches = [], [] for text in TEXTS: scores = [conflicts(text, order) for order in orders] best = min(scores) rows.append({ "text": text, "minConflicts": best, "routesAtMin": [i for i, score in enumerate(scores, 1) if score == best], "conflictHistogram": {str(k): v for k, v in Counter(scores).items()}, "baselineConflicts": conflicts(text, CIPHER), }) matches.extend({"text": text, "routeId": i} for i, score in enumerate(scores, 1) if score == 0) return rows, matches def check_source(path, counts, routes, rows, matches): raw = Path(path).read_bytes() assert sha256(raw).hexdigest() == INPUT_DIGEST source = json.loads(raw) assert source["ciphertext"] == CIPHER and tuple(source["vocabulary"]) == TEXTS assert source["vocabularyDigest"]["value"] == VOCAB_DIGEST assert source["generatedRouteCount"] == sum(counts.values()) assert [(p["id"], tuple(x - 1 for x in p["perm"]), p["generators"]) for p in source["permutations"]] == [ (i, route, counts[route]) for i, route in enumerate(routes, 1)] assert source["perTextConflictCounts"] == rows assert source["matches"] == matches assert source["matchingPairCount"] == len(matches) assert source["distinctMatchingTextCount"] == len({m["text"] for m in matches}) assert source["baseline"]["inRouteFamily"] == (tuple(range(32)) in counts) assert source["baseline"]["conflicts"] == [ {"text": row["text"], "conflicts": row["baselineConflicts"]} for row in rows] assert source["baseline"]["exactMatches"] == [ row["text"] for row in rows if row["baselineConflicts"] == 0] print("Pinned input comparisons passed") def inverse(route): index = [0] * len(route) for k, p in enumerate(route): index[p] = k return index def pair_positions(glyphs, doubled): positions = {glyph: [] for glyph in doubled} for p, glyph in enumerate(glyphs): if glyph in positions: positions[glyph].append(p) return tuple(tuple(pair) for pair in positions.values()) def matching_texts(pairs, inverses): return { text for text in TEXTS if any(all(text[index[a]] == text[index[b]] for a, b in pairs) for index in inverses) } def main(): assert len(CIPHER) == 32 and all(len(text) == 32 for text in TEXTS) assert len(set(TEXTS)) == len(TEXTS) == 10 assert sha256("\n".join(sorted(TEXTS)).encode("ascii")).hexdigest() == VOCAB_DIGEST counts = enumerate_routes() routes = sorted(counts) rows, matches = score_rows(routes) if len(sys.argv) > 1: check_source(sys.argv[1], counts, routes, rows, matches) print("Generated, distinct:", sum(counts.values()), len(routes)) print("Text, histogram at 0/1/2/3, minimum route IDs, baseline conflicts:") for row in rows: print(row["text"], [row["conflictHistogram"].get(str(k), 0) for k in range(4)], row["routesAtMin"], row["baselineConflicts"]) print("Observed matching pairs:", matches) observed_texts = {match["text"] for match in matches} observed = len(observed_texts) multiplicities = Counter(CIPHER) assert sorted(multiplicities.values()) == [1] * 26 + [2] * 3 doubled = sorted(glyph for glyph, count in multiplicities.items() if count == 2) inverses = [inverse(route) for route in routes] assert matching_texts(pair_positions(CIPHER, doubled), inverses) == observed_texts rng = random.Random(32003) histogram = Counter() for _ in range(TRIALS): glyphs = list(CIPHER) rng.shuffle(glyphs) assert Counter(glyphs) == multiplicities pairs = pair_positions(glyphs, doubled) histogram[len(matching_texts(pairs, inverses))] += 1 assert sum(histogram.values()) == TRIALS print("Observed S:", observed) print("Histogram:", {s: histogram[s] for s in range(len(TEXTS) + 1)}) hits = TRIALS - histogram[0] p = hits / TRIALS se = sqrt(p * (1 - p) / TRIALS) z = 1.96 denominator = 1 + z**2 / TRIALS center = (p + z**2 / (2 * TRIALS)) / denominator half_width = z * sqrt(se**2 + z**2 / (4 * TRIALS**2)) / denominator print("Pr(S > 0):", p, "MC SE:", se, "95% Wilson:", (center-half_width, center+half_width)) at_least = sum(count for s, count in histogram.items() if s >= observed) print("At least observed:", at_least, "plus-one upper tail:", (1 + at_least)/(TRIALS + 1)) if __name__ == "__main__": main() ```