{
  "slug": "x-code",
  "term": "X-code",
  "aliases": [
    "X-code array code"
  ],
  "definition": "X-code is an MDS array code with a prime number of columns and two parity rows, where each data-symbol change affects two parity symbols.",
  "note": "For an odd prime n, the n by n array holds n(n-2) data symbols in its first n-2 rows. Every column includes data and parity; there are no dedicated parity disks. Column distance three permits recovery from any two known column erasures, or correction of one unknown erroneous column under that separate error model. [xu1999]\n\nAt n=5, changing data coordinate (row 0, column 0) changes parity coordinates (3,3) and (4,2). This is two parity symbols plus the data symbol, across three columns. It is not a count of physical reads, writes or durable transactions. The payload is 15 of 25 stored symbols. [model]\n\nPrime size matters: using the same equations at n=9 gives full rank for only 27 of 36 two-column-erasure sets. Erasing columns 0 and 3 leaves rank 60 for 63 data bits. A nonzero difference in six data bits becomes invisible to all surviving symbols. These exhaustive pattern counts are not failure probabilities. [model]\n\nUpdate complexity counts parity symbols affected by one information-symbol change. It does not establish optimal single-column repair bandwidth, which counts downloaded data. A later repair study treats X-code separately from binary constructions designed for optimal repair. [xu1999] [hou2017]",
  "status": "research",
  "advantages": [],
  "limitations": [],
  "related": [
    "row-diagonal-parity",
    "maximum-distance-separable-code",
    "raid-6",
    "subpacketization"
  ],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-11-23",
  "citations": [
    {
      "id": "xu1999",
      "title": "Xu and Bruck. X-Code: MDS Array Codes with Optimal Encoding. IEEE TIT 45(1), 272-276 (1999), equation 1 and sections II-III.",
      "url": "https://authors.library.caltech.edu/records/2s8tf-z1m79",
      "accessed": "2026-11-23"
    },
    {
      "id": "hou2017",
      "title": "Hou, Lee, Han and Hu. Triple-Fault-Tolerant Binary MDS Array Codes with Asymptotically Optimal Repair. ISIT 2017, introduction.",
      "url": "https://www.cse.cuhk.edu.hk/~pclee/www/pubs/isit17.pdf",
      "accessed": "2026-11-23"
    },
    {
      "id": "model",
      "title": "Hesela: exact finite X-code update, erasure-rank and composite-size results.",
      "url": "https://hesela.dev/research/x-code/results.json",
      "accessed": "2026-11-23"
    },
    {
      "id": "code",
      "title": "Hesela: standalone X-code encoder and binary-rank checker.",
      "url": "https://hesela.dev/research/x-code/model.py",
      "accessed": "2026-11-23"
    },
    {
      "id": "tests",
      "title": "Hesela: direct-encoding, exhaustive byte-delta and ambiguity controls.",
      "url": "https://hesela.dev/research/x-code/test_model.py",
      "accessed": "2026-11-23"
    },
    {
      "id": "method",
      "title": "Hesela: X-code reproduction instructions and finite-model assumptions.",
      "url": "https://hesela.dev/research/x-code/README.txt",
      "accessed": "2026-11-23"
    }
  ],
  "provenance": [
    "The complete 1999 paper was read, including construction, proof and decoding sections; equation (1) was inspected visually. DOI: 10.1109/18.746809.",
    "The independently written model checks known erasures with correct, consistently versioned survivors. It does not implement the paper's unknown-error decoder or measure hardware performance.",
    "Finite rank checks cover n=3,5,7,9,11; the prime-size theorem is attributed to the paper, not inferred from those finite tests. The deliberately invalid n=9 construction is not a valid X-code parameter."
  ]
}
