{
  "slug": "counting-bloom-filter",
  "term": "Counting Bloom filter",
  "aliases": [],
  "definition": "A counting Bloom filter tracks approximate set membership with counters that support insertions and deletions through matched increments and decrements.",
  "note": "Correct deletion requires an outstanding insertion, not merely a positive lookup. Exact counters preserve colliding live keys, but clipping overflow loses multiplicity and can later yield false negatives. In the original cache-sharing design, only counter transitions between 0 and 1 change the bit array that peers receive. [summary-cache]\n\nCounter width and overflow policy are part of the contract. With 4 bits per counter, overflow requires some counter to reach 16, and with k at most (ln 2)m/n the probability is at most 1.37 × 10^-15 × m for m counters. A counter left at its maximum after overflow can cause a later false negative only if deletions bring it to 0 while a live key still maps to it. [bloom-survey]\n\nIn one scaling example, a 2 MB filter for about 1 million pages needed another 8 MB for its local counters, so the counters can outweigh the bit array that is shared. [summary-cache]",
  "status": "shipping",
  "advantages": [
    {
      "text": "Deletion support lets a filter follow a changing set without periodic rebuilding from the full key list.",
      "citationIds": [
        "bloom-survey"
      ]
    }
  ],
  "limitations": [
    {
      "text": "The overflow bound assumes near-random hashing and bounded set size, and it grows to 1.37 × 10^-15 × mt over a history of t sets.",
      "citationIds": [
        "bloom-survey"
      ]
    }
  ],
  "related": [
    "bloom-filter",
    "stable-bloom-filter",
    "cuckoo-filter",
    "blocked-bloom-filter",
    "counting-quotient-filter"
  ],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-10-23",
  "citations": [
    {
      "id": "summary-cache",
      "title": "Fan, Cao, Almeida and Broder. Summary Cache: A Scalable Wide-Area Web Cache Sharing Protocol. ToN 8(3), 2000. DOI: 10.1109/90.851975.",
      "url": "https://www.cse.iitb.ac.in/~cs641/references/bak-03-summary-cache.pdf",
      "accessed": "2026-10-23"
    },
    {
      "id": "hesela",
      "title": "Hesela. Filter retention and counting: fixed-address counterexamples.",
      "url": "https://hesela.com/analyses/bloom-filters-lsm-read-cost/#retention",
      "accessed": "2026-10-17"
    },
    {
      "id": "bloom-survey",
      "title": "Broder and Mitzenmacher. Network Applications of Bloom Filters: A Survey. Internet Mathematics 1(4), 485-509, section 2.5.",
      "url": "https://www.eecs.harvard.edu/~michaelm/postscripts/im2005b.pdf",
      "accessed": "2026-10-23"
    }
  ],
  "provenance": [
    "summary-cache read 2026-10-23 from an open university mirror, sections on counters, scalability and prototype, for the 4-bit analysis and the 2 MB and 8 MB example.",
    "bloom-survey read 2026-10-23, section 2.5, for the overflow bound and the saturating-counter behaviour.",
    "A companion analysis with fixed-address retention examples is listed but not used in prose."
  ]
}
