Hamming Distance
Version 1.0.0 · Updated 2026-07-28
CORE DEFINITION
In information theory, the Hamming distance between two strings of equal length is the number of positions at which the corresponding symbols are different. In other words, it measures the minimum number of substitutions required to change one string into the other. The Hamming weight is the Hamming distance between a string and the zero string of the same length, that is, the number of non-zero elements in the string: for binary strings, it is the number of 1s, so the Hamming weight of 11101 is 4.
SCAFFOLDING EFFECT
Reduce cognitive load
In information theory, the Hamming distance between two strings of equal length is the number of positions at which the corresponding symbols are different. In other words, it measures the minimum number of substitutions required to change one string into the other. The Hamming weight is the Hamming distance between a string and the zero string of the same length, that is, the number of non-zero elements in the string: for binary strings, it is the number of 1s, so the Hamming weight of 11101 is 4.
Anchor fast decisions
For two strings of equal length, count the number of positions where they differ; this count is the distance. A code with minimum distance d can detect up to d-1 errors and correct up to floor((d-1)/2) errors. It quantifies "difference" as the minimum number of flips required, forming the geometric basis for error-correcting code design.
MINIMUM ACTION
In progress 0/1Practice this model in one real situation:
account_treeGenealogyexpand_more
menu_bookReferencesexpand_more
Source support: Explicit
- zh.wikipedia.orghttps://zh.wikipedia.org/wiki/%E6%B1%89%E6%98%8E%E8%B7%9D%E7%A6%BBverified
PRIVATE NOTES · Only visible to you
SAVED Q&A
ENTRY Q&A · Private saving available
Ask with a clear boundary
thinkingmodels answers from published entry context only.
Your question is sent to thinkingmodels. The answer uses public entry context only.
RELATED MODELS