Finding Short Synchronizing Words for Prefix Codes: Unless P = NP, the Shortest Synchronizing Word of a Binary Huffman Decoder Cannot Be Approximated Within c log nResearch Paper
Motivation
A prefix code is a set of binary words none of which is a prefix of another; Huffman codes are the standard example. Such a code is decoded by an automaton that walks down the code tree and returns to the root after each codeword. A transmission error can make the decoder lose track of codeword boundaries. A synchronizing word brings the decoder to one known state whatever state it starts in, so after reading it the decoder is aligned again. How long the shortest such word is has been studied for Huffman codes in coding theory and for automata in general in connection with the Černý conjecture (Volkov's survey).
Computing the length of a shortest synchronizing word is NP-hard (Eppstein 1990), and for binary automata it cannot be approximated within unless P = NP (Berlinkov). Ryzhikov and Szykuła (arXiv:1806.06299, MFCS 2018) ask the same question for decoders of prefix codes; their Corollary 8 shows that the logarithmic barrier persists for binary Huffman decoders.
Setting
A complete automaton is a transition function on a finite set of states and a finite alphabet , extended to words by . A word is synchronizing if is the same state for every ; the automaton is synchronizing if such a word exists, and is the length of a shortest one.
A first-return word of a state is a nonempty word with whose nonempty proper prefixes do not map to . A Huffman decoder is a strongly connected complete automaton with a state whose first-return words form a finite set; that set is then a finite maximal prefix code, the code the automaton decodes. An automaton is strongly acyclic if every cycle is a self-loop and every state with a self-loop is a sink.
The problem Short Sync Word takes a synchronizing automaton and asks for . It is approximable within on a class of automata if a polynomial-time algorithm outputs, for every synchronizing -state automaton of the class ( large enough), a number with .
For codes, a set of words is a code if every word factors over in at most one way; a pair of words of is absorbing if ; a synchronizing code is a complete code with an absorbing pair. For a bijection from the alphabet of a code onto a code , the composition is .
The proof rests on one result from the literature, the Set Cover hardness of Berlinkov (DLT 2014), quoted on p. 5: for every there is such that Set Cover restricted to instances with has no polynomial-time -approximation unless P = NP.
Formalization targets
Goal: Corollary 8
Under the Set Cover hardness,
The constant is left unspecified, as in the paper.
Milestones
- Theorem 2's reduction (p. 5): for a Set Cover instance with , the "pipe" automaton has states and letters, is strongly acyclic, and .
- Theorem 2 (p. 5): -inapproximability on strongly acyclic automata over alphabets of size .
- Lemma 5 (p. 6): a polynomial-time map from synchronizing strongly acyclic automata over letters to Huffman decoders over letters preserving .
- Corollary 6 (iii) (p. 6): -inapproximability on Huffman decoders over alphabets of size .
- Theorem 7 (p. 7): is synchronizing and its shortest absorbing pair has length between and .
- The composition decoder (pp. 7–8): substituting the tree of for the transitions of a decoder of gives a decoder of over the alphabet of with states.
- The composition bounds (p. 8): for every word with .
- The Wielandt code (p. 8): is a maximal prefix code with words of lengths and , and its shortest synchronizing word has length between and .
- Padding (p. 8): the Set Cover hardness persists on instances whose optimum is at least , for every .
Significance
Corollary 8 shows that restricting to decoders of finite binary prefix codes, a class with strong structure, does not make the shortest synchronizing word easier to approximate than for general binary automata. Theorem 7 is a general statement about composition of synchronizing codes and applies beyond this reduction.
The mission adds synchronizing automata, Huffman decoders and composition of codes to the platform, and a second hardness-of-approximation result in the published Turing-machine framework CookPvsNP, after Feige's Set Cover threshold. The results are proved on paper; none has a machine-checked proof. Two printed steps need repair, and the milestones state the corrected versions: the Wielandt code has words, not , so the alphabet must be padded differently, and the printed justification of the padding claim (enumerating all subfamilies of size ) is not polynomial, while the claim itself holds.
Difficulty
Each reduction is elementary on paper. The work lies in three places.
First, polynomial time is measured on one-tape Turing machines: every reduction (pipe automaton, tree gadget, letter duplication, composition decoder, padding) must be realized by a machine on the encodings.
Second, the gap arithmetic of Corollary 8 does not close by Theorem 7 alone. Composition multiplies shortest synchronizing lengths by a factor between and but adds up to , with ; the additive term is absorbed only when the optimum is of order (the padding milestone). Theorem 7 is about absorbing pairs of codes, not synchronizing words of decoders, so milestone 7 needs its own proof.
Third, the Wielandt bound requires an analysis of synchronizing words of the minimal automaton of , a Wielandt automaton with states.
Formalization scope
Automata are transition functions δ : σ → α → σ; instances of Short Sync Word are records of n states Fin n, k letters Fin k and a table δ, encoded in unary over Option Bool. Only complete automata occur. The length of a shortest synchronizing word is an infimum (syncLength), with junk value 0 on non-synchronizing automata; every statement assumes or proves synchronization. A Huffman decoder is strongly connected and has a state whose set of first-return words is finite. Binary means k = 2, with the paper's letters 0, 1 written false, true.
Approximability is in value form: a polynomial-time CookPvsNP machine outputs a unary number between the optimum and times it on every synchronizing instance of the class with at least states, machine and fixed before the instance; logarithms are natural. P = NP means NP Sym ⊆ P Sym for every finite nonempty alphabet. The Set Cover hardness of [4] enters as the hypothesis SetCoverHardness, in the same value form; it is the only hypothesis of the goal. The class in the goal is exactly the binary Huffman decoders, with no bound on the synchronizing length, no minimality condition and no restriction on the code, and the conclusion is P = NP itself; a statement with the algorithm or the constant chosen after the instance, a class without hard instances, or a conclusion weaker than P = NP does not formalize Corollary 8. "Alphabet of size " in Theorem 2 and Corollary 6 (iii) is read as at most .
Codes are Mathlib Languages with the Kleene star; the composition decoder's junk transition is never used for maximal prefix codes.
A complete development needs the reductions as Turing machines, unique-factorization arguments for prefix codes, and the synchronization analysis of the Wielandt automaton. The automata and code layers are reusable. Contributions on any milestone are welcome; the polynomial-time realizations are independent of the combinatorics.
Selected references
- A. Ryzhikov, M. Szykuła, Finding Short Synchronizing Words for Prefix Codes, MFCS 2018, LIPIcs 117, 21. https://arxiv.org/abs/1806.06299 (v1), https://doi.org/10.4230/LIPIcs.MFCS.2018.21
- M. V. Berlinkov, On two algorithmic problems about synchronizing automata, DLT 2014, LNCS 8633, 61–67, 2014. https://doi.org/10.1007/978-3-319-09698-8_6
- M. V. Berlinkov, Approximating the minimum length of synchronizing words is hard, Theory of Computing Systems 54(2), 211–223, 2014. https://doi.org/10.1007/s00224-013-9511-y
- D. S. Ananichev, V. V. Gusev, M. V. Volkov, Slowly synchronizing automata and digraphs, MFCS 2010, LNCS 6281, 55–65, 2010. https://doi.org/10.1007/978-3-642-15155-2_7
- J. Berstel, D. Perrin, C. Reutenauer, Codes and Automata, Cambridge University Press, 2010. https://doi.org/10.1017/CBO9781139195768
- D. Eppstein, Reset sequences for monotonic automata, SIAM Journal on Computing 19(3), 500–510, 1990. https://doi.org/10.1137/0219033
- U. Feige, A threshold of ln n for approximating set cover, Journal of the ACM 45(4), 634–652, 1998. https://doi.org/10.1145/285055.285059
- M. V. Volkov, Synchronizing automata and the Černý conjecture, LATA 2008, LNCS 5196, 11–27, 2008. https://doi.org/10.1007/978-3-540-88282-4_4