Skip to main content
KetQat

Appearance

Theorem · advanced

Decoding general linear codes is NP-hard

Deciding whether a given syndrome of a binary linear code is produced by an error of weight at most w is NP-complete, and so is deciding whether the code has a nonzero codeword of weight at most w. No efficient decoder for arbitrary linear codes exists unless P = NP.

Peer-reviewed resultMachine-checkedUpdated 2026-12-01 · last verified 2026-12-01

AI-assisted text, machine-checked, not yet reviewed by a person. Citations resolve and an automated pass compared the statements with the cited sources. That is not peer review; check the sources for anything you depend on.

The following decision problems are NP-complete.

  1. Syndrome decoding (coset weights). Input: a binary matrix HH, a vector ss and an integer w≥0w \ge 0. Question: is there a vector ee of Hamming weight at most ww with HeT=sH e^{T} = s?
  2. Minimum distance. Input: a binary matrix HH and an integer w≥1w \ge 1. Question: is there a nonzero vector cc of Hamming weight at most ww with HcT=0H c^{T} = 0?

Problem 1 was shown NP-complete by Berlekamp, McEliece and van Tilborg, who also proved NP-completeness of deciding whether a code has a codeword of weight exactly ww. Problem 2, which they left open, was settled by Vardy. The proofs are reductions from known NP-complete problems and are not reproduced here.

Consequently, unless P=NP\mathrm{P} = \mathrm{NP}, there is no polynomial-time algorithm that performs minimum-distance decoding for every linear code, and none that computes the minimum distance of every linear code.

The statement is about arbitrary codes in the worst case. It does not prevent specific families from having fast decoders, and it does not by itself say that decoding a random code is hard, which is the stronger assumption underlying code-based cryptography.

Holds when

  • Worst-case complexity over all binary matrices HH; the input is the matrix itself, with no promise of structure.
  • The statements concern decision problems; the corresponding search problems are at least as hard.
Builds on
Part of
Stated in

Open in the knowledge graph

Contributions about this record

Nobody has published a contribution about it yet.

Publish a result, reproduction or commentPropose a correction to this page

References

  1. E. Berlekamp, R. McEliece, H. van Tilborg (1978). On the inherent intractability of certain coding problems. IEEE Transactions on Information Theory 24 (3), 384-386. doi:10.1109/TIT.1978.1055873
  2. A. Vardy (1997). The intractability of computing the minimum distance of a code. IEEE Transactions on Information Theory 43 (6), 1757-1766. doi:10.1109/18.641542

Contributors

  • KetQat maintainers · @ketqatConceptualization; Supervision (CRediT roles)
  • Claude (AI drafting assistant)Writing, original draft (CRediT roles)

Review history

  1. Automated source check · Pass · 2026-12-01 · Independent automated verification pass (AI, not the drafting session)

    Compared with the full text of Berlekamp, McEliece and van Tilborg (1978, open copy at Caltech authors library): COSET WEIGHTS (weight at most w, xA = y) and SUBSPACE WEIGHTS (weight exactly w) proved NP-complete by reduction from 3-dimensional matching; the minimum-distance (at most w) version is not proved there. Vardy (1997) is not openly readable; its result (NP-hardness of computing the minimum distance) is confirmed by Guruswami and Vardy, arXiv cs/0405005, which cites it for that. Metadata of both references checked on Crossref.

Revision history

  1. 2026-12-01Content release 2.1.0: 35 more topics, an independent source check of every record, intake hardening (#17)80537b7e
  2. 2026-11-30KetQat Commons: free learning paths, knowledge records, research problems, literature intake (#14)571c9b10

Current revision 375bee9e2f52c1cb. Source file knowledge/records/theorem/hardness-of-decoding-linear-codes.md in the content repository (readable there once it is public).