Summary
We attack the 3/4 Conjecture for binary fix-free codes on two fronts: (i) breaking Yekhanin's 2004 general Kraft-sum threshold of $5/8 = 0.625$ via new deterministic overlap and multi-bit border-partition techniques, and (ii) extending Ye–Yeung's 2001 exhaustive computer verification beyond maximum length $L = 7$. Analytically, we prove three new self-contained theorems that beat $5/8$ (and in one regime prove the full $3/4$ Conjecture and even $K \to 1$): a Harris–Kleitman first-length threshold theorem (which in particular proves $K \le 81/128 = 0.6328125$ for all profiles with minimum length $\lambda \le 3$), a $2^r$-bit border-matrix theorem proving the full $3/4$ Conjecture ($K \le 1581/2048 \approx 0.77197$) whenever $\max_l (n_l 2^{-l}) \le 2^{-13}$, and a theorem breaking $5/8$ ($K \le 10241/16384 \approx 0.625061$) for all profiles whose consecutive distinct lengths satisfy $l_{i+1} \ge l_i + 2$. Computationally, we exhaustively verify the $3/4$ Conjecture for all $L \le 9$ — independently verifying from scratch all $161{,}046$ profiles at $L = 8$ and all $5{,}724{,}394$ profiles at $L = 9$ (with zero counterexamples) — plus $2{,}532$ targeted hardest profiles at $L = 10$.
Approach
Our analytical investigation began by reconstructing Yekhanin's $5/8$ bound through the four 1-bit endpoint quadrants $$Q_{ab}(l) = \{w \in \{0,1\}^l : w_1 = a,\; w_l = b\} \qquad (a, b \in \{0,1\},\; l \ge 2).$$ Placing an initial prefix of sorted codewords with Kraft sum $x_1$ inside $Q_{00}$, then filling the unblocked portions of $Q_{01}$ and $Q_{10}$ (which do not interact with one another), and finally filling $Q_{11}$, yields a general reduction: if $x_1 \in (0, 1/2]$ can be realized inside $Q_{00}$, then the entire length profile succeeds up to $K \le \frac{1}{2} + \frac{1}{2} x_1$ (with zero discrete rounding loss). Setting $x_1 = 1/4$ recovers $5/8$.
Crucially, Kraft's inequality inside $Q_{00}$ permits $x_1$ up to $1/2$ (not $1/4$!), because each codeword in $Q_{00}$ only prefix-blocks half of its descendants inside $Q_{00}$ and suffix-blocks half inside $Q_{00}$. Exceeding $x_1 = 1/4$ requires exploiting one of two mechanisms:
- Correlation overlap via the Harris–Kleitman inequality: Choosing the shortest (or first heavy) length layer inside $Q_{00}$ to be downward-closed in the Boolean hypercube $\{0,1\}^{l-2}$ (e.g., smallest Hamming weight) makes both its prefix-blocked and suffix-blocked sets downward-closed at every greater length $m > l$, guaranteeing overlap density $\ge \alpha^2$ at every $m > l$ simultaneously.
- Multi-bit border over-blocking: Refining $Q_{00}$ into its four 2-bit border sub-boxes $B_{11} = 01\{0,1\}^*10$, $B_{01} = 00\{0,1\}^*10$, $B_{10} = 01\{0,1\}^*00$, $B_{00} = 00\{0,1\}^*00$ (or refining all of $\{0,1\}^*$ into $N \times N$ boxes $Q_{u,v} = u\{0,1\}^*v$ with $N = 2^r$) cuts the intra-box self-blocking factor from $1$ down to $2/N$. Retiring early boxes once they are over-blocked creates strictly positive net bonus capacity using pure union bounds and zero overlap estimates.
For the computational search beyond $L = 7$, we use the monotonicity reduction that every profile with $K < 3/4$ is dominated by one with $K = 3/4$ (adding length-$L$ words), and a code $C_{<L}$ of lengths $< L$ realizes $(n_1, \dots, n_L)$ iff its unblocked count at length $L$ is at least $n_L$. Traversing $(n_1, \dots, n_{L-1})$ in a shared prefix tree with incremental bitmask greedy updates, backed by a multi-strategy fallback suite and an exact complete branch-and-bound solver (plus an independent from-scratch verifier), verifies millions of profiles in seconds.
Claims
- [proved] (Exact 4-Quadrant Master Lemma and Harris–Kleitman First-Length Threshold) Let $(n_1, \dots, n_L)$ be any binary length profile with $a_l = n_l 2^{-l}$, Kraft sum $K = \sum_{l=1}^L a_l$, and minimum length $\lambda = \min\{l : n_l > 0\}$. - (Master Lemma) If $n_1 = 0$ and an initial prefix of the sorted codeword list with Kraft sum $x_1 \in (0, 1/2]$ can be realized as a fix-free code inside $Q_{00}$, then the entire profile admits a binary fix-free code whenever $K \le \frac{1}{2} + \frac{1}{2} x_1$. - (First-Length Threshold) If $\lambda \ge 2$ and $\alpha = a_\lambda$: - For $\alpha \in (0, 1/4]$, $K \le \frac{5}{8} + \frac{1}{2}\alpha^2$ suffices. - For $\alpha \in [1/4, 1/2]$, $K \le \max\!\left(\frac{21}{32} - \frac{1}{8}(\alpha - \frac{1}{4}),\; \frac{39}{64} + \frac{5}{16}(\alpha - \frac{1}{4})\right) \ge \frac{9}{14} \approx 0.642857$ suffices. - For $\alpha \in [1/2, 3/4]$, $K \le \frac{11}{16} = 0.6875$ suffices (self-contained proof; $3/4$ is already known via Yekhanin 2001 / Schnettler 2007). - (Corollary: $\lambda \le 3$) Every binary length profile with $\lambda \in \{1, 2, 3\}$ admits a binary fix-free code whenever $K \le \frac{81}{128} = 0.6328125$. - (Perturbed Heavy Length) More generally, if any length $k \ge 2$ has prior Kraft sum $s = \sum_{l < k} a_l$ with $s + a_k \le 1/4$ and $a_k^2 > s$, then $K \le \frac{5}{8} + \frac{1}{2}(a_k^2 - s)$ suffices.
- [proved] (Full $3/4$ Conjecture and $K \to 1$ for Uniformly Spread-Out Profiles via $2^r$-Bit Border Partitions) Let $r \ge 2$, $N = 2^r$, and $\theta = 2^{-t}$ with $t \ge 2r$. For any binary length profile satisfying $\max_l (n_l 2^{-l}) \le \theta$, a deterministic phase-based lexicographic packing across the $N^2$ border boxes $Q_{u,v} = u\{0,1\}^*v$ ($u, v \in \{0,1\}^r$) succeeds whenever $K \le C(r, \theta)$, where $C(r, \theta)$ is the exact sum of the discrete-rounded recurrence $X_{i,j} = \theta \cdot \lfloor \frac{N}{2\theta} \max(0,\; N^{-2} - N^{-1}(R_i + C_j) - (2r - 1)\theta) \rfloor$. In particular: - For $r = 2$, $\max_l (n_l 2^{-l}) \le 2^{-9}$ suffices for $K \le \frac{21}{32} = 0.65625$ (ideal limit as $\theta \to 0$ is $\frac{93}{128} = 0.7265625$). - For $r = 3$, $\max_l (n_l 2^{-l}) \le 2^{-13}$ suffices for $K \le \frac{1581}{2048} \approx 0.77197 > \frac{3}{4}$ (ideal limit $\frac{26333}{32768} \approx 0.80362$), establishing the full $3/4$ Conjecture for all profiles with uniformly bounded per-length Kraft weight $\le 2^{-13}$. - For $r = 4$, $\max_l (n_l 2^{-l}) \le 2^{-15}$ suffices for $K \le \frac{6659}{8192} \approx 0.81287 > \frac{4}{5}$ (ideal limit $\approx 0.86005$), and $\lim_{\theta \to 0} \sup_r C(r, \theta) = 1$.
- [proved] (Breaking $5/8$ for All Gap-$\ge 2$ Profiles) Let $(n_1, \dots, n_L)$ be any binary length profile whose consecutive distinct lengths satisfy $l_{i+1} \ge l_i + 2$ (no two consecutive lengths both appear). Then a binary fix-free code exists whenever $$K \le \frac{10241}{16384} = \frac{5}{8} + \frac{1}{16384} \approx 0.625061035.$$
- [proved] (Exhaustive Verification of the $3/4$ Conjecture for All $L \le 9$) Every binary length profile with $K \le 3/4$ and maximum length $L \le 9$ admits a binary fix-free code. Specifically, our C++20 solver (
code/verify_L8_L9.cpp) constructs and independently verifies from scratch a valid binary fix-free code for all $7{,}658$ exact-$3/4$ profiles at $L = 7$ ($4{,}702$ uncovered by known theorems), all $161{,}046$ profiles at $L = 8$ ($131{,}554$ uncovered), and all $5{,}724{,}394$ profiles at $L = 9$ ($5{,}229{,}853$ uncovered) — $5{,}893{,}790$ profiles total for $L \le 9$, with $0$ counterexamples. In addition, code/hunt_L10.cpp constructs and independently verifies valid binary fix-free codes for $2{,}532$ targeted hardest uncovered $K = 3/4$ profiles at $L = 10$.
- [conjectural] (Unconditional $c > 5/8$ via Multi-Order 16-Box Union-Bound Packing) Over $1.44 \times 10^6$ simulated-annealing adversarial steps (
code/adversary_16box.cpp, $m \le 35$ lengths, arbitrary gaps in $\{1, 2\}$), the maximum Kraft sum achievable by just two fixed priority orders of the 16 2-bit border boxes (ord_quad and ord_slex) never dropped below $0.627014$ (and six fixed orders never dropped below $0.631270$), while the hybrid of Claim 1's Harris–Kleitman bound with a single 16-box order (ord_clean) never dropped below $0.628845$. We conjecture that a finite set of 16-box union-bound priority orders (or their hybrid with Claim 1) unconditionally establishes a general threshold $c > 5/8$ for all binary length profiles without the gap-$\ge 2$ restriction.
Details
Notation and Preliminaries
For $l \ge 2$ and $a, b \in \{0, 1\}$, define the 1-bit endpoint quadrants $$Q_{ab}(l) = \{w \in \{0,1\}^l : w_1 = a,\; w_l = b\}, \qquad |Q_{ab}(l)| = 2^{l-2}.$$ A codeword $c \in Q_{ab}(k)$ blocks at length $l > k$:
- $2^{l - k - 1}$ words as a prefix in each of $Q_{a0}(l)$ and $Q_{a1}(l)$ (and $0$ in $Q_{\bar a 0}(l), Q_{\bar a 1}(l)$);
- $2^{l - k - 1}$ words as a suffix in each of $Q_{0b}(l)$ and $Q_{1b}(l)$ (and $0$ in $Q_{0\bar b}(l), Q_{1\bar b}(l)$).
In particular, inside any single quadrant $Q_{ab}$, each earlier codeword $c \in Q_{ab}(k)$ blocks at most $2^{l-k-1} + 2^{l-k-1} = 2^{l-k}$ words of $Q_{ab}(l)$. Therefore, if a subset $U_{ab}(l) \subset Q_{ab}(l)$ of unblocked words satisfies $|U_{ab}(l)| \ge D \cdot 2^l$ for all $l \ge k^*$, then greedy assignment in non-decreasing length order inside $U_{ab}$ succeeds for any multiset of lengths $\ge k^*$ with Kraft sum at most $D$.
1. Proof of Claim 1 (4-Quadrant Master Lemma & Harris–Kleitman First-Length Threshold)
1.1 Proof of the Exact Discrete 4-Quadrant Master Lemma
Suppose $n_1 = 0$, and let $C_1 \subset Q_{00}$ realize an initial prefix of the sorted codeword list (all codewords of lengths $< k^*$ and some subset of length $k^*$) with total Kraft sum $x_1 = x_1^- + x_1^= \in (0, 1/2]$, where $x_1^-$ is the Kraft sum of words in $C_1$ of length $< k^*$ and $x_1^=$ is the Kraft sum of words in $C_1$ of length $k^*$. Let $D = \frac{1}{4} - \frac{1}{2} x_1$.
For every $l > k^*$, $C_1$ prefix-blocks exactly $\frac{1}{2} x_1 2^l$ words of $Q_{01}(l)$ and suffix-blocks $0$ words of $Q_{01}(l)$, leaving $|U_{01}(l)| = D \cdot 2^l$. At $l = k^*$, words of length $k^*$ in $C_1$ do not block $Q_{01}(k^*)$, so $|U_{01}(k^*)| = (\frac{1}{4} - \frac{1}{2} x_1^-) 2^{k^*}$. Symmetrically, $|U_{10}(l)| = D \cdot 2^l$ for $l > k^*$ and $|U_{10}(k^*)| = (\frac{1}{4} - \frac{1}{2} x_1^-) 2^{k^*}$. Moreover, $Q_{01}$ and $Q_{10}$ do not interact at all (opposite first and last bits).
Since every codeword in $C_1$ has length $\le k^*$, $x_1$ is an integer multiple of $2^{-k^*}$, so $D = \frac{1}{4} - \frac{1}{2} x_1$ is an integer multiple of $2^{-(k^*+1)}$. We assign remaining codewords in non-decreasing length order:
- Filling $U_{01}$: Pack codewords greedily into $U_{01}$ until either all codewords are placed or the next codeword would exceed $D$. Let $x_2 \le D$ be the weight placed. - If the next unplaced codeword has length $l \ge k^* + 1$, its weight $2^{-l}$ divides $2^{-(k^*+1)}$, which divides $D$. By induction on the remaining capacity $D - \sum w_i$, the sum cannot jump over $D$; hence $x_2 = D$ exactly. - If the next unplaced codeword has length $k^*$, then all words placed in $U_{01}$ so far also have length $k^*$, so $x_2$ is an integer multiple of $2^{-k^*}$. If $x_2 < D$, then $D - x_2 = 2^{-(k^*+1)}$ (so $x_1$ is an odd multiple of $2^{-k^*}$, hence $x_1^= \ge 2^{-k^*}$). Then $\frac{1}{4} - \frac{1}{2} x_1^- \ge \frac{1}{4} - \frac{1}{2}(x_1 - 2^{-k^*}) = D + 2^{-(k^*+1)} = x_2 + 2^{-k^*}$. Thus we place this one additional length-$k^*$ codeword into $U_{01}(k^*)$ (reaching $x_2' = D + 2^{-(k^*+1)}$) and immediately retire $U_{01}$ (never placing any length $> k^*$ word in $U_{01}$). In all cases, we reach $x_2 \in \{D,\; D + 2^{-(k^*+1)}\}$ (unless all codewords are already placed).
- Filling $U_{10}$: By the identical procedure, we place $x_3 \in \{D,\; D + 2^{-(k^*+1)}\}$ into $U_{10}$ (unless all codewords are already placed).
- Filling $U_{11}$: For every $l > k^*$, $C_1$ blocks $0$ words of $Q_{11}(l)$, $C_2 \subset Q_{01}$ suffix-blocks at most $\frac{1}{2} x_2 2^l$ words, and $C_3 \subset Q_{10}$ prefix-blocks at most $\frac{1}{2} x_3 2^l$ words. At $l = k^*$, words of length $k^*$ in $C_2, C_3$ do not block $Q_{11}(k^*)$, so $|U_{11}(k^*)| = 2^{k^*-2} \ge (\frac{1}{4} - \frac{1}{2} x_2 - \frac{1}{2} x_3) 2^{k^*}$. Note that $\frac{1}{4} - \frac{1}{2} x_2 - \frac{1}{2} x_3 \ge \frac{1}{4} - D - 2^{-(k^*+1)} = \frac{1}{2} x_1 - 2^{-(k^*+1)} \ge 0$ (since $x_1 \ge 2^{-k^*}$). Thus greedy packing inside $U_{11}$ accommodates Kraft sum $x_4 = \frac{1}{4} - \frac{1}{2} x_2 - \frac{1}{2} x_3$.
Summing all four quadrants, the total realizable Kraft sum is $$x_1 + x_2 + x_3 + \left(\frac{1}{4} - \frac{1}{2} x_2 - \frac{1}{2} x_3\right) = x_1 + \frac{1}{4} + \frac{1}{2}(x_2 + x_3) \ge x_1 + \frac{1}{4} + D = \frac{1}{2} + \frac{1}{2} x_1. \qquad \square$$
1.2 Proof of the Harris–Kleitman Overlap Lemma and First-Length Threshold
Recall the Harris–Kleitman inequality (Harris 1960; Kleitman 1966): if $\mathcal{A}, \mathcal{B} \subseteq \{0, 1\}^d$ are both downward-closed (i.e., $u \in \mathcal{A}$ and $v \le u$ coordinatewise implies $v \in \mathcal{A}$), then $|\mathcal{A} \cap \mathcal{B}| \cdot 2^d \ge |\mathcal{A}| \cdot |\mathcal{B}|$.
Lemma (Downward-Closed $Q_{00}$-Overlap). Let $k \ge 2$, and let $D \subseteq Q_{00}(k)$ be a downward-closed subset under the identification $Q_{00}(k) \cong \{0, 1\}^{k-2}$ (e.g., the $|D|$ words of smallest Hamming weight in $Q_{00}(k)$). Let $\alpha = |D| 2^{-k} \le 1/4$. Then for every $m > k$, $$|P(D, Q_{00}(m)) \cap S(D, Q_{00}(m))| \ge \alpha^2 \cdot 2^m.$$
Proof. Identify $Q_{00}(m)$ with $\{0, 1\}^{m-2}$ via $w = 0 x_2 x_3 \dots x_{m-1} 0$. Then $w \in P(D, Q_{00}(m))$ iff $x_k = 0$ and $(x_2, \dots, x_{k-1}) \in D$. Flipping any $1$ in $(x_2, \dots, x_{m-1})$ to $0$ preserves $x_k = 0$ and preserves $(x_2, \dots, x_{k-1}) \in D$ (since $D$ is downward-closed). Thus $P(D, Q_{00}(m))$ is downward-closed in $\{0, 1\}^{m-2}$, and symmetrically $S(D, Q_{00}(m))$ is downward-closed in $\{0, 1\}^{m-2}$. Moreover, $|P(D, Q_{00}(m))| = |S(D, Q_{00}(m))| = |D| \cdot 2^{m - k - 1} = 2\alpha \cdot 2^{m-2}$. By the Harris–Kleitman inequality on $\{0, 1\}^{m-2}$, $$|P(D, Q_{00}(m)) \cap S(D, Q_{00}(m))| \ge (2\alpha)(2\alpha) \cdot 2^{m-2} = \alpha^2 \cdot 2^m. \qquad \square$$
Integer Ceiling Trick (Zero Rounding Loss in $U_{00}$). Suppose we have already placed $C_{\le k} \subset Q_{00}$ with Kraft sum $x_{\le k} \le 1/4$ such that for every $m > k$, $|U_{00}(m)| \ge (\frac{1}{4} - x_{\le k} + \gamma) 2^m$ for some $\gamma > 0$. Greedily assign subsequent codewords of lengths $m > k$ into $U_{00}$ until the first length $m^*$ where the cumulative Kraft sum reaches or exceeds $\frac{1}{4} + \gamma$ (if this never happens, all codewords fit in $Q_{00}$ and we are done). At every $m \in (k, m^*)$, the cumulative weight $x_{1, < m} + a_m < \frac{1}{4} + \gamma$, while the number of available words in $U_{00}(m)$ is at least $$\mathrm{avail}(m) \ge |U_{00}(m)| - \sum_{c \in C_1,\; k < |c| < m} 2^{m - |c|} \ge \left(\frac{1}{4} - x_{1, < m} + \gamma\right) 2^m > n_m,$$ so all $n_m$ words fit. At length $m^*$, $\mathrm{avail}(m^*)$ is an integer satisfying $\mathrm{avail}(m^*) \ge (\frac{1}{4} - x_{1, < m^*} + \gamma) 2^{m^*}$, hence $$\mathrm{avail}(m^*) \ge \left\lceil \left(\frac{1}{4} - x_{1, < m^*} + \gamma\right) 2^{m^*} \right\rceil.$$ Since $x_{1, < m^*} + n_{m^*} 2^{-m^*} \ge \frac{1}{4} + \gamma$, we have $n_{m^*} \ge \lceil (\frac{1}{4} - x_{1, < m^*} + \gamma) 2^{m^*} \rceil$. Placing exactly $r = \lceil (\frac{1}{4} - x_{1, < m^*} + \gamma) 2^{m^*} \rceil$ words of length $m^*$ into $U_{00}(m^*)$ yields a total Kraft sum in $Q_{00}$ of $$x_1 = x_{1, < m^*} + r \cdot 2^{-m^*} \ge \frac{1}{4} + \gamma$$ with zero discrete rounding loss. (Note also $x_1 \le \frac{1}{4} + \gamma + 2^{-m^*} \le \frac{1}{2}$ since $m^* \ge k + 1 \ge 3$ and $\gamma \le 1/16$.) Applying the 4-Quadrant Master Lemma immediately yields $K \le \frac{1}{2} + \frac{1}{2} x_1 \ge \frac{5}{8} + \frac{1}{2}\gamma$.
Now we complete the three regimes of Claim 1:
- Regime $\alpha = a_\lambda \in (0, 1/4]$ (and Perturbed Heavy Length $s + a_k \le 1/4$): For the first length $\lambda$ ($s = 0$), choose $C_\lambda \subset Q_{00}(\lambda)$ downward-closed of size $n_\lambda$. By inclusion-exclusion and the Downward-Closed Overlap Lemma, for every $m > \lambda$: $$|U_{00}(m)| = 2^{m-2} - 2\alpha 2^{m-2} - 2\alpha 2^{m-2} + |P \cap S| \ge \left(\frac{1}{4} - \alpha + \alpha^2\right) 2^m.$$ By the Integer Ceiling Trick ($\gamma = \alpha^2$) and the 4-Quadrant Master Lemma, $K \le \frac{5}{8} + \frac{1}{2}\alpha^2$ suffices.
More generally, for any length $k$ with prior Kraft sum $s = \sum_{l < k} a_l$ and $s + a_k \le 1/4$: place $C_{<k}$ greedily in $Q_{00}$, let $R = Q_{00}(k) \setminus U_{00}(k)$ (so $|R| \le s 2^k$), choose a downward-closed set $D \subseteq Q_{00}(k)$ of size $n_k + |R| \le (a_k + s) 2^k \le 2^{k-2}$, and select $C_k \subseteq D \cap U_{00}(k)$ of size $n_k$. Since $|D \setminus C_k| = |R| \le s 2^k$, for every $m > k$: $$|P(C_{\le k}) \cap S(C_{\le k})| \ge |P(C_k) \cap S(C_k)| \ge |P(D) \cap S(D)| - |P(D \setminus C_k)| - |S(D \setminus C_k)| \ge \left(\frac{|D|}{2^k}\right)^2 2^m - s 2^m \ge (a_k^2 - s) 2^m.$$ Thus $|U_{00}(m)| \ge (\frac{1}{4} - (s + a_k) + (a_k^2 - s)) 2^m$ for every $m > k$. Whenever $a_k^2 > s$, the Integer Ceiling Trick + Master Lemma yield $K \le \frac{5}{8} + \frac{1}{2}(a_k^2 - s)$.
- Regime $\alpha = a_\lambda \in (1/4, 1/2]$: Write $\beta = \alpha - \frac{1}{4} \in (0, 1/4]$. Place all $2^{\lambda-2}$ words of $Q_{00}(\lambda)$ into $C_\lambda \cap Q_{00}$, and place the remaining $\beta 2^\lambda$ words of length $\lambda$ into a downward-closed subset $B \subset Q_{01}(\lambda)$ (smallest Hamming weight in positions $2, \dots, \lambda-1$). Let $S = Q_{01}(\lambda) \setminus B$, which is upward-closed of size $(\frac{1}{4} - \beta) 2^\lambda$. For any $m > \lambda$, a word $w \in Q_{00}(m)$ is unblocked by $Q_{00}(\lambda) \cup B$ iff its length-$\lambda$ prefix lies in $S$ (which automatically fixes $w_\lambda = 1$) AND its length-$\lambda$ suffix does not lie in $Q_{00}(\lambda)$ (i.e., $w_{m - \lambda + 1} = 1$; note $B \subset Q_{01}$ ends in $1$ and never suffix-blocks $Q_{00}$). - If $m \ge 2\lambda$: position $m - \lambda + 1 > \lambda$ is independent of the length-$\lambda$ prefix, giving $|U_{00}(m)| = |S| \cdot 2^{m - \lambda - 2} = (\frac{1}{16} - \frac{1}{4}\beta) 2^m$. - If $m = 2\lambda - 1$: $m - \lambda + 1 = \lambda$ is already $1$ on $S$, giving $|U_{00}(m)| = (\frac{1}{8} - \frac{1}{2}\beta) 2^m$. - If $\lambda + 1 \le m \le 2\lambda - 2$: position $j = m - \lambda + 1 \in \{2, \dots, \lambda - 1\}$. Because $S$ is upward-closed, flipping bit $j$ from $0$ to $1$ maps $\{s \in S : s_j = 0\}$ injectively into $\{s \in S : s_j = 1\}$, so $|\{s \in S : s_j = 1\}| \ge \frac{1}{2}|S|$, giving $|U_{00}(m)| \ge \frac{1}{2}|S| \cdot 2^{m-\lambda-1} = (\frac{1}{16} - \frac{1}{4}\beta) 2^m$. Thus $|U_{00}(m)| \ge y_0 2^m$ for all $m > \lambda$, where $y_0 = \frac{1}{16} - \frac{1}{4}\beta$. By the Integer Ceiling Trick, we pack $y \ge y_0$ into $U_{00}$ at lengths $> \lambda$ (total $x_1 = \frac{1}{4} + y$ in $Q_{00}$). Next, pack $x_2' = \max(0, \frac{1}{4} - \frac{1}{2} x_1 - \beta)$ into $U_{01}$ (total $x_2 = \beta + x_2' = \max(\beta, \frac{1}{8} - \frac{1}{2} y)$ in $Q_{01}$), $x_3 = \frac{1}{8} - \frac{1}{2} y$ into $U_{10}$, and $x_4 = \frac{1}{4} - \frac{1}{2} x_2 - \frac{1}{2} x_3$ into $U_{11}$ (exact discrete hitting since all lengths $> \lambda$ and $\beta, y$ are dyadic multiples at the stopping length, with the same half-step allowance at the stopping length as in Lemma A). The total realizable Kraft sum is $$x_1 + \frac{1}{4} + \frac{1}{2} x_2 + \frac{1}{2} x_3 = \frac{9}{16} + \frac{3}{4} y + \frac{1}{2}\max\!\left(\beta,\; \frac{1}{8} - \frac{1}{2} y\right) = \max\!\left(\frac{5}{8} + \frac{1}{2} y,\; \frac{9}{16} + \frac{1}{2}\beta + \frac{3}{4} y\right).$$ Since both arguments are increasing in $y \ge y_0 = \frac{1}{16} - \frac{1}{4}\beta$, substituting $y = y_0$ gives $$K_{\text{cap}}(\beta) \ge \max\!\left(\frac{21}{32} - \frac{1}{8}\beta,\; \frac{39}{64} + \frac{5}{16}\beta\right),$$ whose minimum over $\beta \in [0, 1/4]$ occurs at $\beta = 3/28$, yielding $K_{\text{cap}} \ge \frac{9}{14} \approx 0.642857$.
- Regime $\alpha = a_\lambda \in [1/2, 3/4]$: Place $Q_{00}(\lambda)$ (weight $1/4$), $Q_{01}(\lambda)$ (weight $1/4$), and $\alpha - 1/2$ in $Q_{10}(\lambda)$. For every $l > \lambda$, $Q_{00}(\lambda)$ suffix-blocks $\frac{1}{8}$ of $Q_{10}(l)$ and the $\alpha - \frac{1}{2}$ words in $Q_{10}(\lambda)$ block $\alpha - \frac{1}{2}$ inside $Q_{10}(l)$, leaving density $\max(0, \frac{5}{8} - \alpha)$ in $U_{10}(l)$ (an integer multiple of $2^{-(\lambda+1)}$, hit exactly by lengths $\ge \lambda + 1$). Thus total weight placed in $Q_{10}$ is $x_3 = \max(\alpha - \frac{1}{2}, \frac{1}{8})$. Then $Q_{01}(\lambda)$ suffix-blocks $\frac{1}{8}$ of $Q_{11}(l)$ and $Q_{10}$ prefix-blocks $\frac{1}{2} x_3$ of $Q_{11}(l)$, leaving density $\frac{1}{8} - \frac{1}{2} x_3$ in $U_{11}(l)$. Summing all four quadrants yields $$K_{\text{cap}}(\alpha) = \frac{1}{2} + x_3 + \left(\frac{1}{8} - \frac{1}{2} x_3\right) = \frac{5}{8} + \frac{1}{2} x_3 = \begin{cases} \frac{11}{16} & \text{if } \alpha \in [\frac{1}{2}, \frac{5}{8}], \\ \frac{3}{8} + \frac{1}{2}\alpha \ge \frac{11}{16} & \text{if } \alpha \in [\frac{5}{8}, \frac{3}{4}]. \end{cases}$$
- Corollary ($\lambda \le 3$): - If $\lambda = 1$, $n_1 = 1$ gives $K \le 3/4$ (Yekhanin 2004). - If $\lambda = 2$, $\alpha \ge 1/4$ gives $K \le \min(21/32, 9/14, 11/16) = 9/14$. - If $\lambda = 3$, $\alpha \ge 1/8$; for $n_3 = 1$ ($\alpha = 1/8$), Regime 1 gives $K \le \frac{5}{8} + \frac{1}{2}(1/8)^2 = \frac{81}{128} = 0.6328125$; for $n_3 \ge 2$ ($\alpha \ge 1/4$), Regimes 2–3 give $K \le 9/14 > 81/128$. $\square$
Let $r \ge 2$, $N = 2^r$, and $\theta = 2^{-t}$ with $t \ge 2r$. Suppose a binary length profile $(n_1, \dots, n_L)$ satisfies $a_l = n_l 2^{-l} \le \theta$ for every $l$. Then every nonzero $n_l \ge 1$ automatically satisfies $2^{-l} \le n_l 2^{-l} \le 2^{-t}$, hence $l \ge t \ge 2r$ (so the $r$-bit prefix and $r$-bit suffix of every codeword are disjoint, and every codeword weight $2^{-l}$ divides $\theta$).
Partition $\{0, 1\}^l$ ($l \ge 2r$) into the $N^2 = 4^r$ border boxes $$Q_{u, v}(l) = \{w \in \{0, 1\}^l : w \text{ starts with } u \text{ and ends with } v\}, \qquad u, v \in \{0, 1\}^r, \qquad |Q_{u, v}(l)| = \frac{2^l}{N^2}.$$ Index $\{0, 1\}^r$ as $\{0, \dots, N-1\}$ and define target weights $X_{i, j}$ sequentially in lexicographic order $(i, j) = (0,0), (0,1), \dots, (N-1, N-1)$: $$R_i = \sum_{j' < j} X_{i, j'}, \qquad C_j = \sum_{i' < i} X_{i', j}, \qquad \mathrm{rhs}_{i,j} = \frac{1}{N^2} - \frac{R_i + C_j}{N} - (2r - 1)\theta,$$ $$X_{i, j} = \begin{cases} 0 & \text{if } \mathrm{rhs}_{i,j} \le 0, \\ \theta \cdot \left\lfloor \dfrac{N \cdot \mathrm{rhs}_{i,j}}{2\theta} \right\rfloor & \text{if } \mathrm{rhs}_{i,j} > 0. \end{cases}$$
We assign the sorted codewords sequentially into box $(0,0)$, then $(0,1)$, ..., retiring each box $(i, j)$ permanently once the cumulative Kraft weight placed in $(i, j)$ reaches $X_{i, j}$. Because every codeword weight $2^{-l}$ divides $\theta$ and each $X_{i, j}$ is an integer multiple of $\theta$, every phase hits $X_{i, j}$ exactly (until all codewords are placed).
Soundness of greedy packing inside box $(i, j)$ at any length $l$: Let $S_{\text{prev}}$ be the Kraft weight of earlier codewords of length $< l$ placed in box $(i, j)$, so $S_{\text{prev}} \le X_{i, j}$. Count the total number of words in $Q_{i, j}(l)$ blocked by all previously placed codewords (of lengths $k < l$ across boxes $(i', j') \le (i, j)$):
- Earlier lengths with gap $l - k \ge r$: Because $k + r \le l$, a codeword $c$ of length $k$ in box $(i', j')$ has exactly $2^{l - k - r} = \frac{1}{N} 2^{l - k}$ prefix extensions in $Q_{i, j}(l)$ if $i' = i$ (and $0$ otherwise), and exactly $\frac{1}{N} 2^{l - k}$ suffix extensions in $Q_{i, j}(l)$ if $j' = j$ (and $0$ otherwise). Summing over all boxes $(i', j') < (i, j)$ gives at most $\frac{R_i + C_j}{N} \cdot 2^l$, and summing over earlier lengths inside box $(i, j)$ itself gives at most $\frac{2}{N} S_{\text{prev}} \cdot 2^l \le \frac{2}{N} X_{i, j} \cdot 2^l$.
- Immediately preceding lengths with gap $1 \le l - k \le r - 1$: Each codeword $c$ of length $k$ has at most $2^{l - k}$ prefix extensions and at most $2^{l - k}$ suffix extensions in all of $\{0, 1\}^l$, hence at most $2 \cdot 2^{l - k}$ blocked words in $Q_{i, j}(l)$. Summing over all $r - 1$ lengths $k \in \{l - r + 1, \dots, l - 1\}$ (each having total Kraft weight $a_k \le \theta$) gives at most $2(r - 1)\theta \cdot 2^l$ blocked words.
Hence the number of unblocked words in $Q_{i, j}(l)$ is at least $$\left(\frac{1}{N^2} - \frac{R_i + C_j}{N} - \frac{2}{N} X_{i, j} - 2(r - 1)\theta\right) 2^l \ge \theta \cdot 2^l \ge a_l \cdot 2^l = n_l,$$ since $\frac{2}{N} X_{i, j} \le \mathrm{rhs}_{i,j} = \frac{1}{N^2} - \frac{R_i + C_j}{N} - (2r - 1)\theta$. Thus greedy packing succeeds at every length $l$ in every box $(i, j)$ whenever $K \le C(r, \theta) = \sum_{i, j} X_{i, j}$.
Exact rational values (certified in code/verify_theorems.py):
| $r$ | $N = 2^r$ | Boxes $N^2$ | Ideal limit $C(r, 0)$ | Certified $\theta = 2^{-t}$ | Certified $C(r, \theta)$ |
|---|
| $2$ | $4$ | $16$ | $93/128 = 0.7265625$ | $2^{-9} = 1/512$ | $\mathbf{21/32 = 0.65625}$ |
| $3$ | $8$ | $64$ | $26333/32768 \approx 0.803619$ | $2^{-13} = 1/8192$ | $\mathbf{1581/2048 \approx 0.771973 > 3/4}$ |
| $4$ | $16$ | $256$ | $1846943453/2147483648 \approx 0.860050$ | $2^{-15} = 1/32768$ | $\mathbf{6659/8192 \approx 0.812866 > 4/5}$ |
Asymptotic $C(r, 0) \to 1$: In the continuous limit $\theta = 0$, observe that at the end of row $i$, the recurrence $R_{i, j+1} = R_{i, j} + \frac{N}{2}(N^{-2} - N^{-1}(R_{i, j} + C_{i, j})) = \frac{1}{2} R_{i, j} + \frac{1}{2}(N^{-1} - C_{i, j})$ satisfies $R_{i, j} + C_{i, j} \le N^{-1}$ by induction. Summing over all $N^2$ boxes, the total unblocked deficit at the end of row $i$ decays exponentially in $N$, yielding $\lim_{N \to \infty} C(\log_2 N, 0) = 1$ (explicitly $0.86005$ at $N=16$, $0.903$ at $N=32$, etc.). $\square$
3. Proof of Claim 3 (Breaking $5/8$ for All Gap-$\ge 2$ Profiles)
Let $(n_1, \dots, n_L)$ be any binary length profile whose consecutive distinct lengths satisfy $l_{i+1} \ge l_i + 2$, and suppose $$K \le c := \frac{10241}{16384} = \frac{5}{8} + \frac{1}{16384}.$$ Set $\eta = \frac{1}{300}$ and $\delta = \frac{1}{8192}$ (so $c = \frac{5}{8} + \frac{1}{2}\delta$).
If $\lambda \le 3$, Claim 1 already proves realizability for $K \le \frac{81}{128} > c$. Hence assume $\lambda \ge 4$.
Partition $Q_{00}(l)$ ($l \ge 4$) into its four 2-bit border sub-boxes (each of density $1/16$): $$B_{11} = 01\{0,1\}^*10, \quad B_{01} = 00\{0,1\}^*10, \quad B_{10} = 01\{0,1\}^*00, \quad B_{00} = 00\{0,1\}^*00.$$ Because every two distinct lengths in the profile satisfy $l - j \ge 2$, the union-bound blocking matrix $M_2$ among $(B_{11}, B_{01}, B_{10}, B_{00})$ is exact and gap-independent: $$M_2 = \begin{pmatrix} 1/2 & 1/4 & 1/4 & 0 \\ 1/4 & 1/2 & 0 & 1/4 \\ 1/4 & 0 & 1/2 & 1/4 \\ 0 & 1/4 & 1/4 & 1/2 \end{pmatrix}.$$ Crucially, for any length $l$ and any earlier weights $x_b(j) = c_b(j) 2^{-j}$ ($j \le l - 2$), every entry of $M_2$ times $2^{l - j}$ is an exact integer (since $4 \mid 2^{l - j}$), and $2^{l - 4}$ is an integer (since $l \ge 4$). Hence at every length $l$, the union-bound available count $(\frac{1}{16} - \mathrm{blk}(b, l)) 2^l$ in each sub-box $b$ is an exact integer with zero discrete rounding loss!
Moreover, every row sum of $M_2$ equals $1$, so for any previous weights $X_{<l} = (X_{11}, X_{01}, X_{10}, X_{00})$ with total $X_{\text{tot}} = \sum_b X_b$:
- $\sum_{b} \mathrm{blk}(b, l) = X_{\text{tot}}$;
- $\mathrm{blk}(B_{11}, l) = \frac{1}{4} X_{\text{tot}} + \frac{1}{4}(X_{11} - X_{00})$ and $\mathrm{blk}(B_{00}, l) = \frac{1}{4} X_{\text{tot}} - \frac{1}{4}(X_{11} - X_{00})$;
- $\mathrm{free}(B_{00}, l) = \frac{1}{16} - \frac{1}{4} X_{\text{tot}} + \frac{1}{4}(X_{11} - X_{00})$.
Now greedily pack codewords of the profile in increasing length order into $Q_{00}$ using priority order $(B_{11}, B_{01}, B_{10}, B_{00})$: at each length $l$, place as many codewords as fit inside the union-bound available count $\max(0, \frac{1}{16} - \mathrm{blk}(b, l)) 2^l$ of $B_{11}(l)$, then $B_{01}(l)$, then $B_{10}(l)$, then $B_{00}(l)$, stopping at the first length $L_1$ where $Q_{00}$ cannot absorb all of $a_{L_1}$ (if no such $L_1$ exists, the entire profile fits in $Q_{00}$ and we are done). Let $k \le L_1$ be the first length where $a_k$ cannot fit completely inside $B_{11}(k)$, and let $s_k = \sum_{l < k} a_l$.
Case 1: $s_k \le \eta = \frac{1}{300}$.
Before length $k$, all codewords fit in $B_{11}$, so at length $k$, $\mathrm{blk}(B_{11}, k) = \frac{1}{2} s_k$, and hence $a_k > \frac{1}{16} - \frac{1}{2} s_k \ge \frac{1}{16} - \frac{1}{600} = \frac{73}{1200}$. We discard the sub-box packing and apply Claim 1's Harris–Kleitman construction at length $k$:
- Subcase 1a ($s_k + a_k \le 1/4$): By Claim 1 (Perturbed Heavy Length), $K \le \frac{5}{8} + \frac{1}{2}(a_k^2 - s_k)$ suffices. Here $$a_k^2 - s_k > \left(\frac{73}{1200}\right)^2 - \frac{1}{300} = \frac{529}{1{,}440{,}000} > \frac{1}{8192} = \delta,$$ so $\frac{5}{8} + \frac{1}{2}(a_k^2 - s_k) > \frac{5}{8} + \frac{1}{2}\delta = c$.
- Subcase 1b ($1/4 < s_k + a_k \le 1/2$): Place $C_{<k}$ greedily in $Q_{00}$, fill all of $U_{00}(k)$ (weight $r_k \ge \frac{1}{4} - s_k$), and let $\beta' = a_k - r_k \le s_k + a_k - \frac{1}{4} =: \beta \le \frac{1}{4}$.
- If $\beta' \ge \frac{1}{8} + 2\delta$: place $\beta'$ in $U_{01}(k)$ (and any excess beyond $\frac{1}{4} - \frac{1}{2} s_k$ in $U_{10}(k)$). By the Overflow 4-Quadrant Lemma (Lemma B below), this realizes at least $\min(\frac{9}{16} + \frac{1}{2}\beta',\; \frac{11}{16} - \frac{1}{4} s_k) \ge \min(\frac{5}{8} + \delta,\; \frac{11}{16} - \frac{1}{1200}) > c$.
- If $\beta' < \frac{1}{8} + 2\delta$: note $\beta' + \frac{1}{2} s_k \le \frac{1}{8} + 2\delta + \frac{1}{600} < \frac{1}{4}$. Choose a downward-closed set $B^* \subset Q_{01}(k)$ of size $(\beta' + \frac{1}{2} s_k) 2^k$, and place the $\beta' 2^k$ words into $B \subset B^* \cap U_{01}(k)$. Let $S = Q_{01}(k) \setminus B^*$ (upward-closed, size $(\frac{1}{4} - \beta' - \frac{1}{2} s_k) 2^k$). For every $m > k$, at least $\frac{1}{2}|S| \cdot 2^{m-k-1} = (\frac{1}{16} - \frac{1}{4}\beta' - \frac{1}{8} s_k) 2^m$ words of $Q_{00}(m)$ have length-$k$ prefix in $S$ and bit $m - k + 1$ equal to $1$; subtracting at most $|P(C_{<k}, Q_{00}(m))| + |S(C_{<k}, Q_{00}(m))| = s_k 2^m$ leaves $$|U_{00}(m)| \ge \left(\frac{1}{16} - \frac{1}{4}\beta' - \frac{9}{8} s_k\right) 2^m \ge \left(\frac{1}{16} - \frac{1}{4}\left(\frac{1}{8} + 2\delta\right) - \frac{9}{8}\eta\right) 2^m = \frac{11239}{409600} 2^m > \delta 2^m.$$ By the Integer Ceiling Trick + Overflow 4-Quadrant Lemma, this achieves $K \le \frac{5}{8} + \frac{1}{2}\delta = c$.
- Subcase 1c ($s_k + a_k > 1/2$): Fill $U_{00}(k)$ ($\ge \frac{1}{4} - s_k$), $U_{01}(k)$ ($\ge \frac{1}{4} - \frac{1}{2} s_k$), and put the remaining length-$k$ words into $U_{10}(k)$ (and $U_{11}(k)$ if needed), realizing at least $\frac{11}{16} - \frac{3}{2} s_k = 0.6825 > c$.
Case 2: $s_k > \eta = \frac{1}{300}$.
Keep the greedy $(B_{11}, B_{01}, B_{10}, B_{00})$ packing up through length $L_1$. Write $P_b = X_b(< L_1)$, $q_b = x_b(L_1)$, $X_b = P_b + q_b$, $P = \sum_b P_b$, $X_{\text{tot}} = \sum_b X_b \ge \frac{1}{4}$, and overflow $\beta = a_{L_1} - \sum_b q_b > 0$.
First note that at length $k$, since $s_k \le \frac{1}{8}$ (as all lengths $< k$ fit inside $B_{11}$ with self-blocking $1/2$ and capacity $1/16$), $B_{11}(k)$ absorbs $\frac{1}{16} - \frac{1}{2} s_k$, so $$X_{11}(\le L_1) \ge X_{11}(\le k) = s_k + \left(\frac{1}{16} - \frac{1}{2} s_k\right) = \frac{1}{16} + \frac{1}{2} s_k > \frac{1}{16} + \frac{1}{2}\eta.$$
Key Dichotomy on $B_{00}$ before $L_1$:
- Subcase 2a ($B_{00}$ is first touched at some length $l_0 < L_1$, i.e., $P_{00} > 0$): At length $l_0$, $X_{00}(< l_0) = 0$, and because $x_{00}(l_0) > 0$, the higher-priority boxes $B_{11}(l_0), B_{01}(l_0), B_{10}(l_0)$ are all full, while $B_{00}(l_0)$ leaves $r_0 = \frac{1}{16} - \mathrm{blk}(B_{00}, l_0) - x_{00}(l_0) \ge 0$ unused. Therefore: 1. $X_{\text{tot}}(\le l_0) = P(\le l_0) + \sum_{b} x_b(l_0) \ge \frac{1}{4} - r_0$; 2. $x_{11}(l_0) \ge \frac{1}{16} - \mathrm{blk}(B_{11}, l_0)$ and $x_{00}(l_0) = \frac{1}{16} - \mathrm{blk}(B_{00}, l_0) - r_0$. Subtracting gives $$x_{11}(l_0) - x_{00}(l_0) \ge \mathrm{blk}(B_{00}, l_0) - \mathrm{blk}(B_{11}, l_0) + r_0 = -\frac{1}{2} X_{11}(< l_0) + r_0,$$ and adding $X_{11}(< l_0)$ to both sides yields $X_{11}(\le l_0) - X_{00}(\le l_0) \ge \frac{1}{2} X_{11}(< l_0) + r_0 \ge \frac{1}{2} s_k + r_0$. 3. Since $L_1 \ge l_0 + 2$ and $M_2 \ge 0$, the blocking of $B_{11}$ at length $L_1$ satisfies $$\mathrm{blk}(B_{11}, L_1) \ge \mathrm{blk}(B_{11}, l_0 + 2) = \frac{1}{4} X_{\text{tot}}(\le l_0) + \frac{1}{4}\big(X_{11}(\le l_0) - X_{00}(\le l_0)\big) \ge \frac{1}{16} - \frac{1}{4} r_0 + \frac{1}{4}\left(\frac{1}{2} s_k + r_0\right) = \frac{1}{16} + \frac{1}{8} s_k.$$ The $r_0$ terms cancel identically! Consequently, at length $L_1$: $$X_{\text{tot}}(\le L_1) = \frac{1}{4} + \sum_{b:\; \mathrm{blk}(b, L_1) > \frac{1}{16}} \left(\mathrm{blk}(b, L_1) - \frac{1}{16}\right) \ge \frac{1}{4} + \frac{1}{8} s_k > \frac{1}{4} + \frac{1}{8}\eta > \frac{1}{4} + \delta.$$ Applying the 4-Quadrant Master Lemma immediately yields $K \le \frac{5}{8} + \frac{1}{2}\delta = c$!
- Subcase 2b ($B_{00}$ is never touched before $L_1$, i.e., $P_{00} = 0$): If $X_{\text{tot}}(\le L_1) \ge \frac{1}{4} + \delta$, we are immediately done by the 4-Quadrant Master Lemma. Hence assume $X_{\text{tot}} = \frac{1}{4} + \gamma$ with $0 \le \gamma < \delta$. Since $P_{00} = 0$, we have $X_{00} = q_{00} \le \frac{1}{16}$, and hence $$X_{11} - X_{00} \ge \left(\frac{1}{16} + \frac{1}{2} s_k\right) - \frac{1}{16} = \frac{1}{2} s_k > \frac{1}{2}\eta.$$ Furthermore, $P \le \frac{3}{16} + 4\delta$: if $k = L_1$ then $P = s_k \le \frac{1}{8}$; if $k < L_1$ then $P_{11} \ge \frac{1}{16}$, so $\frac{1}{16} + \delta > \mathrm{blk}(B_{11}, L_1) = \frac{1}{4} P + \frac{1}{4} P_{11} \ge \frac{1}{4} P + \frac{1}{64}$, giving $P < \frac{3}{16} + 4\delta$.
We now split on the overflow $\beta$ at length $L_1$:
- If $\beta \ge \frac{1}{8} + 2\delta$: Stop filling $Q_{00}$ at $L_1$, place $\beta_1 = \min(\beta, \frac{1}{4} - \frac{1}{2} P)$ in $U_{01}(L_1)$ and $\beta_2 = \beta - \beta_1$ in $U_{10}(L_1)$ (both exact integers in count since $4 \mid 2^{L_1 - j}$ for all $j \le L_1 - 2$). By the Overflow 4-Quadrant Lemma (Lemma B) — which places $x_2 = \max(\beta_1, \frac{1}{4} - \frac{1}{2} X_{\text{tot}})$ in $Q_{01}$, $x_3 = \max(\beta_2, \frac{1}{4} - \frac{1}{2} X_{\text{tot}})$ in $Q_{10}$, and $x_4 = \frac{1}{4} - \frac{1}{2} x_2 - \frac{1}{2} x_3$ in $Q_{11}$, achieving $X_{\text{tot}} + \frac{1}{4} + \frac{1}{2} x_2 + \frac{1}{2} x_3$ — the total realizable Kraft sum is at least $$\min\!\left(\frac{9}{16} + \frac{1}{2}\beta,\; \frac{11}{16} - \frac{1}{4} P\right) \ge \min\!\left(\frac{5}{8} + \delta,\; \frac{41}{64} - \delta\right) = \frac{5}{8} + \delta > c.$$
- If $0 < \beta < \frac{1}{8} + 2\delta$: Place as much of $\beta$ as fits into the two sub-regions $01\{0,1\}^{L_1-3}1 \subset U_{01}(L_1)$ and $1\{0,1\}^{L_1-3}10 \subset U_{10}(L_1)$ — neither of which blocks $B_{00} = 00\{0,1\}^*00$ at all! Their combined available capacity at length $L_1$ is $$\mathrm{cap} = \left(\frac{1}{8} - \frac{1}{2}(P_{11} + P_{10})\right) + \left(\frac{1}{8} - \frac{1}{2}(P_{11} + P_{01})\right) = \frac{1}{4} - P_{11} - \frac{1}{2}(P_{01} + P_{10}).$$ Place any spillover $\mathrm{spill} = \max(0, \beta - \mathrm{cap})$ into the remainder of $U_{01}(L_1) \cup U_{10}(L_1)$ (i.e., $00\{0,1\}^{L_1-3}1$ and $1\{0,1\}^{L_1-3}00$). Because every length strictly after $L_1$ satisfies $l \ge L_1 + 2$, each unit of spillover blocks only $\frac{1}{4}$ inside $B_{00}(l)$. Now compute the exact remaining free density in $B_{00}(l)$ for every $l \ge L_1 + 2$:
- If $\mathrm{spill} = 0$: $\mathrm{free}(B_{00}, l) = \frac{1}{4}(X_{11} - X_{00}) - \frac{1}{4}\gamma > \frac{1}{8}\eta - \frac{1}{4}\delta > \delta$.
- If $\mathrm{spill} > 0$: using $P_{01} + P_{10} = \frac{1}{4} + \gamma - P_{11} - \sum_b q_b$ (since $P_{00} = 0$) and $\beta < \frac{1}{8} + 2\delta$, we have $$\mathrm{spill} = \beta - \frac{1}{4} + P_{11} + \frac{1}{2}(P_{01} + P_{10}) < 2\delta + \frac{1}{2}\gamma + \frac{1}{2} P_{11} - \frac{1}{2}(q_{11} + q_{01} + q_{10} + q_{00}).$$ Substituting into $\mathrm{free}(B_{00}, l) = -\frac{1}{4}\gamma + \frac{1}{4}(P_{11} + q_{11} - q_{00}) - \frac{1}{4}\mathrm{spill}$ gives $$\mathrm{free}(B_{00}, l) > \frac{1}{8}(X_{11} - X_{00}) + \frac{1}{4} q_{11} + \frac{1}{8}(q_{01} + q_{10}) - \frac{3}{8}\gamma - \frac{1}{2}\delta \ge \frac{1}{16}\eta - \frac{3}{8}\gamma - \frac{1}{2}\delta.$$ Since $Q_{00}$ already holds $X_{\text{tot}} = \frac{1}{4} + \gamma$, reaching $x_1 \ge \frac{1}{4} + \delta$ requires only $\delta - \gamma$ additional weight in $B_{00}$. Indeed, $$\mathrm{free}(B_{00}, l) - (\delta - \gamma) > \frac{1}{16}\eta + \frac{5}{8}\gamma - \frac{3}{2}\delta \ge \frac{1}{16}\eta - \frac{3}{2}\delta = \frac{1}{4800} - \frac{3}{16384} = \frac{31}{1228800} > 0.$$ Thus by the Integer Ceiling Trick, we pack $y \ge \delta - \gamma$ additional weight into $B_{00}$ at lengths $\ge L_1 + 2$, bringing total $Q_{00}$ weight to $x_1 = (\frac{1}{4} + \gamma) + y \ge \frac{1}{4} + \delta$. Applying Lemma B (with $\beta_1$ in $Q_{01}(L_1)$ and $\beta_2$ in $Q_{10}(L_1)$) yields total Kraft sum at least $$x_1 + \frac{1}{4} + \frac{1}{2}\max\!\left(\beta_1, \frac{1}{4} - \frac{1}{2} x_1\right) + \frac{1}{2}\max\!\left(\beta_2, \frac{1}{4} - \frac{1}{2} x_1\right) \ge \frac{1}{2} + \frac{1}{2} x_1 \ge \frac{5}{8} + \frac{1}{2}\delta = \frac{10241}{16384} = c. \qquad \square$$
4. Details of Claim 4 (Exhaustive Verification for $L \le 9$ and Targeted $L = 10$ Hunt)
Every profile $(n_1, \dots, n_L)$ with $K < 3/4$ is dominated by $(n_1, \dots, n_L + \Delta)$ with $K = 3/4$ (simply delete $\Delta$ codewords of length $L$). Therefore, verifying all integer vectors $(n_1, \dots, n_L)$ with $n_L \ge 1$ and $\sum_{i=1}^L n_i 2^{L-i} = 3 \cdot 2^{L-2}$ exhaustively certifies the $3/4$ Conjecture for maximum length $\le L$.
Our C++20 solver verify_L8_L9.cpp traverses $(n_1, \dots, n_{L-1})$ in a shared prefix tree, incrementally adding the unblocked codeword minimizing newly blocked length-$L$ words (popcnt over 4 uint64_ts for $L = 8$, 8 uint64_ts for $L = 9$). Whenever the incremental tree fails to leave $\ge n_L$ unblocked words, the solver invokes a 30-strategy constructive fallback suite (quadrant-ordered, reversal-symmetric, Hamming-weight-biased, and randomized min-blocked greedy) and, if needed, a complete exact branch-and-bound search. With --verify-all, every single constructed code (including all fast-tree solutions) is checked by an independent from-scratch pairwise prefix/suffix verifier verify_code().
| Max length $L$ | Exact $K=3/4$ profiles ($n_L \ge 1$) | Uncovered by known theorems | Fast tree | Fallback | Exact B&B | Independently verified | Counterexamples | Runtime (--verify-all) |
|---|
| $7$ | $7{,}658$ | $4{,}702$ | $7{,}475$ | $183$ | $0$ | $7{,}658$ ($100\%$) | $0$ | $0.01\text{ s}$ |
| $8$ | $161{,}046$ | $131{,}554$ | $155{,}434$ | $5{,}612$ | $0$ | $161{,}046$ ($100\%$) | $0$ | $0.65\text{ s}$ |
| $9$ | $5{,}724{,}394$ | $5{,}229{,}853$ | $5{,}530{,}355$ | $194{,}035$ | $4$ | $5{,}724{,}394$ ($100\%$) | $0$ | $43.66\text{ s}$ |
Together with the $692$ profiles for $L \le 6$ ($2, 4, 14, 74, 598$ for $L = 2, 3, 4, 5, 6$), this confirms all $5{,}893{,}790$ exact-$3/4$ profiles for $L \le 9$ — a $>700\times$ expansion over Ye–Yeung's (2001) verification for $L \le 7$ ($8{,}350$ profiles).
Two Extremal Hard Families Identified at $L = 9$:
- Zero-slack tail family ($K_{<9} = 1/2$, $n_9 = 128$, $n_6 = n_7 = n_8 = 0$): Profiles such as $[0,0,1,5,2,0,0,0,128]$, $[0,0,2,3,2,0,0,0,128]$, $[0,1,0,1,6,0,0,0,128]$ attain greedy slack $0$ because at $L = 9 \ge 2 \cdot 5 - 1$, prefix- and suffix-blocking from lengths $\le 5$ are nearly independent, leaving $(1 - 1/2)^2 \cdot 2^9 = 128 = n_9$ words unless $(5,5)$ pairs have positive 1-bit overlap.
- Near-$L-1$ bottleneck family (the ONLY 4 profiles at $L = 9$ requiring exact branch-and-bound): - $[0, 0, 0, 0, 8, 2, 28, 63, 2]$ - $[0, 0, 0, 0, 8, 2, 29, 61, 2]$ - $[0, 0, 0, 0, 8, 2, 33, 53, 2]$ - $[0, 0, 0, 0, 8, 3, 32, 51, 2]$ All four have $\lambda = 5$, $a_5 = 1/4$, tiny $a_6 \in \{1/32, 3/64\}$, large $a_7 \approx 1/4$ and $a_8 \approx 1/4$, and tiny $a_9 = 1/256$. Greedy strategies minimizing length-$9$ blocking neglect the tight bottleneck at length $8$.
In hunt_L10.cpp, we targeted both hard families scaled to $L = 10$ (near-length-$9$ bottleneck profiles with $\lambda = 6$, all $K_{<10} = 1/2$ profiles supported on lengths $2 \dots 6$ with $n_{10} = 256$, plus $2{,}000$ random hard uncovered profiles): all $2{,}532 / 2{,}532$ were solved and independently verified in $0.17\text{ s}$ with $0$ unsolved.
5. Details of Claim 5 (Adversarial Evaluation of Multi-Order 16-Box Union-Bound Packing)
In adversary_16box.cpp, we ran simulated annealing ($400$ restarts $\times$ $600$ steps $= 240{,}000$ steps per configuration, $m \in [2, 34]$ lengths) to minimize the maximum Kraft sum $K$ realizable by fixed priority orderings of the 16 2-bit border boxes using exact union-bound blocking matrices $M_1$ (gap $1$) and $M_2$ (gap $\ge 2$):
| Priority Order Suite | Gap Mode | Adversarial Min $K$ | Worst Profile Found |
|---|
2 orders (ord_quad, ord_slex) | gap $\ge 2$ | $0.629483$ | $a \approx [0.2202, 0.1548, 0.1329, 0.0947, 0.0269]$ |
2 orders (ord_quad, ord_slex) | mixed $\{1, 2\}$ | $0.627014$ | $m=12$, $a_0 \approx 0.2256$ |
6 orders (quad, lex, col, slex, sdiag, qint) | gap $\ge 2$ | $0.633900$ | $m=12$, $a_0 \approx 0.1950$ |
6 orders (quad, lex, col, slex, sdiag, qint) | mixed $\{1, 2\}$ | $0.631270$ | $m=7$, $a_0 \approx 0.1765$ |
Hybrid (Claim 1 HK + 1 order ord_clean) | mixed $\{1, 2\}$ | $0.628845$ | $a \approx [0.0359, 0.2086, 0.1920, 0.1337, 0.0188, 0.0399]$ |
Notice that every adversarial profile approaching $5/8$ for ord_quad has a large early weight, which is precisely where ord_slex (row-first) and Claim 1's Harris–Kleitman bound excel.
Verification
All code is in attempts/fix-free-codes-three-quarters/code/:
verify_theorems.py:- Certifies all exact rational bounds in Claim 2 ($r = 2, 3, 4$) using
fractions.Fraction. - Certifies all exact rational inequalities in Claim 3 ($\eta = 1/300, \delta = 1/8192, c = 10241/16384$) and stress-tests every proof branch on $50{,}000$ random adversarial all-gap-$\ge 2$ profiles ($50{,}000 / 50{,}000$ passed all assertions).
- Runs the explicit constructive algorithm of Claim 1 on all $2{,}353$ profiles with $L = 7$, $\lambda \le 3$, and $K = 81/128$, verifying every generated binary code from scratch ($2{,}353 / 2{,}353$ passed).
verify_L8_L9.cpp: Compiled with /usr/bin/clang++ -O3 -std=c++20 and executed with --verify-all for $L = 7$ ($7{,}658/7{,}658$ verified), $L = 8$ ($161{,}046/161{,}046$ verified), and $L = 9$ ($5{,}724{,}394/5{,}724{,}394$ verified).hunt_L10.cpp: Compiled with /usr/bin/clang++ -O3 -std=c++20; solved and independently verified $2{,}532 / 2{,}532$ targeted hard $L = 10$ profiles.adversary_16box.cpp: Compiled with /usr/bin/clang++ -O3 -std=c++20; executed $1.44 \times 10^6$ SA adversarial steps for Claim 5.
Novelty check: Checked against problems/fix-free-codes-three-quarters.md (which surveys results up to November 2026 including Yekhanin 2004, Kukorelly–Zeger 2005, Schnettler 2007, Khosravifard–Halabian–Gulliver 2010, Aghajan–Khosravifard 2013, Congero–Zeger 2023, and Gao–Shan 2026). To the best of our knowledge:
- Ye–Yeung's (2001) exhaustive verification stopped at $L \le 7$; our exhaustive verification of $L = 8$ and $L = 9$ ($5.89 \times 10^6$ profiles) is new.
- Claim 2 (full $3/4$ Conjecture under the uniform condition $\max_l n_l 2^{-l} \le 2^{-13}$) is orthogonal to Kukorelly–Zeger (2005), which requires $n_l \le 2^{\lambda - 2}$ (i.e., $n_l 2^{-l} \le 2^{\lambda - l - 2}$ decaying exponentially in $l - \lambda$).
- Claim 3 (beating $5/8$ for all gap-$\ge 2$ profiles) is strictly weaker in gap hypothesis than Ahlswede–Balkenhol–Khachatrian (1996, which requires $l_{i+1} \ge 2 l_i$) and strictly stronger in Kraft threshold than Yekhanin (2004, $5/8$).
- Claim 1 ($\lambda \le 3 \implies K \le 81/128$ and the general $\frac{5}{8} + \frac{1}{2}\alpha^2$ first-length Harris–Kleitman bound) appears new.
Dead ends
- Uneven $2 \times 2$ and static $N \times N$ border partitions without self-blocking refinement: Partitioning $\{0,1\}^*$ into prefix set density $\alpha$ and suffix set density $\beta$ with linear union-bound self-blocking factor $\max(1, \alpha + \beta)$ achieves a unique maximum of $5/8$ at $\alpha = \beta = 1/2$ (verified both by grid optimization and by an explicit LP dual certificate with multipliers $(1/2, 1/2, 1/2, 1)$). Splitting into $N \times N$ equal boxes while keeping self-blocking $1$ degrades the sum toward $\approx 0.478$ as $N \to \infty$, because a fraction $(N-1)/N$ of blocking leaks into other cells. Only exploiting the reduced intra-box self-blocking factor $2/N$ (or retired-box over-blocking) breaks $5/8$.
- Exploiting cross-quadrant overlap in $Q_{11}$ after filling $Q_{00}, Q_{01}, Q_{10}$: Even when $C_1 = \{00\}$, $C_2 = U_{01}(k) = 01\{0,1\}^{k-3}1$, and $C_3 = U_{10}(k) = 1\{0,1\}^{k-3}10$, at length $l = 2k - 2$ the prefix-blocked set of $C_3$ in $Q_{11}(l)$ requires bits $(k-1, k) = (1, 0)$ while the suffix-blocked set of $C_2$ requires $(k-1, k) = (0, 1)$, so their intersection is literally empty ($\emptyset$), leaving density exactly $1/8$ in $Q_{11}(2k-2)$.
- Pure pigeonhole inside a single box $X$ of density $\alpha\beta$: For any prefix/suffix box $X$ of density $\alpha\beta$, prefix blocking is $\beta s$ and suffix blocking is $\alpha s$, so greedy union-bound packing stops at $(\alpha + \beta) s = \alpha\beta$, which is identically $|P| + |S| = |X|$ (zero pigeonhole overlap).
- Independent Bernoulli sampling + alteration for multi-length $Q_{00}$ overlap: Sampling $R_l \subset Q_{00}(l)$ independently with $p_l = 4\gamma a_l$ and deleting conflicts achieves $\mathbb{E}[|C_l|] > n_l$ when $s_0 \le 1/32$, but fails to guarantee $|C_l| \ge n_l$ simultaneously across many distinct lengths with $n_l = 1$ (success probability decays exponentially in the number of distinct lengths).
- Extending Claim 3 from gap $\ge 2$ to arbitrary gap $1$ via $Q_{00}$-only over-blocking: In Case 2b of Claim 3, when $Q_{00}$ overflows at $L_1$ with $\beta \in (0, 1/8)$ and $a_{L_1 + 1} > 0$ appears at gap $1$, the overflow placed in $01\{0,1\}^{L_1-3}1$ and $1\{0,1\}^{L_1-3}10$ does not block $B_{01}, B_{10}, B_{00}$ at $L_1 + 1$, but it does block $B_{11}(L_1 + 1)$ (since appending $0$ to $01\dots 1$ gives $01\dots 10 \in B_{11}$), and $B_{01}, B_{10}, B_{00}$ can simultaneously have $0$ free space at $L_1 + 1$ (e.g., $P = [0.03392, 0, 0, 0]$, $q = [0.0625, 0.04554, 0.04554, 0.0625]$). While our full 16-box order
ord_clean handles this easily (by gaining $+0.0143$ over-blocking bonus inside $Q_{01}(L_1+1)$ via box 00..01 $\to$ 00..11), turning the coupled multi-quadrant gap-1 dynamics into a short gap-free analytical proof remains open and is the exact remaining step to prove Claim 5 unconditionally.
References
- R. Ahlswede, B. Balkenhol, and L. Khachatrian, "Some properties of fix-free codes," Proc. 1st INTAS International Seminar on Coding Theory and Combinatorics, pp. 20–33, 1996.
- T. E. Harris, "A lower bound for the critical probability in a certain percolation process," Proc. Cambridge Philos. Soc. 56(1):13–20, 1960.
- D. J. Kleitman, "Families of non-disjoint subsets," J. Combinatorial Theory 1(1):153–155, 1966.
- C. Ye and R. W. Yeung, "Some basic properties of fix-free codes," IEEE Trans. Inform. Theory 47(1):72–87, 2001.
- S. Yekhanin, "Sufficient conditions of existence of fix-free codes," Proc. IEEE ISIT 2001, p. 284, 2001.
- S. Yekhanin, "Improved upper bound for the redundancy of fix-free codes," IEEE Trans. Inform. Theory 50(11):2815–2818, 2004.
- Z. Kukorelly and K. Zeger, "Sufficient conditions for existence of binary fix-free codes," IEEE Trans. Inform. Theory 51(10):3433–3444, 2005.
- H. Schnettler, "On the 3/4-conjecture for fix-free codes — a survey," arXiv:0709.2598, 2007.
- S. Congero and K. Zeger, "The 3/4 conjecture for fix-free codes with at most three distinct codeword lengths," IEEE Trans. Inform. Theory 69(3):1452–1485, 2023.
- W. Gao and Z. Shan, "The 3/4 conjecture for $q$-ary fix-free codes with at most three distinct codeword lengths," arXiv:2609.18237, 2026.
Source: attempts/fix-free-codes-three-quarters/2026-11-30-gemini-4-neon-threshold-and-search.md