Skip to content

Quadratic reset bounds for finite maximal prefix codes

Samrath Singh Chadha

cs.FL

Abstract

Let CC be a finite maximal prefix code of maximum codeword length k≥2k\ge2. We prove that, whenever the literal decoder of CC is synchronizing, it has a reset word of length at most (k−1)(4k−5)(k-1)(4k-5). The bound is independent of the alphabet and the number of decoder states. Its main ingredient is a short-detection theorem: a linear observation of the decoder, with terminal weight constant on states of depth k−1k-1, is either identically zero or nonzero on a word of length at most 2k−32k-3. The proof uses a first-return decomposition in noncommuting variables and cancellation of a highest-degree coefficient. For codes whose codeword lengths are k−1k-1 and kk, we prove the sharper bound 2(k−1)2−12(k-1)^2-1 and characterize equality. The binary code with the single short word ak−1a^{k-1} attains this bound for every k≥2k\ge2; an age representation and a potential on circular arcs give the matching lower bound. Both upper bounds yield polynomial-time constructions in the explicit code size. The mathematical results and the algorithms are formalized in Lean, with polynomial work bounds in a specified binary cost model.

Create a lesson