# Item 18 — Random sampling and duplicate-search costs (Bitcoin Puzzle #71) **Was a solution found: NO.** No private key was recovered. This workstream measures and models the *cost* of search strategies; it was never intended to find the key. Analysis and small-scale measurement only. Full-scale (2^70) brute force is infeasible on the hardware here. ## 1. Question and assumptions Question: for a brute-force key search of the Puzzle #71 interval, how much more work does **random sampling with replacement** cost versus a **systematic** search (sequential scan, or a random permutation over disjoint sub-ranges), and how much work do **uncoordinated workers** waste re-testing the same keys (duplicate cost)? Target facts used (verified in §2): interval `[0x400000000000000000, 0x7fffffffffffffffff]` = [2^70, 2^71−1], so the keyspace size is M = 2^70 ≈ 1.18e21 candidate keys; address `1PWo3JeB9jrGwfHDNpdGK54CRas7fsVzXU`. Assumptions: (a) the key is uniformly distributed in the interval (the puzzle was generated by truncating a random key, so this is the correct prior — address prefixes carry no information about numerical location); (b) the cost unit is "one candidate tested" = one scalar multiplication / hash160 comparison; (c) workers cannot share intermediate results (stated in the goal), so coordination is only by pre-assigned disjoint ranges, not by a shared bloom filter. ## 2. Sources with dates (checked 2026-11-23 ~07:33 UTC) - Blockstream Esplora API for the puzzle address (queried 2026-11-23 07:33 UTC): `funded_txo_sum = 710196696` sats (≈7.1019 BTC), `spent_txo_count = 0`. The funding output is **unspent** → the puzzle is **UNSOLVED** as of block height tip 977165. A spend would be the key-recovery event; none has occurred. - btcpuzzle.info/puzzle/71 (queried 2026-11-23): lists puzzle 71 as **Unsolved**, upper bound hex `7fffffffffffffffff`, reward `₿ 7.10196696`, wallet `1PWo3JeB9jrGwfHDNpdGK54CRas7fsVzXU`, "33,554,432 ranges". This independently corroborates the interval and reward. - Interval endpoints (2^70 … 2^71−1) are consistent across both the goal brief and the observed reward (7.10196696 BTC matches `funded_txo_sum`). No parameter conflict found. Recipient address `bc1pg6luxm9s4qq65lge4l6ual7xwdw5v85eh675cmrl5we0ht3vpfhswxu0cx` was validated locally: it is a valid **bech32m** P2TR address (witness version 1, 32-byte program; checksum constant 0x2bc830a3 verified). It is the reward recipient, not the target. No funds were moved and nothing was broadcast. ## 3. Method and reproducible code Two layers, so that claims are backed by real elliptic-curve work at small scale and by exact models at large scale. **(a) Real secp256k1 micro-puzzles.** A from-scratch pure-Python secp256k1 (point add/double, scalar mult, compressed hash160) was validated against the known vector: hash160 of the generator (privkey 1, compressed) = `751e76e8199196d454941c45d1b3a323f1433bd6` ✓. Using an 11-bit interval [2^10, 2^11) I ran, over 20 random hidden keys each: (i) a **sequential** scan from the interval start using incremental point addition (+G per step); (ii) **random sampling with replacement**, recomputing a full scalar mult per draw. I recorded tries needed to hit the key, normalized by M=2^10. **(b) Throughput measurement.** Random-scalar keys/s (full `k·G` each) vs sequential keys/s (one `+G` per step) on this CPU, to quantify the *per-candidate* penalty of non-sequential access independent of the statistical penalty. **(c) Exact large-space models** (M=2^16 and coupon/birthday math), separating three regimes: sequential, random *permutation without replacement* (coordinated disjoint ranges), and random *with replacement* (uncoordinated). Coverage of random draws tested against 1−e^(−f) where f = draws/M. All code: `test/scratch/exp.py` (self-contained, `python3 exp.py`); runtime ~18 s. ## 4. Actual tests, hardware, results Hardware: ARM Neoverse-N1, 2 vCPU, Linux; single-threaded pure-Python (no coincurve/GPU available — this is the honest floor, not optimized C/GPU throughput). | Measurement | Result | Theory | |---|---|---| | Random full-scalar `k·G` throughput | **366 keys/s** | — | | Sequential incremental `+G` throughput | **35,438 keys/s** | — | | Per-candidate penalty of random vs sequential access | **96.7×** | large (full mult vs 1 add) | | EC 11-bit, sequential: mean tries | 0.538·M | 0.5·M | | EC 11-bit, random w/ replacement: mean tries | 0.907·M | 1.0·M | | EC 11-bit, random: worst of 20 runs | 3.56·M | heavy tail | | Model M=2^16 sequential: mean / p99 | 0.492·M / 0.99·M | 0.5·M / ~1.0·M | | Model, random permutation (no replacement): mean / p99 | 0.474·M / 0.99·M | 0.5·M / ~1.0·M | | Model, random with replacement: mean / p99 | 1.047·M / 4.76·M | 1.0·M / 4.6·M | **Duplicate / coverage cost** (uncoordinated random draws, fraction f = draws/M): | Draws | Unique coverage | Theory 1−e^(−f) | Duplicate fraction of work wasted | |---|---|---|---| | 0.1·M | 0.095 | 0.095 | 4.7% | | 0.5·M | 0.393 | 0.393 | 21.4% | | 1.0·M | 0.633 | 0.632 | 36.7% | | 2.0·M | 0.866 | 0.865 | 56.7% | | 3.0·M | 0.951 | 0.950 | 68.3% | ### Interpretation 1. **Statistical penalty of sampling with replacement ≈ 2×.** Expected tries to find a uniformly-placed key: sequential/permutation ≈ 0.5·M (you stop halfway on average); random-with-replacement = 1.0·M (geometric distribution, memoryless). Measured 0.907·M and 1.047·M confirm the 2× factor. Random sampling also has a *heavy tail*: p99 ≈ 4.8·M vs ≈1.0·M for systematic — a random searcher can run far past the mean with no guaranteed stop. 2. **Access penalty is separate and larger.** Sequential search reuses the previous point (`P_{i+1}=P_i+G`, one addition), while a random key requires a fresh ~70-double scalar multiplication. Measured ≈97× here. Real BSGS/kangaroo and GPU engines narrow this, but the structural advantage of ordered traversal is real: **random sampling forfeits incremental reuse.** Combined with the 2× statistical factor, naive random-with-replacement is roughly two orders of magnitude worse per expected solution than a well-ordered scan on this setup. 3. **Duplicate cost among uncoordinated workers follows the coupon-collector / Poisson law.** With N independent random draws over M keys, expected unique = M(1−e^(−N/M)); wasted (duplicate) fraction = 1 − (unique/N). At 1·M total draws spread over any number of uncoordinated workers, **~37% of all work is redundant**; to cover 95% of the space you must pay ~3·M draws (68% waste). This waste is independent of worker count — it is inherent to sampling with replacement without shared state. **Pre-assigned disjoint ranges eliminate it entirely** (0% duplicate, 0.5·M expected), which is why pools (e.g. the "33,554,432 ranges" partition on btcpuzzle.info) assign ranges rather than letting workers sample freely. ## 5. Limitations and next step Limitations: measurements are pure-Python single-core and at ≤2^16 scale; absolute keys/s do not represent optimized C/GPU (which would be ~1e6–1e9× faster) — only the *ratios* and the *statistical/duplicate laws* extrapolate to 2^70, and those are exact combinatorial results, not fitted. Even at 1e9 keys/s, 0.5·M ≈ 2^69 ≈ 5.9e20 tries ≈ 1.9e4 years single-machine, so no brute force here is feasible; this item only characterizes relative cost. No pattern or non-uniformity was claimed, so no held-out/multiple-testing correction applies (the uniform prior is the null and the data give no reason to reject it). Concrete next experiment: model a **deterministic pseudo-random permutation** (e.g. a 70-bit block cipher / format-preserving-encryption index map) that gives each worker a collision-free, resumable, verifiably-disjoint stream without any shared state — capturing the 0.5·M expectation and 0% duplicate cost of ranges while keeping the statistical robustness of random order. Measure its per-step overhead against plain `+G` to see if the ~97× access penalty can be amortized. This is the most promising direction; naive random-with-replacement should be rejected for Puzzle #71.