[Jump to code hierarchy]

Maximum distance separable (MDS) code [1]

Description

A \(q\)-ary linear code whose parameters satisfy the Singleton bound with equality.

An \([n,k,d]_q\) code is MDS if parameters \(n\), \(k\), \(d\), and \(q\) are such that the Singleton bound \begin{align} d \leq n-k+1\tag*{$(1)$} \end{align}becomes an equality. Equivalently, a code with minimum distance \(d\) and dual distance \(d'\) is MDS precisely when \(d+d'=n+2\) [2; Thm. 12.3.1]. A code is called almost MDS (AMDS) when \(d=n-k\). A bound for general (i.e., nonlinear or unrestricted) \(q\)-ary codes can also be formulated; see [3; Thm. 1.9.10]. A code is near MDS (NMDS) if both the code and its dual are AMDS.

The codes \( [n,1,n]_q, [n,n-1,2]_q, [n,n]_q \) for any \(q\) are MDS codes. These are called the trivial MDS codes [4; Sec. 3.3.2]. The only binary MDS codes are the trivial ones. Many, but not all, \(q\)-ary MDS codes are related to RS codes and their extensions; see, e.g., [5; Prob. 11.11].

Protection

Given \(n\) and \(k\), MDS codes have the highest distance possible of all codes and so have the best possible error-correction properties.

The MDS conjecture states that a nontrivial linear \([n,k]_q\) MDS code has length \(n\leq q+1\), except that \(n\leq q+2\) for even \(q\) and \(k\in\{3,q-1\}\) [4; Conj. 3.3.21]. For \(q\geq 3\), these lengths are attained by doubly extended RS codes and, in the exceptional cases, by hyperoval codes and their duals [7][6; Ch. 11]. The conjecture has been proven for prime \(q\) [8] and for even \(q\) [7,9].

Realizations

Automatic repeat request (ARQ) data transmission protocols [10; Ch. 7].

Notes

See Refs. [11][5; Sec. 11.4 notes][6; Ch. 11 notes] for more on MDS codes and the MDS conjecture.An MDS code with \(k=2\) is equivalent to a set of \(n-k\) mutually orthogonal Latin squares of order \(q\) [6; Ch. 11 notes].

Cousins

  • Dual linear code— A linear binary or \(q\)-ary \([n,k,n-k+1]\) code is MDS if and only if its dual \([n,n-k,k+1]\) is MDS [3; Thm. 1.9.13].
  • Projective geometry code— A linear code is MDS (almost MDS) if and only if columns of its parity-check matrix form an \(n\)-arc (\(n\)-track) in projective space [12–15]. The dual of an MDS code is an MDS code, so MDS codes with \(k\geq 2\) are projective. All \([9,3]\) MDS codes have been tabulated [16] in terms of 9-arcs in the projective plane.
  • Repetition code— Binary repetition codes are trivial MDS codes [2; Thm. 12.3.1][4; Sec. 3.3.2].
  • MDS array code— MDS array codes are MDS codes when each matrix codeword is treated as a vector by converting each column into a single coordinate via subpacketization.
  • Distributed computation code— The first matrix multiplication code encoded each entry of the matrices to be multiplied into an MDS code [17].
  • Maximum-sum-rank distance (MSRD) code— MSRD codes generalize MDS codes from the Hamming metric to the sum-rank metric.
  • Maximum-rank distance (MRD) code— MRD codes are matrix-code analogues of MDS codes.
  • Algebraic-geometry (AG) code— Near MDS \([n,k,d]_{p^m}\) AG codes exist when \(n,p,m\) satisfy certain relations according to the Tsfasman-Vladut bound [18–21].
  • Elliptic code— Elliptic codes can be MDS [22; Exam. 15.5.3][20; pg. 310][18; Sec. 4.4.2].
  • Narrow-sense RS code— Extended and doubly extended narrow-sense RS codes are MDS [23; Thms. 5.3.2 and 5.3.4][5; Ch. 11], and there is an equivalence between the two for odd prime \(q\) [8].
  • Reed-Solomon (RS) code— Reed-Solomon codes are important examples of MDS codes, and for prime \(q\), every \([q+1,k,q-k+2]_q\) MDS code is Reed-Solomon; for non-prime \(q\), non-equivalent maximal-length MDS codes also exist [8][4; Sec. 3.3.2][5; Ch. 11].
  • Generalized Srivastava code— Generalized Srivastava codes for \(m=1\) are MDS codes [6; pg. 359].
  • \([n,n-1,2]_q\) \(q\)-ary parity-check code
  • EA mixed-alphabet Reed-Solomon c-q code— EA mixed-alphabet RS c-q codes can saturate a block-erasure bound and, in some parameter ranges, exceed the classical Singleton bound for ordinary \(q\)-ary codes [24].
  • Quantum maximum-distance-separable (MDS) code— Quantum MDS codes are quantum analogues of MDS codes.
  • Perfect-tensor code— MDS codes can be used to obtain cluster states that are AME with minimal support [25–30].
  • Quantum tensor-product code— MDS codes can be used to construct quantum tensor-product codes [31].
  • EA MDS code— MDS codes give rise to families of EA Galois-qudit codes that saturate the original (erroneous) EAQECC Singleton bound [32].

Primary Hierarchy

Parents
The Griesmer bound implies the Singleton bound, and MDS codes attain both. For \(k\geq 2\), this follows because MDS codes have distance \(d\leq q\) [6; Ch. 11].
The generalized Singleton bound becomes the Singleton bound for \(k=r\), so optimal LRCs with that constraint are MDS.
MDS codes are LP universally optimal codes [33,34].
An MDS code is an OA\(_{1}(k,n,q)\) [4; Thm. 3.3.19].
Maximum distance separable (MDS) code
Children
GRS codes have distance \(n-k+1\), saturating the Singleton bound.
A GRS code can be extended to an MDS code [23; Thm. 5.3.4]. Extended and doubly extended narrow-sense RS codes are MDS [23; Thms. 5.3.2 and 5.3.4], and there is an equivalence between the two for odd prime \(q\) [8].
Roth-Lempel codes are examples of MDS codes that are not GRS codes.
The Glynn code is a rare example of an MDS code that is not related to an RS code.
The Hirschfeld code is a rare example of an MDS code that is not related to an RS code.
Hyperoval codes are \([q+2,3,q]_q\) MDS codes [4; Sec. 3.3.2]. For even \(q\geq 4\), hyperoval codes and their duals attain the maximum length \(q+2\) of nontrivial linear MDS codes over \(\mathbb{F}_q\) [7,9].

References

  1. [1]

    R. Singleton, “Maximum distanceq-nary codes”, IEEE Transactions on Information Theory 10, 116 (1964) DOI

  2. [2]

    P. Boyvalenkov, D. Danev, “Linear programming bounds”, Concise Encyclopedia of Coding Theory (Chapman and Hall/CRC, 2021), pp. 251-266 DOI

  3. [3]

    W. C. Huffman, J.-L. Kim, and P. Solé, “Basics of coding theory”, Concise Encyclopedia of Coding Theory (Chapman and Hall/CRC, 2021), pp. 3-44 DOI

  4. [4]

    P. R. J. Östergård, “Construction and Classification of Codes”, Concise Encyclopedia of Coding Theory (Chapman and Hall/CRC, 2021), pp. 61-78 DOI

  5. [5]

    R. Roth, Introduction to Coding Theory (Cambridge University Press, 2006) DOI

  6. [6]

    F. J. MacWilliams and N. J. A. Sloane, The Theory of Error-Correcting Codes (Elsevier, 1977)

  7. [7]

    B. Chen and J. Huang, “On the MDS conjecture in even characteristic”, (2026) arXiv:2610.28208

  8. [8]

    S. Ball, “On sets of vectors of a finite vector space in which every subset of basis size is a basis”, Journal of the European Mathematical Society 14, 733 (2012) DOI

  9. [9]

    P. Kumar, “The MDS conjecture over finite fields of even order”, report and accompanying Lean formalization, Palomar record PALOMAR-2026-10-15-000014, version 1 (2026)

  10. [10]

    S. B. Wicker and V. K. Bhargava, “Reed-Solomon Codes and Their Applications”, (1999) DOI

  11. [11]

    J. W. P. Hirschfeld and J. A. Thas, “Open problems in finite projective spaces”, Finite Fields and Their Applications 32, 44 (2015) DOI

  12. [12]

    R. C. Bose, “Mathematical theory of the symmetrical factorial design”, Sankhyā: The Indian Journal of Statistics, 107-166 (1947)

  13. [13]

    S. M. Dodunekov and I. N. Landgev, “On near-MDS codes”, Proceedings of 1994 IEEE International Symposium on Information Theory 427 DOI

  14. [14]

    J. W. P. Hirschfeld and L. Storme, “The Packing Problem in Statistics, Coding Theory and Finite Projective Spaces: Update 2001”, Developments in Mathematics 201 (2001) DOI

  15. [15]

    A. Beutelspacher and U. Rosenbaum, Projective geometry: from foundations to applications (Cambridge University Press, 1998)

  16. [16]

    A. V. Iampolskaia, A. N. Skorobogatov, and E. A. Sorokin, “Formula for the number of [9,3] MDS codes”, IEEE Transactions on Information Theory 41, 1667 (1995) DOI

  17. [17]

    K. Lee, M. Lam, R. Pedarsani, D. Papailiopoulos, and K. Ramchandran, “Speeding Up Distributed Machine Learning Using Codes”, IEEE Transactions on Information Theory 64, 1514 (2018) arXiv:1512.02673 DOI

  18. [18]

    M. A. Tsfasman, S. Vlǎduţ, and D. Nogin, Algebraic Geometric Codes: Basic Notions, vol. 139 (American Mathematical Society, 2007)

  19. [19]

    M. A. Tsfasman, S. Vlǎduţ, and D. Nogin, Algebraic Geometric Codes: Advanced Chapters, vol. 238 (American Mathematical Society, 2019)

  20. [20]

    M. A. Tsfasman and S. G. Vlăduţ, Algebraic-Geometric Codes (Springer Netherlands, 1991) DOI

  21. [21]

    I. N. Landjev, “Linear codes over finite fields and finite projective geometries”, Discrete Mathematics 213, 211 (2000) DOI

  22. [22]

    A. Couvreur, H. Randriambololona, “Algebraic Geometry Codes and Some Applications”, Concise Encyclopedia of Coding Theory (Chapman and Hall/CRC, 2021), pp. 311-362 DOI

  23. [23]

    W. C. Huffman and V. Pless, Fundamentals of Error-Correcting Codes (Cambridge University Press, 2003) DOI

  24. [24]

    T. Prasad and M. Grassl, “Codes for entanglement-assisted classical communication”, npj Quantum Information 11, (2025) arXiv:2310.19774 DOI

  25. [25]

    A. V. Thapliyal, Multipartite maximally entangled states, minimal entanglement generating states and entropic inequalities unpublished presentation (2003)

  26. [26]

    W. Helwig and W. Cui, “Absolutely Maximally Entangled States: Existence and Applications”, (2013) arXiv:1306.2536

  27. [27]

    W. Helwig, “Absolutely Maximally Entangled Qudit Graph States”, (2013) arXiv:1306.2879

  28. [28]

    D. Goyeneche, D. Alsina, J. I. Latorre, A. Riera, and K. Życzkowski, “Absolutely maximally entangled states, combinatorial designs, and multiunitary matrices”, Physical Review A 92, (2015) arXiv:1506.08857 DOI

  29. [29]

    Z. Raissi, C. Gogolin, A. Riera, and A. Acín, “Optimal quantum error correcting codes from absolutely maximally entangled states”, Journal of Physics A: Mathematical and Theoretical 51, 075301 (2018) arXiv:1701.03359 DOI

  30. [30]

    D. Alsina, “PhD thesis: Multipartite entanglement and quantum algorithms”, (2017) arXiv:1706.08318

  31. [31]

    J. Fan, Y. Li, M.-H. Hsieh, and H. Chen, “On Quantum Tensor Product Codes”, (2017) arXiv:1605.09598

  32. [32]

    J. Fan, H. Chen, and J. Xu, “Constructions of q-ary entanglement-assisted quantum MDS codes with minimum distance greater than q + 1”, (2016) arXiv:1602.02235

  33. [33]

    A. Ashikhmin and A. Barg, “Binomial moments of the distance distribution: bounds and applications”, IEEE Transactions on Information Theory 45, 438 (1999) DOI

  34. [34]

    H. Cohn and Y. Zhao, “Energy-Minimizing Error-Correcting Codes”, IEEE Transactions on Information Theory 60, 7442 (2014) arXiv:1212.1913 DOI

Page edit log

Your contribution is welcome!

on github.com (edit & pull request)

— see instructions

Zoo Code ID: mds

Cite as:
“Maximum distance separable (MDS) code”, The Error Correction Zoo (V. V. Albert & P. Faist, eds.), 2026. https://errorcorrectionzoo.org/c/mds, arXiv:2606.11484
BibTeX:
@incollection{eczoo_mds,
title={Maximum distance separable (MDS) code},
booktitle={The Error Correction Zoo},
year={2026},
editor={Albert, Victor V. and Faist, Philippe},
eprint={2606.11484},
doi={10.48550/arXiv.2606.11484},
url={https://errorcorrectionzoo.org/c/mds}
}
Share via:
Twitter | Mastodon |  | E-mail
Permanent link:
https://errorcorrectionzoo.org/c/mds

Cite as:

“Maximum distance separable (MDS) code”, The Error Correction Zoo (V. V. Albert & P. Faist, eds.), 2026. https://errorcorrectionzoo.org/c/mds, arXiv:2606.11484

Github: https://github.com/errorcorrectionzoo/eczoo_data/edit/main/codes/classical/q-ary_digits/distributed_storage/mds.yml.