Huffman coding with unequal letter costs is NP-complete (Codex)
Awaiting review
Importance: major (4 of 5)The takeaway
L. Sunil Chandran and Rishikesh Gajjala (arXiv 2611.04444, 3 Nov 2026) prove that deciding whether a binary prefix-free code of cost at most K exists is NP-complete when the two letter costs are part of the input, even for costs (M, M+1).
Status
- Claim
Awaiting review
- Our reporting
- Medium confidence
- Verification
- Preprint only
- Importance
- Major (4 of 5)
- Last verified
- 4 November 2026
Your AI and this story
- GPT-6 Astra188 days after its cutoff
- Claude Opus 5.5127 days after its cutoff
- Gemini 4 Argon218 days after its cutoff
- Grok 4.7157 days after its cutoff
None of these four assistants can know about it. The closest, Claude Opus 5.5, stops 127 days before it.
Key facts
- Theorem 1.1: deciding whether there is a binary prefix code of cost at most K is NP-complete, even when (c0, c1) = (M, M+1) with M part of the input; all numbers encoded in binary
- Context: Huffman (1952) solved equal letter costs; Karp (1961) gave an integer program; Golin–Rote (1998) and Bradford–Golin–Larmore–Rytter (2002) gave polynomial algorithms for every fixed pair of integer costs; Golin–Mathieu–Young (SICOMP 2012) a PTAS
- Proof: two polynomial-time reductions from Planar Independent Set through a problem on full ordered binary trees with prescribed leaf depths
- AI table: ‘Asking the research question No · Coming up with the approach Yes · Proof development Yes · Writing and exposition Yes · Checking for bugs Yes’
- Disclosure: ‘The authors initially asked OpenAI’s Codex for an NP-hardness proof for the generalized prefix-coding problem … Codex contributed to the reduction strategy and its mathematical development … The authors guided the development, requested corrections and simplifications’
- Verification: preprint, no formal proof; no Hacker News thread or expert comment found on 4 Nov
What happened
On 3 Nov 2026 (arXiv listing of 4 Nov) Chandran and Gajjala posted a proof that optimal binary prefix coding with letter costs supplied in the input is NP-hard. The abstract calls it “this longstanding open problem” and the title the resolution of a “65-year-old” question. Polynomial algorithms exist for each fixed pair of integer costs, so hardness needs the costs to grow with the input.
The paper’s “AI Methodology” section has a table: the question came from the authors; the approach, proof development, writing and bug checking used Codex. “Codex contributed to the reduction strategy and its mathematical development, including the local tree constructions, their assembly into a tree representation of an independent-set computation, and the conversion to unequal-letter-cost coding.”
Why it matters
A classical problem in information theory, listed as open in surveys of prefix coding for decades, appears settled with the key reduction attributed to a coding agent. It is an unrefereed preprint; no specialist (e.g. Golin) has commented publicly yet.
What is disputed or not yet verified
| Verification | Unrefereed preprint |
|---|
Sources
1 source from 1 site. Numbers match the chips in the text.
1 source: 1 primary
Primary
Changes
- Filed from the arXiv PDF