紗購廣

# 昼寄偽 鴬人

## 晩崗

### 査苧鉦宣 Hamming distance

2007-01-29 09:39:22|  蛍窃⦿ 室宝持拙 |  炎禰⦿ |訟烏 |忖催

和墮LOFTER 厘議孚頭慕  |

In information theory, the Hamming distance, named after Richard Hamming, is the number of positions in two strings of equal length for which the corresponding elements are different. Put another way, it measures the number of substitutions required to change one into the other.
査苧鉦宣頁參尖臥蟻，寮帽戦，査苧議兆忖凋兆議。壓佚連胎嶄⇧曾倖吉海忖憲堪岻寂議査苧鉦宣頁曾倖忖憲堪斤哘了崔議音揖忖憲議倖方。算鞘三傍⇧万祥頁繍匯倖忖憲堪延算撹総翌匯倖忖憲堪侭俶勣紋算議忖憲倖方。

For example:
箭泌⦿

The Hamming distance between 1011101 and 1001001 is 2.
The Hamming distance between 2143896 and 2233796 is 3.
The Hamming distance between "toned" and "roses" is 3.
1011101 嚥 1001001 岻寂議査苧鉦宣頁 2。
2143896 嚥 2233796 岻寂議査苧鉦宣頁 3。
"toned" 嚥 "roses" 岻寂議査苧鉦宣頁 3。

The Hamming weight of a string is its Hamming distance from the zero string (string consisting of all zeros) of the same length. That is, it is the number of elements in the string which are not zero: for a binary string this is just the number of 1's, so for instance the Hamming weight of 11101 is 4.
査苧嶷楚頁忖憲堪屢斤噐揖劔海業議巣忖憲堪議査苧鉦宣⇧匆祥頁傍⇧万頁忖憲堪嶄掲巣議圷殆倖方⦿斤噐屈序崙忖憲堪栖傍⇧祥頁 1 議倖方⇧侭參 11101 議査苧嶷楚頁 4。

The Hamming distance between two words a and b, viewed as elements of a vector space, can then be seen as the Hamming weight of a-b. If a and b are binary strings this is equivalent to a+b and to a XOR b. The Hamming distance is also equivalent to the Manhattan distance between two vertices in an n-dimensional hypercube, where n is the length of the words.
泌惚委a才b曾倖汽簡心恬頁﨑楚腎寂嶄議圷殆⇧夸万断岻寂議査苧鉦宣吉噐万断査苧嶷楚議餓a-b。泌惚頁屈序崙忖憲堪a才b⇧査苧鉦宣吉噐万断査苧嶷楚議才a+b賜宀a才b査苧嶷楚議呟賜a XOR b。査苧鉦宣匆吉噐匯倖n略議階羨圭悶貧曾倖競泣寂議凧込禽鉦宣⇧n峺議頁汽簡議海業。

The Hamming distance is used in telecommunication to count the number of flipped bits in a fixed-length binary word, an estimate of error, and so is sometimes called the signal distance. Hamming weight analysis of bits is used in several disciplines including information theory, coding theory, and cryptography. For comparing strings of different lengths, or strings where insertions or deletions are expected, not just substitutions, a more sophisticated metric like the Levenshtein distance is more appropriate.
査苧鉦宣辛參壓宥佚嶄拙柴協海屈序崙忖嶄窟伏鍬廬議危列方象了⇧侭參万匆瓜各葎佚催鉦宣。査苧嶷楚蛍裂壓淫凄佚連胎、園鷹尖胎、畜鷹僥吉糟囃脅嗤哘喘。徽頁⇧泌惚勣曳熟曾倖音揖海業議忖憲堪⇧音叙勣序佩紋算⇧遇拝勣序佩峨秘嚥評茅議塰麻⇧壓宸嶽魁栽和⇧宥械聞喘厚紗鹸墫議園辞鉦宣吉麻隈。

得胎宸嫖

#### 得胎

<#--恷仟晩崗⇧蛤鴬晩崗--> <#--容呪晩崗--> <#--哈喘芝村--> <#--鴬麼容呪--> <#--昧字堋響--> <#--遍匈容呪--> <#--煽雰貧議書爺--> <#--瓜容呪晩崗--> <#--貧匯鐙⇧和匯鐙--> <#-- 犯業 --> <#-- 利叟仟療鴻御 --> <#--嘔円庁翠潤更--> <#--得胎庁翠潤更--> <#--哈喘庁翠潤更--> <#--鴬麼窟軟議誘同-->