For every finite binary code CC, Kraizberg (arXiv:2603.27656, 2026) proved that there exists a prefix-free code C′C' such that for every word length kk the sums ∑2[w]a\sum 2^{[w]_a} over codewords of length kk coincide between CC and C′C', where [w]a[w]_a counts occurrences of the letter aa. This is a weak structural form of commutative equivalence, motivated by the Schützenberger commutative equivalence conjecture for maximal codes and constrained by Shor's counterexample to the unrestricted conjecture. The paper's tree-based construction gives no control on ∣C′∣|C'|, and Remark 1.10 shows exact cardinality equality is impossible in general. The paper explicitly asks whether C′C' can always be chosen with ∣∣C∣−∣C′∣∣=O(∣C∣)||C|-|C'|| = O(|C|), or even O(1)O(1). No subsequent work addressing this question is known; it remains open.

Background

A code over the binary alphabet {a,b}\{a,b\} is a set of finite words in which every concatenation of codewords decodes uniquely (a uniquely decodable set); a prefix-free code is a code in which no codeword is a prefix of another, the standard structure making decoding instantaneous. Two finite codes C1,C2C_1, C_2 are commutatively equivalent if there is a bijection f:C1→C2f:C_1\to C_2 preserving the number of occurrences of each letter in every word (i.e., preserving Parikh vectors, the vectors of per-letter occurrence counts). Perrin and Schützenberger asked whether every finite code is commutatively equivalent to a prefix-free code; Schützenberger later restricted the conjecture to maximal codes — codes to which no word can be added without destroying unique decodability — yielding the Commutative Equivalence Conjecture (the history and partial results are covered in Berstel, Perrin, and Reutenauer's monograph Codes and Automata). Shor (1985), disproving the related triangle conjecture, exhibited a finite code CShor=b{1,a,a7,a13,a14}∪{a3,a8}b{1,a2,a4,a6}∪a11b{1,a,a2}C_{Shor}=b\{1,a,a^7,a^{13},a^{14}\}\cup\{a^3,a^8\}b\{1,a^2,a^4,a^6\}\cup a^{11}b\{1,a,a^2\} that is not commutatively equivalent to any prefix-free code, so the unrestricted conjecture is false; Mauceri and Restivo (1981) exhibited families of codes that are commutatively equivalent to prefix codes. In this context, Dean Kraizberg (arXiv:2603.27656, March 2026) established a weak structural surrogate: writing [w]a[w]_a for the number of occurrences of aa in ww, his Theorem 1.9 states that for every code CC there exists a prefix-free code C′C' such that for every kk, ∑w∈C,∣w∣=k2[w]a=∑w′∈C′,∣w′∣=k2[w′]a\sum_{w\in C,|w|=k}2^{[w]_a}=\sum_{w'\in C',|w'|=k}2^{[w']_a}. The proof goes through a bijection between prefix-free codes and a class of rooted trees called symmetric trees (every branching vertex has two identical child subtrees), under which the number of leaves at depth kk equals the length-kk weighted sum above; each codeword w′w' of the associated prefix-free code corresponds to exactly 2[w′]a2^{[w']_a} leaves of the tree, so the constructed tree has ∑w∈C2[w]a\sum_{w\in C}2^{[w]_a} leaves in total and the construction controls the cardinality of C′C' only through the coarse bound ∣C′∣≤∑w∈C2[w]a|C'|\le\sum_{w\in C}2^{[w]_a}, which can exceed ∣C∣|C| by as much as ∑w(2[w]a−1)\sum_w(2^{[w]_a}-1), a potentially enormous gap. Kraizberg's Remark 1.10 shows the gap cannot always be zero: a prefix-free C′C' satisfying the Theorem 1.9 conclusion for CShorC_{Shor} with ∣C′∣=∣CShor∣|C'|=|C_{Shor}| would be commutatively equivalent to CShorC_{Shor}, contradicting Shor's result. The paper's Section 3 (Further Discussion) then asks how small the gap can be, which is the present problem. Kraizberg also states, with proof omitted, an extension to alphabets of size AA: for each letter aa there is a prefix-free C′C' over the same alphabet with ∑w∈C,∣w∣=kAk−[w]a\sum_{w\in C,|w|=k}A^{k-[w]_a} matched for all k≥Ak\ge A; the paper poses the cardinality question explicitly only for the binary theorem, to which this extension is a natural analogue.

Problem Statement

For every finite binary code CC, Kraizberg's Theorem 1.9 guarantees a prefix-free code C′C' such that ∑w∈C,∣w∣=k2[w]a=∑w′∈C′,∣w′∣=k2[w′]a\sum_{w\in C,|w|=k}2^{[w]_a}=\sum_{w'\in C',|w'|=k}2^{[w']_a} for every kk, where [w]a[w]_a is the number of occurrences of the letter aa in ww. The open question, posed in Section 3 of arXiv:2603.27656: can C′C' always be chosen so that ∣∣C∣−∣C′∣∣=O(∣C∣)||C|-|C'||=O(|C|)? Can it even be chosen so that ∣∣C∣−∣C′∣∣=O(1)||C|-|C'||=O(1)? That is, determine (with proof) the optimal uniform control on the cardinality gap between a code and a prefix-free code satisfying the per-length weighted-sum identity. The two tiers are nested — a gap of O(1)O(1) implies a gap of O(∣C∣)O(|C|). The paper poses this cardinality question explicitly for the binary theorem (Theorem 1.9).

References

  1. Dean Kraizberg, "A Weak Structural Form of Commutative Equivalence in Finite Codes", arXiv:2603.27656 (2026), https://arxiv.org/abs/2603.27656
  2. P. W. Shor, "A counterexample to the triangle conjecture", Journal of Combinatorial Theory, Series A 38(1):110–112 (1985), DOI 10.1016/0097-3165(85)90032-9, https://doi.org/10.1016/0097-3165(85)90032-9
  3. S. Mauceri and A. Restivo, "A family of codes commutatively equivalent to prefix codes", Information Processing Letters 12(1):1–4 (1981), DOI 10.1016/0020-0190(81)90064-8, https://doi.org/10.1016/0020-0190(81)90064-8
  4. J. Berstel, D. Perrin, and C. Reutenauer, "Codes and Automata", Encyclopedia of Mathematics and its Applications 129, Cambridge University Press (2009), DOI 10.1017/CBO9781139195768, ISBN 9780521888318, https://doi.org/10.1017/CBO9781139195768
  5. Dean Kraizberg, "Winning Criteria for Open Games: A Game-Theoretic Approach to Prefix Codes", arXiv:2601.17521 (2026), https://arxiv.org/abs/2601.17521