Cyan's Blog

Search

Search IconIcon to open search

Hamming_Distance_汉明距离

Last updated Jun 25, 2021 Edit Source

# Hamming Distance / 汉明距离

汉明距离是对于两个相同长度的字符串而言, the number of positions at which the corresponding symbols are different(相同的位置上对应字符不同的位置个数)

# 图例

带色线条是路径示意

3-bit binary cube|350

Two example distances: 100→011 has distance 3; 010→111 has distance 2

3-bit binary cube Hamming distance examples|350

4-bit binary tesseract|600 4-bit binary tesseract Hamming distance examples|600

# Hamming Weight / 汉明重量

一个字符串与相同长度的全零字符串之间的汉明距离

The Hamming weight of a string is the number of symbols that are different from the zero-symbol of the alphabet used. It is thus equivalent to the Hamming distance from the all-zero string of the same length.