{
  "id": "enwiki-001359402490",
  "slug": "gap-hamming-problem",
  "title": "Gap-Hamming problem",
  "qid": "",
  "lead": "In communication complexity, the gap-Hamming problem asks, if Alice and Bob are each given a (potentially different) string, what is the minimal number of bits that they need to exchange in order for Alice to approximately compute the Hamming distance between their strings. The solution to the problem roughly states that, if Alice and Bob are each given a string, then any communication protocol used to compute the Hamming distance between their strings does (asymptotically) no better than Bob sending his whole string to Alice. More specifically, if Alice and Bob are each given n -bit strings, there exists no communication protocol that lets Alice compute the hamming distance between their strings to within \\pm\\sqrt{n} using less than \\Omega(n) bits. The gap-Hamming problem has applications to proving lower bounds for many streaming algorithms, including moment frequency estimation and entropy estimation.",
  "body": "In communication complexity, the gap-Hamming problem asks, if Alice and Bob are each given a (potentially different) string, what is the minimal number of bits that they need to exchange in order for Alice to approximately compute the Hamming distance between their strings. The solution to the problem roughly states that, if Alice and Bob are each given a string, then any communication protocol used to compute the Hamming distance between their strings does (asymptotically) no better than Bob sending his whole string to Alice. More specifically, if Alice and Bob are each given n -bit strings, there exists no communication protocol that lets Alice compute the hamming distance between their strings to within \\pm\\sqrt{n} using less than \\Omega(n) bits. The gap-Hamming problem has applications to proving lower bounds for many streaming algorithms, including moment frequency estimation and entropy estimation. \\operatorname{GHD}(x, y) = \\begin{cases} +1 & D_H(x, y) \\ge \\frac{n}{2} + \\sqrt{n}\\\\ -1 & D_H(x, y) \\le \\frac{n}{2} - \\sqrt{n}\\\\ & \\text{otherwise}, \\end{cases} using the least amount of communication possible. Here, * indicates that Alice can return either of \\pm 1 and D_H(x, y) is the Hamming distance between x and y . In other words, Alice needs to return whether Bob's string is significantly similar or significantly different from hers while minimizing the number of bits she exchanges with Bob. The problem's solution states that computing \\operatorname{GHD} requires at least \\Omega(n) communication. In particular, it requires \\Omega(n) communication even when x and y are chosen uniformly at random from \\{\\pm 1\\}^n .",
  "categories": [
    "22964558",
    "23603337",
    "26220375",
    "29176583",
    "7692542"
  ],
  "license": "CC BY-SA 4.0",
  "source_uri": "https://en.wikipedia.org/w/index.php?oldid=1359402490",
  "content_hash": "",
  "created_at": null,
  "updated_at": 1781483640.0,
  "claims": [],
  "contradictions": [],
  "confidence": 0.6,
  "csl": {
    "id": "enwiki-001359402490",
    "type": "webpage",
    "title": "Gap-Hamming problem",
    "author": [
      {
        "family": "Anticloud FZ LLE",
        "literal": "Anticloud FZ LLE"
      }
    ],
    "container-title": "encyclopegia.org",
    "publisher": "Anticloud FZ LLE",
    "publisher-place": "Dubai, United Arab Emirates",
    "URL": "https://encyclopegia.org/a/gap-hamming-problem",
    "issued": {
      "date-parts": [
        [
          2026,
          11,
          19
        ]
      ]
    },
    "accessed": {
      "date-parts": [
        [
          2026,
          11,
          19
        ]
      ]
    },
    "license": "CC BY-SA 4.0",
    "DOI": "eo1:enwiki-001359402490",
    "isBasedOn": "https://en.wikipedia.org/w/index.php?oldid=1359402490",
    "note": "Immutable snapshot enwiki-001359402490"
  }
}