{
  "schemaVersion": 1,
  "kind": "worked-calculation",
  "parameters": {
    "blocks": 10000,
    "damaged": 100,
    "sampled": 460
  },
  "assumptions": [
    "One fixed run of M damaged blocks on a cyclic sequence of N equal-sized blocks.",
    "Data and damage remain unchanged during the check; any checked damaged block is recognized.",
    "Uniform subset: every size-C subset has equal probability, without replacement.",
    "Cyclic window: one start is uniform among all N positions, then C consecutive blocks are checked.",
    "Wrapping is a mathematical boundary convention, not a claim about a device command."
  ],
  "cases": [
    {
      "design": "Uniform subset",
      "hitProbability": 0.9912016587394527,
      "expectedDamagedBlocksChecked": 4.6
    },
    {
      "design": "One cyclic window",
      "hitProbability": 0.0559,
      "expectedDamagedBlocksChecked": 4.6
    }
  ],
  "formulas": {
    "uniformSubset": "1 - choose(N-M,C) / choose(N,C)",
    "cyclicWindow": "min(N,M+C-1)/N for M,C > 0; zero otherwise",
    "expectedDamagedBlocksChecked": "C*M/N for either design"
  },
  "derivation": "A cyclic window hits one damaged run from M starts inside the run or C-1 preceding starts, capped at N.",
  "limitations": [
    "Not a measured failure probability, scrub duration, cryptographic protocol or tuning recommendation.",
    "The 100-block run is deliberately constructed, not an estimated or typical HDD error cluster.",
    "A nonwrapping linear window has different boundary probabilities.",
    "The uniform-subset result holds for any fixed M damaged locations, without independent damage assumptions.",
    "Equal expected error counts do not imply equal probabilities of at least one detection."
  ],
  "sources": [
    {
      "url": "https://people.eecs.berkeley.edu/~dawnsong/papers/p598-ateniese",
      "section": "5.1"
    },
    {
      "url": "https://www.itl.nist.gov/div898/software/dataplot/refman2/ch8/hypcdf.pdf",
      "section": "Definition, equation 8-241"
    },
    {
      "url": "https://www.usenix.org/legacy/events/fast10/tech/full_papers/oprea.pdf",
      "section": "4.2, scan-order motivation only"
    }
  ],
  "generatedAt": "2026-10-18T17:10:48.468Z",
  "runtime": "v24.21.0",
  "sourceSha256": "0a671a0a076badc13a679767880231f68e2344bad6113c8623d2d54e71321749",
  "dependencySha256": "f3146644a7d312af36082afa3aa8f029f585aebd8c249f600714bfaa9cf8d8ca"
}
