Kraizberg (arXiv:2603.27656, 2026) proved that every finite binary code admits a prefix-free code matching its per-length power sums: for every word length , the sum of over codewords of length , where counts occurrences of a distinguished letter , is the same for and . This is a weak structural surrogate for commutative equivalence of codes, a notion going back to Perrin and Schützenberger whose general conjecture was disproved by Shor (1985) and whose maximal-code restriction remains open. Shor's counterexample also shows cannot always be achieved, and the paper asks how close in cardinality can be chosen: is a discrepancy always achievable, or even ? This problem record asks, as the paper does, for a determination of the asymptotic behaviour of the minimal achievable cardinality discrepancy under the weighted per-length equality, for the binary case. No bounds on this quantity exist anywhere in the literature; the question has been untouched since its posing.
Background
A (finite) code is a finite set of words over the binary alphabet in which every concatenation of codewords factors uniquely into codewords (unique decodability). A prefix-free code is one where no codeword is a prefix of another; such codes are exactly the instantaneously decodable ones. The Kraft–McMillan theorem states that the codeword lengths of any code over an alphabet of size satisfy , and conversely every multiset of lengths satisfying this inequality is realized by a prefix-free code; in particular every code is length-equivalent to a prefix-free code. Perrin and Schützenberger (1977) introduced a stronger comparison: two codes are commutatively equivalent if there is a bijection between them that maps each word to an anagram of itself, i.e. preserves the number of occurrences of each letter ( and for the letters ). They conjectured that every finite code is commutatively equivalent to a prefix-free code; Shor (1985) disproved this by exhibiting an explicit finite code not commutatively equivalent to any prefix-free code. The conjecture survives in restricted form for maximal codes — codes to which no word can be added without destroying unique decodability — where it remains a well-known open problem (partial results include the family of Mauceri and Restivo, 1981). Against this background, Kraizberg (2026) introduced symmetric trees — finite rooted subtrees of the full 3-ary tree in which every vertex with at least two children has two children whose entire rooted subtrees are identical — and established a bijective correspondence between prefix-free binary codes and symmetric trees under which the number of leaves at depth equals the power sum (lifting a Cayley-graph construction from his earlier work on prefix codes and open games). From this he deduced Theorem 1.9: for every binary code there exists a prefix-free code with, for every , — a weak structural form of commutative equivalence that keeps a per-length weighted trace of the letter statistics while dropping the bijection. Genuine commutative equivalence would give the same per-length equalities together with ; conversely, Remark 1.10 of the paper shows that requiring in Theorem 1.9 would force commutative equivalence on Shor's example, so equal cardinality is not always possible. The paper's Section 3 extends the statement to an alphabet of size with weights (for each distinguished letter and each ), omitting the detailed proof, and poses the quantitative question that is the subject of this record.
Problem Statement
Let be a finite code (uniquely decodable set of words) over the binary alphabet , and for a word write for the number of occurrences of the letter in . Call a prefix-free code weight-equivalent to if for every , Theorem 1.9 of Kraizberg (2026) guarantees that every has a weight-equivalent prefix-free , while Remark 1.10 (via Shor's counterexample) shows one cannot always demand . Define the minimal achievable discrepancy where the minimum exists because the set is nonempty by Theorem 1.9 and takes values in the nonnegative integers. Determine up to order: (i) is over all finite binary codes ? (ii) if not, is ? The objective is to quantify the cardinality price of the weak commutative-equivalence surrogate: how far from genuine commutative equivalence (which would give discrepancy ) does the weighted per-length matching force one to stray.
References
- Dean Kraizberg, A Weak Structural Form of Commutative Equivalence in Finite Codes, arXiv:2603.27656 (2026), DOI 10.48550/arxiv.2603.27656, https://arxiv.org/abs/2603.27656
- 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
- D. Perrin and M. P. Schützenberger, Un problème élémentaire de la théorie de l'information, in Théorie de l'Information, Colloques Internationaux CNRS vol. 276, Cachan (1977), pp. 249–260 (proceedings volume dated 1978 in zbMATH), zbMATH record 3760085, https://zbmath.org/3760085
- M. P. Schützenberger, Codes à longueur variable, manuscript in D. Perrin (ed.), Actes de la 7ème École de Printemps d'Informatique Théorique, LITP and ENSTA (1980), pp. 247–271.
- 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
- Jean Berstel, Dominique Perrin, and Christophe Reutenauer, Codes and Automata, Encyclopedia of Mathematics and its Applications vol. 129, Cambridge University Press (2009), ISBN 978-0-521-88831-8, DOI 10.1017/CBO9781139195768, https://doi.org/10.1017/CBO9781139195768
- Dean Kraizberg, Winning Criteria for Open Games: A Game-Theoretic Approach to Prefix Codes, arXiv:2601.17521 (2026), https://arxiv.org/abs/2601.17521
- Clelia De Felice, Finite maximal codes and factorizations of cyclic groups, arXiv:2202.09675 (2022), https://arxiv.org/abs/2202.09675
- Christophe Cordero, Factorizations of Cyclic Groups and Bayonet Codes, arXiv:2301.13566 (2023), https://arxiv.org/abs/2301.13566
- Christophe Cordero, A note with computer exploration on the triangle conjecture, in Language and Automata Theory and Applications (LATA 2019), Lecture Notes in Computer Science vol. 11417, Springer (2019), pp. 409–420, DOI 10.1007/978-3-030-13435-8_30, https://doi.org/10.1007/978-3-030-13435-8_30