{
  "slug": "maximally-recoverable-code",
  "term": "Maximally recoverable code",
  "aliases": [
    "MR code",
    "maximal recoverability"
  ],
  "definition": "A maximally recoverable code corrects every erasure pattern that is recoverable by some coefficient assignment within its prescribed parity topology.",
  "note": "The guarantee is relative to the topology. Local equations cannot protect symbols outside their support. A code may be maximally recoverable without offering the any-k survivor guarantee of an MDS code. Choosing a suitable finite field and coefficients is a separate requirement from describing the groups.\n\nFor data-local codes with one local parity per group and h global parities, Gopalan and colleagues characterize recovery by removing one coordinate per local group and requiring the remaining code to be MDS. Their Lemma 4 rules out an erasure set E touching t local groups when |E| exceeds t+h. This is an erasure statement with known missing locations, not an unknown-error correction guarantee. [mr-locality]\n\nDistance optimality concerns the worst erasure pattern, not every topology-allowed pattern. For a linear code with information locality r, d <= n-k-ceil(k/r)+2. Attaining this bound alone does not establish maximal recoverability. [locality-distance]\n\nTwo explicit GF(7) examples have n=8, k=4, information locality 2 and distance 4, but recover 57 and 60 of the 70 four-erasure sets. Only the second covers every topology-allowed set. These are fixed teaching codes, not device-failure probabilities. [hesela-coefficients]",
  "related": [
    "locally-repairable-code",
    "erasure-coding",
    "reed-solomon-code",
    "repair-locality",
    "maximum-distance-separable-code",
    "intra-disk-redundancy",
    "repair-read-amplification"
  ],
  "citations": [
    {
      "id": "mr-locality",
      "title": "Gopalan et al. Explicit Maximally Recoverable Codes with Locality. IEEE TIT (2014), section II: Definition 3 and Lemma 4.",
      "url": "https://www.microsoft.com/en-us/research/wp-content/uploads/2016/02/MRandLocalityFinal.pdf",
      "accessed": "2026-10-28"
    },
    {
      "id": "hesela-patterns",
      "title": "Local repair is not whole-node repair: which four losses can be recovered?",
      "url": "https://hesela.com/analyses/lrc-repair-costs-locality/#erasure-patterns",
      "accessed": "2026-10-19"
    },
    {
      "id": "locality-distance",
      "title": "Gopalan et al. On the Locality of Codeword Symbols. Author manuscript (2011), Theorem 5.",
      "url": "https://www.microsoft.com/en-us/research/wp-content/uploads/2016/02/r-d-codes.pdf",
      "accessed": "2026-10-28"
    },
    {
      "id": "hesela-coefficients",
      "title": "Hesela: LRC coefficient audit, explicit GF(7) matrices and exhaustive checks.",
      "url": "https://hesela.dev/research/lrc-coefficient-audit.json",
      "accessed": "2026-10-28"
    }
  ],
  "status": "research",
  "advantages": [],
  "limitations": [],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-10-28",
  "provenance": [
    "The companion enumerates two fixed topologies under the MR assumption; it does not implement or certify their coefficient construction. [hesela-patterns]",
    "The GF(7) comparison enumerates all 256 erasure sets and all 2400 nonzero messages for each fixed code; it is not a reproduction of a paper's binary-field construction. [hesela-coefficients]"
  ]
}
