· 5 years ago · Feb 27, 2020, 11:28 AM
1<!DOCTYPE html>
2<html class="client-nojs" lang="en" dir="ltr">
3<head>
4<meta charset="UTF-8"/>
5<title>Hamming distance - Wikipedia</title>
6<script>document.documentElement.className="client-js";RLCONF={"wgBreakFrames":!1,"wgSeparatorTransformTable":["",""],"wgDigitTransformTable":["",""],"wgDefaultDateFormat":"dmy","wgMonthNames":["","January","February","March","April","May","June","July","August","September","October","November","December"],"wgMonthNamesShort":["","Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"wgRequestId":"Xk4NiApAIDAAALp8EH8AAACQ","wgCSPNonce":!1,"wgCanonicalNamespace":"","wgCanonicalSpecialPageName":!1,"wgNamespaceNumber":0,"wgPageName":"Hamming_distance","wgTitle":"Hamming distance","wgCurRevisionId":941648206,"wgRevisionId":941648206,"wgArticleId":41227,"wgIsArticle":!0,"wgIsRedirect":!1,"wgAction":"view","wgUserName":null,"wgUserGroups":["*"],"wgCategories":["Use American English from March 2019","All Wikipedia articles written in American English","Articles with short description","Articles lacking in-text citations from May 2015",
7"All articles lacking in-text citations","Wikipedia articles incorporating text from the Federal Standard 1037C","Articles with example Python code","Articles with example C++ code","String similarity measures","Coding theory","Metric geometry","Cubes","Similarity and distance measures"],"wgPageContentLanguage":"en","wgPageContentModel":"wikitext","wgRelevantPageName":"Hamming_distance","wgRelevantArticleId":41227,"wgIsProbablyEditable":!0,"wgRelevantPageIsProbablyEditable":!0,"wgRestrictionEdit":[],"wgRestrictionMove":[],"wgMediaViewerOnClick":!0,"wgMediaViewerEnabledByDefault":!0,"wgPopupsReferencePreviews":!1,"wgPopupsConflictsWithNavPopupGadget":!1,"wgVisualEditor":{"pageLanguageCode":"en","pageLanguageDir":"ltr","pageVariantFallbacks":"en"},"wgMFDisplayWikibaseDescriptions":{"search":!0,"nearby":!0,"watchlist":!0,"tagline":!1},"wgWMESchemaEditAttemptStepOversample":!1,"wgULSCurrentAutonym":"English","wgNoticeProject":"wikipedia","wgWikibaseItemId":
8"Q272172","wgCentralAuthMobileDomain":!1,"wgEditSubmitButtonLabelPublish":!0};RLSTATE={"ext.globalCssJs.user.styles":"ready","site.styles":"ready","noscript":"ready","user.styles":"ready","ext.globalCssJs.user":"ready","user":"ready","user.options":"ready","user.tokens":"loading","ext.cite.styles":"ready","ext.math.styles":"ready","ext.pygments":"ready","mediawiki.legacy.shared":"ready","mediawiki.legacy.commonPrint":"ready","jquery.makeCollapsible.styles":"ready","mediawiki.toc.styles":"ready","skins.vector.styles":"ready","wikibase.client.init":"ready","ext.visualEditor.desktopArticleTarget.noscript":"ready","ext.uls.interlanguage":"ready","ext.wikimediaBadges":"ready"};RLPAGEMODULES=["ext.cite.ux-enhancements","ext.math.scripts","site","mediawiki.page.startup","skins.vector.js","mediawiki.page.ready","jquery.makeCollapsible","mediawiki.toc","ext.gadget.ReferenceTooltips","ext.gadget.watchlist-notice","ext.gadget.DRN-wizard","ext.gadget.charinsert","ext.gadget.refToolbar",
9"ext.gadget.extra-toolbar-buttons","ext.gadget.switcher","ext.centralauth.centralautologin","mmv.head","mmv.bootstrap.autostart","ext.popups","ext.visualEditor.desktopArticleTarget.init","ext.visualEditor.targetLoader","ext.eventLogging","ext.wikimediaEvents","ext.navigationTiming","ext.uls.compactlinks","ext.uls.interface","ext.cx.eventlogging.campaigns","ext.quicksurveys.init","ext.centralNotice.geoIP","ext.centralNotice.startUp"];</script>
10<script>(RLQ=window.RLQ||[]).push(function(){mw.loader.implement("user.tokens@tffin",function($,jQuery,require,module){/*@nomin*/mw.user.tokens.set({"patrolToken":"+\\","watchToken":"+\\","csrfToken":"+\\"});
11});});</script>
12<link rel="stylesheet" href="/w/load.php?lang=en&modules=ext.cite.styles%7Cext.math.styles%7Cext.pygments%2CwikimediaBadges%7Cext.uls.interlanguage%7Cext.visualEditor.desktopArticleTarget.noscript%7Cjquery.makeCollapsible.styles%7Cmediawiki.legacy.commonPrint%2Cshared%7Cmediawiki.toc.styles%7Cskins.vector.styles%7Cwikibase.client.init&only=styles&skin=vector"/>
13<script async="" src="/w/load.php?lang=en&modules=startup&only=scripts&raw=1&skin=vector"></script>
14<meta name="ResourceLoaderDynamicStyles" content=""/>
15<link rel="stylesheet" href="/w/load.php?lang=en&modules=site.styles&only=styles&skin=vector"/>
16<meta name="generator" content="MediaWiki 1.35.0-wmf.19"/>
17<meta name="referrer" content="origin"/>
18<meta name="referrer" content="origin-when-crossorigin"/>
19<meta name="referrer" content="origin-when-cross-origin"/>
20<meta property="og:image" content="https://upload.wikimedia.org/wikipedia/commons/thumb/b/b4/Hamming_distance_3_bit_binary.svg/1200px-Hamming_distance_3_bit_binary.svg.png"/>
21<link rel="alternate" href="android-app://org.wikipedia/http/en.m.wikipedia.org/wiki/Hamming_distance"/>
22<link rel="alternate" type="application/x-wiki" title="Edit this page" href="/w/index.php?title=Hamming_distance&action=edit"/>
23<link rel="edit" title="Edit this page" href="/w/index.php?title=Hamming_distance&action=edit"/>
24<link rel="apple-touch-icon" href="/static/apple-touch/wikipedia.png"/>
25<link rel="shortcut icon" href="/static/favicon/wikipedia.ico"/>
26<link rel="search" type="application/opensearchdescription+xml" href="/w/opensearch_desc.php" title="Wikipedia (en)"/>
27<link rel="EditURI" type="application/rsd+xml" href="//en.wikipedia.org/w/api.php?action=rsd"/>
28<link rel="license" href="//creativecommons.org/licenses/by-sa/3.0/"/>
29<link rel="canonical" href="https://en.wikipedia.org/wiki/Hamming_distance"/>
30<link rel="dns-prefetch" href="//login.wikimedia.org"/>
31<link rel="dns-prefetch" href="//meta.wikimedia.org" />
32<!--[if lt IE 9]><script src="/w/resources/lib/html5shiv/html5shiv.js"></script><![endif]-->
33</head>
34<body class="mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject mw-editable page-Hamming_distance rootpage-Hamming_distance skin-vector action-view">
35<div id="mw-page-base" class="noprint"></div>
36<div id="mw-head-base" class="noprint"></div>
37<div id="content" class="mw-body" role="main">
38 <a id="top"></a>
39 <div id="siteNotice" class="mw-body-content"><!-- CentralNotice --></div>
40 <div class="mw-indicators mw-body-content">
41</div>
42
43 <h1 id="firstHeading" class="firstHeading" lang="en">Hamming distance</h1>
44
45 <div id="bodyContent" class="mw-body-content">
46 <div id="siteSub" class="noprint">From Wikipedia, the free encyclopedia</div>
47 <div id="contentSub"></div>
48
49
50 <div id="jump-to-nav"></div>
51 <a class="mw-jump-link" href="#mw-head">Jump to navigation</a>
52 <a class="mw-jump-link" href="#p-search">Jump to search</a>
53 <div id="mw-content-text" lang="en" dir="ltr" class="mw-content-ltr"><div class="mw-parser-output"><p class="mw-empty-elt">
54</p>
55<div class="shortdescription nomobile noexcerpt noprint searchaux" style="display:none">number of bits that differ between two strings</div>
56<table class="box-More_footnotes plainlinks metadata ambox ambox-style ambox-More_footnotes" role="presentation"><tbody><tr><td class="mbox-image"><div style="width:52px"><img alt="" src="//upload.wikimedia.org/wikipedia/commons/thumb/a/a4/Text_document_with_red_question_mark.svg/40px-Text_document_with_red_question_mark.svg.png" decoding="async" width="40" height="40" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/a/a4/Text_document_with_red_question_mark.svg/60px-Text_document_with_red_question_mark.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/a/a4/Text_document_with_red_question_mark.svg/80px-Text_document_with_red_question_mark.svg.png 2x" data-file-width="48" data-file-height="48" /></div></td><td class="mbox-text"><div class="mbox-text-span">This article includes a <a href="/wiki/Wikipedia:Citing_sources" title="Wikipedia:Citing sources">list of references</a>, but <b>its sources remain unclear</b> because it has <b>insufficient <a href="/wiki/Wikipedia:Citing_sources#Inline_citations" title="Wikipedia:Citing sources">inline citations</a></b>.<span class="hide-when-compact"> Please help to <a href="/wiki/Wikipedia:WikiProject_Fact_and_Reference_Check" class="mw-redirect" title="Wikipedia:WikiProject Fact and Reference Check">improve</a> this article by <a href="/wiki/Wikipedia:When_to_cite" title="Wikipedia:When to cite">introducing</a> more precise citations.</span> <small class="date-container"><i>(<span class="date">May 2015</span>)</i></small><small class="hide-when-compact"><i> (<a href="/wiki/Help:Maintenance_template_removal" title="Help:Maintenance template removal">Learn how and when to remove this template message</a>)</i></small></div></td></tr></tbody></table>
57<style data-mw-deduplicate="TemplateStyles:r923042769/mw-parser-output/.tmulti">.mw-parser-output .tmulti .thumbinner{display:flex;flex-direction:column}.mw-parser-output .tmulti .trow{display:flex;flex-direction:row;clear:left;flex-wrap:wrap;width:100%;box-sizing:border-box}.mw-parser-output .tmulti .tsingle{margin:1px;float:left}.mw-parser-output .tmulti .theader{clear:both;font-weight:bold;text-align:center;align-self:center;background-color:transparent;width:100%}.mw-parser-output .tmulti .thumbcaption{text-align:left;background-color:transparent}.mw-parser-output .tmulti .thumbcaption-center{text-align:center;background-color:transparent}.mw-parser-output .tmulti .text-align-left{text-align:left}.mw-parser-output .tmulti .text-align-right{text-align:right}.mw-parser-output .tmulti .text-align-center{text-align:center}@media all and (max-width:720px){.mw-parser-output .tmulti .thumbinner{width:100%!important;box-sizing:border-box;max-width:none!important;align-items:center}.mw-parser-output .tmulti .trow{justify-content:center}.mw-parser-output .tmulti .tsingle{float:none!important;max-width:100%!important;box-sizing:border-box;text-align:center}.mw-parser-output .tmulti .thumbcaption{text-align:center}}</style><div class="thumb tmulti tright"><div class="thumbinner" style="width:288px;max-width:288px"><div class="trow"><div class="tsingle" style="width:142px;max-width:142px"><div class="thumbimage"><a href="/wiki/File:Hamming_distance_3_bit_binary.svg" class="image"><img alt="3-bit binary cube" src="//upload.wikimedia.org/wikipedia/commons/thumb/b/b4/Hamming_distance_3_bit_binary.svg/140px-Hamming_distance_3_bit_binary.svg.png" decoding="async" width="140" height="111" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/b/b4/Hamming_distance_3_bit_binary.svg/210px-Hamming_distance_3_bit_binary.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/b/b4/Hamming_distance_3_bit_binary.svg/280px-Hamming_distance_3_bit_binary.svg.png 2x" data-file-width="190" data-file-height="150" /></a></div><div class="thumbcaption">3-bit binary <a href="/wiki/Cube" title="Cube">cube</a> for finding Hamming distance</div></div><div class="tsingle" style="width:142px;max-width:142px"><div class="thumbimage"><a href="/wiki/File:Hamming_distance_3_bit_binary_example.svg" class="image"><img alt="3-bit binary cube Hamming distance examples" src="//upload.wikimedia.org/wikipedia/commons/thumb/6/6e/Hamming_distance_3_bit_binary_example.svg/140px-Hamming_distance_3_bit_binary_example.svg.png" decoding="async" width="140" height="111" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/6/6e/Hamming_distance_3_bit_binary_example.svg/210px-Hamming_distance_3_bit_binary_example.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/6/6e/Hamming_distance_3_bit_binary_example.svg/280px-Hamming_distance_3_bit_binary_example.svg.png 2x" data-file-width="190" data-file-height="150" /></a></div><div class="thumbcaption">Two example distances: <span style="color:red;">100→011</span> has distance 3; <span style="color:blue;">010→111</span> has distance 2</div></div></div><div class="trow"><div class="thumbcaption" style="background-color:transparent">The minimum distance between any two vertices is the Hamming distance between the two binary strings.</div></div></div></div>
58<link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r923042769/mw-parser-output/.tmulti"/><div class="thumb tmulti tright"><div class="thumbinner" style="width:568px;max-width:568px"><div class="trow"><div class="tsingle" style="width:282px;max-width:282px"><div class="thumbimage"><a href="/wiki/File:Hamming_distance_4_bit_binary.svg" class="image"><img alt="4-bit binary tesseract" src="//upload.wikimedia.org/wikipedia/commons/thumb/b/bf/Hamming_distance_4_bit_binary.svg/280px-Hamming_distance_4_bit_binary.svg.png" decoding="async" width="280" height="170" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/b/bf/Hamming_distance_4_bit_binary.svg/420px-Hamming_distance_4_bit_binary.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/b/bf/Hamming_distance_4_bit_binary.svg/560px-Hamming_distance_4_bit_binary.svg.png 2x" data-file-width="370" data-file-height="225" /></a></div><div class="thumbcaption">4-bit binary <a href="/wiki/Tesseract" title="Tesseract">tesseract</a> for finding Hamming distance.</div></div><div class="tsingle" style="width:282px;max-width:282px"><div class="thumbimage"><a href="/wiki/File:Hamming_distance_4_bit_binary_example.svg" class="image"><img alt="4-bit binary tesseract Hamming distance examples" src="//upload.wikimedia.org/wikipedia/commons/thumb/b/b4/Hamming_distance_4_bit_binary_example.svg/280px-Hamming_distance_4_bit_binary_example.svg.png" decoding="async" width="280" height="170" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/b/b4/Hamming_distance_4_bit_binary_example.svg/420px-Hamming_distance_4_bit_binary_example.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/b/b4/Hamming_distance_4_bit_binary_example.svg/560px-Hamming_distance_4_bit_binary_example.svg.png 2x" data-file-width="370" data-file-height="225" /></a></div><div class="thumbcaption">Two example distances: <span style="color:red;">0100→1001</span> has distance 3; <span style="color:blue;">0110→1110</span> has distance 1</div></div></div></div></div>
59<p>In <a href="/wiki/Information_theory" title="Information theory">information theory</a>, the <b>Hamming distance</b> between two <a href="/wiki/String_(computer_science)" title="String (computer science)">strings</a> of equal length is the number of positions at which the corresponding <a href="/wiki/Symbol" title="Symbol">symbols</a> are different. In other words, it measures the minimum number of <i>substitutions</i> required to change one string into the other, or the minimum number of <i>errors</i> that could have transformed one string into the other. In a more general context, the Hamming distance is one of several <a href="/wiki/String_metric" title="String metric">string metrics</a> for measuring the <a href="/wiki/Edit_distance" title="Edit distance">edit distance</a> between two sequences. It is named after the American mathematician <a href="/wiki/Richard_Hamming" title="Richard Hamming">Richard Hamming</a>.
60</p><p>A major application is in <a href="/wiki/Coding_theory" title="Coding theory">coding theory</a>, more specifically to <a href="/wiki/Block_code" title="Block code">block codes</a>, in which the equal-length strings are <a href="/wiki/Vector_space" title="Vector space">vectors</a> over a <a href="/wiki/Finite_field" title="Finite field">finite field</a>.
61</p>
62<div id="toc" class="toc" role="navigation" aria-labelledby="mw-toc-heading"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none" /><div class="toctitle" lang="en" dir="ltr"><h2 id="mw-toc-heading">Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
63<ul>
64<li class="toclevel-1 tocsection-1"><a href="#Examples"><span class="tocnumber">1</span> <span class="toctext">Examples</span></a></li>
65<li class="toclevel-1 tocsection-2"><a href="#Properties"><span class="tocnumber">2</span> <span class="toctext">Properties</span></a></li>
66<li class="toclevel-1 tocsection-3"><a href="#Error_detection_and_error_correction"><span class="tocnumber">3</span> <span class="toctext">Error detection and error correction</span></a></li>
67<li class="toclevel-1 tocsection-4"><a href="#History_and_applications"><span class="tocnumber">4</span> <span class="toctext">History and applications</span></a></li>
68<li class="toclevel-1 tocsection-5"><a href="#Algorithm_example"><span class="tocnumber">5</span> <span class="toctext">Algorithm example</span></a></li>
69<li class="toclevel-1 tocsection-6"><a href="#See_also"><span class="tocnumber">6</span> <span class="toctext">See also</span></a></li>
70<li class="toclevel-1 tocsection-7"><a href="#References"><span class="tocnumber">7</span> <span class="toctext">References</span></a></li>
71<li class="toclevel-1 tocsection-8"><a href="#Further_reading"><span class="tocnumber">8</span> <span class="toctext">Further reading</span></a></li>
72</ul>
73</div>
74
75<h2><span class="mw-headline" id="Examples">Examples</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Hamming_distance&action=edit&section=1" title="Edit section: Examples">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
76<p>The Hamming distance between:
77</p>
78<ul><li>"<b><span>ka<span style="color:#0082ff">rol</span>in</span></b>" and "<b><span>ka<span style="color:red;">thr</span>in</span></b>" is 3.</li>
79<li>"<b><span>k<span style="color:#0082ff">a</span>r<span style="color:#0082ff">ol</span>in</span></b>" and "<b><span>k<span style="color:red;">e</span>r<span style="color:red;">st</span>in</span></b>" is 3.</li>
80<li><b>10<span style="color:#0082ff">1</span>1<span style="color:#0082ff">1</span>01</b> and <b>10<span style="color:red;">0</span>1<span style="color:red;">0</span>01</b> is 2.</li>
81<li><b>2<span style="color:#0082ff">17</span>3<span style="color:#0082ff">8</span>96</b> and <b>2<span style="color:red;">23</span>3<span style="color:red;">7</span>96</b> is 3.</li></ul>
82<h2><span class="mw-headline" id="Properties">Properties</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Hamming_distance&action=edit&section=2" title="Edit section: Properties">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
83<p>For a fixed length <i>n</i>, the Hamming distance is a <a href="/wiki/Metric_(mathematics)" title="Metric (mathematics)">metric</a> on the set of the <a href="/wiki/Word_(mathematics)" class="mw-redirect" title="Word (mathematics)">words</a> of length n (also known as a <a href="/wiki/Hamming_space" title="Hamming space">Hamming space</a>), as it fulfills the conditions of non-negativity, <a href="/wiki/Identity_of_indiscernibles" title="Identity of indiscernibles">identity of indiscernibles</a> and symmetry, and it can be shown by <a href="/wiki/Complete_induction" class="mw-redirect" title="Complete induction">complete induction</a> that it satisfies the <a href="/wiki/Triangle_inequality" title="Triangle inequality">triangle inequality</a> as well.<sup id="cite_ref-Robinson2003_1-0" class="reference"><a href="#cite_note-Robinson2003-1">[1]</a></sup> The Hamming distance between two words <i>a</i> and <i>b</i> can also be seen as the <a href="/wiki/Hamming_weight" title="Hamming weight">Hamming weight</a> of <i>a</i> − <i>b</i> for an appropriate choice of the − operator, much as the difference between two integers can be seen as a distance from zero on the number line.
84</p><p>For binary strings <i>a</i> and <i>b</i> the Hamming distance is equal to the number of ones (<a href="/wiki/Hamming_weight" title="Hamming weight">population count</a>) in <i>a</i> <a href="/wiki/Exclusive_or" title="Exclusive or">XOR</a> <i>b</i>.<sup id="cite_ref-Warren_2013_2-0" class="reference"><a href="#cite_note-Warren_2013-2">[2]</a></sup> The metric space of length-<i>n</i> binary strings, with the Hamming distance, is known as the <i>Hamming cube</i>; it is equivalent as a metric space to the set of distances between vertices in a <a href="/wiki/Hypercube_graph" title="Hypercube graph">hypercube graph</a>. One can also view a binary string of length <i>n</i> as a vector in <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \mathbb {R} ^{n}}">
85 <semantics>
86 <mrow class="MJX-TeXAtom-ORD">
87 <mstyle displaystyle="true" scriptlevel="0">
88 <msup>
89 <mrow class="MJX-TeXAtom-ORD">
90 <mi mathvariant="double-struck">R</mi>
91 </mrow>
92 <mrow class="MJX-TeXAtom-ORD">
93 <mi>n</mi>
94 </mrow>
95 </msup>
96 </mstyle>
97 </mrow>
98 <annotation encoding="application/x-tex">{\displaystyle \mathbb {R} ^{n}}</annotation>
99 </semantics>
100</math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/c510b63578322050121fe966f2e5770bea43308d" class="mwe-math-fallback-image-inline" aria-hidden="true" style="vertical-align: -0.338ex; width:2.897ex; height:2.343ex;" alt="\mathbb {R} ^{n}"/></span> by treating each symbol in the string as a real coordinate; with this embedding, the strings form the vertices of an <i>n</i>-dimensional <a href="/wiki/Hypercube" title="Hypercube">hypercube</a>, and the Hamming distance of the strings is equivalent to the <a href="/wiki/Manhattan_distance" class="mw-redirect" title="Manhattan distance">Manhattan distance</a> between the vertices.
101</p>
102<h2><span class="mw-headline" id="Error_detection_and_error_correction">Error detection and error correction</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Hamming_distance&action=edit&section=3" title="Edit section: Error detection and error correction">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
103<p>The <b>minimum Hamming distance</b> is used to define some essential notions in <a href="/wiki/Coding_theory" title="Coding theory">coding theory</a>, such as <a href="/wiki/Error_detection_and_correction" title="Error detection and correction">error detecting and error correcting codes</a>. In particular, a <a href="/wiki/Code_(coding_theory)" class="mw-redirect" title="Code (coding theory)">code</a> <i>C</i> is said to be <i>k</i> error detecting if, and only if, the minimum Hamming distance between any two of its codewords is at least <i>k</i>+1.<sup id="cite_ref-Robinson2003_1-1" class="reference"><a href="#cite_note-Robinson2003-1">[1]</a></sup>
104</p><p>For example, consider the code consisting of two codewords "000" and "111". The hamming distance between these two words is 3, and therefore it is <i>k</i>=2 error detecting. Which means that if one bit is flipped or two bits are flipped, the error can be detected. If three bits are flipped, then "000" becomes "111" and the error can not be detected.
105</p><p>A code <i>C</i> is said to be <i>k-errors correcting</i> if, for every word <i>w</i> in the underlying Hamming space <i>H</i>, there exists at most one codeword <i>c</i> (from <i>C</i>) such that the Hamming distance between <i>w</i> and <i>c</i> is at most <i>k</i>. In other words, a code is <i>k</i>-errors correcting if, and only if, the minimum Hamming distance between any two of its codewords is at least 2<i>k</i>+1. This is more easily understood geometrically as any <a href="/wiki/Ball_(mathematics)#Balls_in_general_metric_spaces" title="Ball (mathematics)">closed balls</a> of radius <i>k</i> centered on distinct codewords being disjoint.<sup id="cite_ref-Robinson2003_1-2" class="reference"><a href="#cite_note-Robinson2003-1">[1]</a></sup> These balls are also called <i><a href="/wiki/Hamming_sphere" class="mw-redirect" title="Hamming sphere">Hamming spheres</a></i> in this context.<sup id="cite_ref-cc17_3-0" class="reference"><a href="#cite_note-cc17-3">[3]</a></sup>
106</p><p>For example, consider the same 3 bit code consisting of two codewords "000" and "111". The Hamming space consists of 8 words 000, 001, 010, 011, 100, 101, 110 and 111. The codeword "000" and the single bit error words "001","010","100" are all less than or equal to the Hamming distance of 1 to "000". Likewise, codeword "111" and its single bit error words "110","101" and "011" are all within 1 Hamming distance of the original "111". In this code, a single bit error is always within 1 Hamming distance of the original codes, and the code can be <i>1-error correcting</i>, that is <i>k=1</i>. The minimum Hamming distance between "000" and "111" is 3, which satisfies <i>2k+1 = 3</i>.
107</p><p>Thus a code with minimum Hamming distance <i>d</i> between its codewords can detect at most <i>d</i>-1 errors and can correct ⌊(<i>d</i>-1)/2⌋ errors.<sup id="cite_ref-Robinson2003_1-3" class="reference"><a href="#cite_note-Robinson2003-1">[1]</a></sup> The latter number is also called the <i><a href="/wiki/Sphere_packing#Other_spaces" title="Sphere packing">packing radius</a></i> or the <i>error-correcting capability</i> of the code.<sup id="cite_ref-cc17_3-1" class="reference"><a href="#cite_note-cc17-3">[3]</a></sup>
108</p>
109<h2><span class="mw-headline" id="History_and_applications">History and applications</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Hamming_distance&action=edit&section=4" title="Edit section: History and applications">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
110<p>The Hamming distance is named after <a href="/wiki/Richard_Hamming" title="Richard Hamming">Richard Hamming</a>, who introduced the concept in his fundamental paper on <a href="/wiki/Hamming_code" title="Hamming code">Hamming codes</a> <i>Error detecting and error correcting codes</i> in 1950.<sup id="cite_ref-4" class="reference"><a href="#cite_note-4">[4]</a></sup> Hamming weight analysis of bits is used in several disciplines including <a href="/wiki/Information_theory" title="Information theory">information theory</a>, <a href="/wiki/Coding_theory" title="Coding theory">coding theory</a>, and <a href="/wiki/Cryptography" title="Cryptography">cryptography</a>.
111</p><p>It is used in <a href="/wiki/Telecommunication" title="Telecommunication">telecommunication</a> to count the number of flipped bits in a fixed-length binary word as an estimate of error, and therefore is sometimes called the <b>signal distance</b>.<sup id="cite_ref-Ayala2012_5-0" class="reference"><a href="#cite_note-Ayala2012-5">[5]</a></sup> For <i>q</i>-ary strings over an <a href="/wiki/Alphabet" title="Alphabet">alphabet</a> of size <i>q</i> ≥ 2 the Hamming distance is applied in case of the <a href="/wiki/Binary_symmetric_channel" title="Binary symmetric channel">q-ary symmetric channel</a>, while the <a href="/wiki/Lee_distance" title="Lee distance">Lee distance</a> is used for <a href="/wiki/Phase-shift_keying" title="Phase-shift keying">phase-shift keying</a> or more generally channels susceptible to <a href="/w/index.php?title=Synchronization_error&action=edit&redlink=1" class="new" title="Synchronization error (page does not exist)">synchronization errors</a> because the Lee distance accounts for errors of ±1.<sup id="cite_ref-Roth2006_6-0" class="reference"><a href="#cite_note-Roth2006-6">[6]</a></sup> If <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle q=2}">
112 <semantics>
113 <mrow class="MJX-TeXAtom-ORD">
114 <mstyle displaystyle="true" scriptlevel="0">
115 <mi>q</mi>
116 <mo>=</mo>
117 <mn>2</mn>
118 </mstyle>
119 </mrow>
120 <annotation encoding="application/x-tex">{\displaystyle q=2}</annotation>
121 </semantics>
122</math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/26622af6012fb982cab4e9584f57dd4f364233b7" class="mwe-math-fallback-image-inline" aria-hidden="true" style="vertical-align: -0.671ex; width:5.33ex; height:2.509ex;" alt="q=2"/></span> or <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle q=3}">
123 <semantics>
124 <mrow class="MJX-TeXAtom-ORD">
125 <mstyle displaystyle="true" scriptlevel="0">
126 <mi>q</mi>
127 <mo>=</mo>
128 <mn>3</mn>
129 </mstyle>
130 </mrow>
131 <annotation encoding="application/x-tex">{\displaystyle q=3}</annotation>
132 </semantics>
133</math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/2d859ff2e5023ed1f714ccace69e88ab993a5f43" class="mwe-math-fallback-image-inline" aria-hidden="true" style="vertical-align: -0.671ex; width:5.33ex; height:2.509ex;" alt="{\displaystyle q=3}"/></span> both distances coincide because any pair of elements from <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\textstyle \mathbb {Z} /2\mathbb {Z} }">
134 <semantics>
135 <mrow class="MJX-TeXAtom-ORD">
136 <mstyle displaystyle="false" scriptlevel="0">
137 <mrow class="MJX-TeXAtom-ORD">
138 <mi mathvariant="double-struck">Z</mi>
139 </mrow>
140 <mrow class="MJX-TeXAtom-ORD">
141 <mo>/</mo>
142 </mrow>
143 <mn>2</mn>
144 <mrow class="MJX-TeXAtom-ORD">
145 <mi mathvariant="double-struck">Z</mi>
146 </mrow>
147 </mstyle>
148 </mrow>
149 <annotation encoding="application/x-tex">{\textstyle \mathbb {Z} /2\mathbb {Z} }</annotation>
150 </semantics>
151</math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/4c9b3fa90898e3378d925bb1e2b191f2ff92a5eb" class="mwe-math-fallback-image-inline" aria-hidden="true" style="vertical-align: -0.838ex; width:5.426ex; height:2.843ex;" alt="{\textstyle \mathbb {Z} /2\mathbb {Z} }"/></span> or <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\textstyle \mathbb {Z} /3\mathbb {Z} }">
152 <semantics>
153 <mrow class="MJX-TeXAtom-ORD">
154 <mstyle displaystyle="false" scriptlevel="0">
155 <mrow class="MJX-TeXAtom-ORD">
156 <mi mathvariant="double-struck">Z</mi>
157 </mrow>
158 <mrow class="MJX-TeXAtom-ORD">
159 <mo>/</mo>
160 </mrow>
161 <mn>3</mn>
162 <mrow class="MJX-TeXAtom-ORD">
163 <mi mathvariant="double-struck">Z</mi>
164 </mrow>
165 </mstyle>
166 </mrow>
167 <annotation encoding="application/x-tex">{\textstyle \mathbb {Z} /3\mathbb {Z} }</annotation>
168 </semantics>
169</math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/890848811f0aafa82a3a5637dcb726b10273a3b8" class="mwe-math-fallback-image-inline" aria-hidden="true" style="vertical-align: -0.838ex; width:5.426ex; height:2.843ex;" alt="{\textstyle \mathbb {Z} /3\mathbb {Z} }"/></span> differ by 1, but the distances are different for larger <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle q}">
170 <semantics>
171 <mrow class="MJX-TeXAtom-ORD">
172 <mstyle displaystyle="true" scriptlevel="0">
173 <mi>q</mi>
174 </mstyle>
175 </mrow>
176 <annotation encoding="application/x-tex">{\displaystyle q}</annotation>
177 </semantics>
178</math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/06809d64fa7c817ffc7e323f85997f783dbdf71d" class="mwe-math-fallback-image-inline" aria-hidden="true" style="vertical-align: -0.671ex; width:1.07ex; height:2.009ex;" alt="q"/></span>.
179</p><p>The Hamming distance is also used in <a href="/wiki/Systematics" title="Systematics">systematics</a> as a measure of genetic distance.<sup id="cite_ref-7" class="reference"><a href="#cite_note-7">[7]</a></sup>
180</p><p>However, for comparing strings of different lengths, or strings where not just substitutions but also insertions or deletions have to be expected, a more sophisticated metric like the <a href="/wiki/Levenshtein_distance" title="Levenshtein distance">Levenshtein distance</a> is more appropriate.
181</p><p>In processor interconnects, the dynamic energy consumption depends on the number of transitions. With level-signaling scheme, the number of transitions depends on Hamming distance between consecutively transmitted buses.<sup id="cite_ref-8" class="reference"><a href="#cite_note-8">[8]</a></sup> Hence, by reducing this Hamming distance, the data-movement energy can be reduced.
182</p>
183<h2><span class="mw-headline" id="Algorithm_example">Algorithm example</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Hamming_distance&action=edit&section=5" title="Edit section: Algorithm example">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
184<p>The function <code>hamming_distance()</code>, implemented in <a href="/wiki/Python_(programming_language)" title="Python (programming language)">Python 2.3+</a>, computes the Hamming distance between
185two strings (or other <a href="/wiki/Iterator" title="Iterator">iterable</a> objects) of equal length by creating a sequence of Boolean values indicating mismatches and matches between corresponding positions in the two inputs and then summing the sequence with False and True values being interpreted as zero and one.
186</p>
187<div style="clear:both;"></div>
188<div class="mw-highlight mw-content-ltr" dir="ltr"><pre><span></span><span class="k">def</span> <span class="nf">hamming_distance</span><span class="p">(</span><span class="n">s1</span><span class="p">,</span> <span class="n">s2</span><span class="p">)</span> <span class="o">-></span> <span class="nb">int</span><span class="p">:</span>
189 <span class="sd">"""Return the Hamming distance between equal-length sequences."""</span>
190 <span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">s1</span><span class="p">)</span> <span class="o">!=</span> <span class="nb">len</span><span class="p">(</span><span class="n">s2</span><span class="p">):</span>
191 <span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="s2">"Undefined for sequences of unequal length."</span><span class="p">)</span>
192 <span class="k">return</span> <span class="nb">sum</span><span class="p">(</span><span class="n">el1</span> <span class="o">!=</span> <span class="n">el2</span> <span class="k">for</span> <span class="n">el1</span><span class="p">,</span> <span class="n">el2</span> <span class="ow">in</span> <span class="nb">zip</span><span class="p">(</span><span class="n">s1</span><span class="p">,</span> <span class="n">s2</span><span class="p">))</span>
193</pre></div>
194<p>where the <a rel="nofollow" class="external text" href="https://docs.python.org/2/library/functions.html#zip">zip()</a> function merges two equal-length collections in pairs.
195</p><p>The following <a href="/wiki/C_(programming_language)" title="C (programming language)">C</a> function will compute the Hamming distance of two integers (considered as binary values, that is, as sequences of bits). The running time of this procedure is proportional to the Hamming distance rather than to the number of bits in the inputs. It computes the <a href="/wiki/Bitwise_operation" title="Bitwise operation">bitwise</a> <a href="/wiki/Exclusive_or" title="Exclusive or">exclusive or</a> of the two inputs, and then finds the <a href="/wiki/Hamming_weight" title="Hamming weight">Hamming weight</a> of the result (the number of nonzero bits) using an algorithm of <a href="#CITEREFWegner1960">Wegner (1960)</a> that repeatedly finds and clears the lowest-order nonzero bit. Some compilers support the <a href="/wiki/Hamming_weight#Language_support" title="Hamming weight">__builtin_popcount</a> function which can calculate this using specialized processor hardware where available.
196</p>
197<div class="mw-highlight mw-content-ltr" dir="ltr"><pre><span></span><span class="kt">int</span> <span class="nf">hamming_distance</span><span class="p">(</span><span class="kt">unsigned</span> <span class="n">x</span><span class="p">,</span> <span class="kt">unsigned</span> <span class="n">y</span><span class="p">)</span>
198<span class="p">{</span>
199 <span class="kt">int</span> <span class="n">dist</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
200
201 <span class="c1">// Count the number of bits set</span>
202 <span class="k">for</span> <span class="p">(</span><span class="kt">unsigned</span> <span class="n">val</span> <span class="o">=</span> <span class="n">x</span> <span class="o">^</span> <span class="n">y</span><span class="p">;</span> <span class="n">val</span> <span class="o">></span> <span class="mi">0</span><span class="p">;</span> <span class="n">val</span> <span class="o">=</span> <span class="n">val</span> <span class="o">>></span> <span class="mi">1</span><span class="p">)</span>
203 <span class="p">{</span>
204 <span class="c1">// If A bit is set, so increment the count</span>
205 <span class="k">if</span> <span class="p">(</span><span class="n">val</span> <span class="o">&</span> <span class="mi">1</span><span class="p">)</span>
206 <span class="n">dist</span><span class="o">++</span><span class="p">;</span>
207 <span class="c1">// Clear (delete) val's lowest-order bit</span>
208 <span class="p">}</span>
209
210 <span class="c1">// Return the number of differing bits</span>
211 <span class="k">return</span> <span class="n">dist</span><span class="p">;</span>
212<span class="p">}</span>
213</pre></div>
214<p>Or, a much faster hardware alternative (for compilers that support builtins) is to use popcount like so.
215</p>
216<div class="mw-highlight mw-content-ltr" dir="ltr"><pre><span></span><span class="kt">int</span> <span class="nf">hamming_distance</span><span class="p">(</span><span class="kt">unsigned</span> <span class="n">x</span><span class="p">,</span> <span class="kt">unsigned</span> <span class="n">y</span><span class="p">)</span>
217<span class="p">{</span>
218 <span class="k">return</span> <span class="n">__builtin_popcount</span><span class="p">(</span><span class="n">x</span> <span class="o">^</span> <span class="n">y</span><span class="p">);</span>
219<span class="p">}</span>
220<span class="c1">//if your compiler supports 64-bit integers</span>
221<span class="kt">int</span> <span class="nf">hamming_distance</span><span class="p">(</span><span class="kt">unsigned</span> <span class="kt">long</span> <span class="kt">long</span> <span class="n">x</span><span class="p">,</span> <span class="kt">unsigned</span> <span class="kt">long</span> <span class="kt">long</span> <span class="n">y</span><span class="p">)</span>
222<span class="p">{</span>
223 <span class="k">return</span> <span class="n">__builtin_popcountll</span><span class="p">(</span><span class="n">x</span> <span class="o">^</span> <span class="n">y</span><span class="p">);</span>
224<span class="p">}</span>
225</pre></div>
226<h2><span class="mw-headline" id="See_also">See also</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Hamming_distance&action=edit&section=6" title="Edit section: See also">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
227<style data-mw-deduplicate="TemplateStyles:r936637989">.mw-parser-output .portal{border:solid #aaa 1px;padding:0}.mw-parser-output .portal.tleft{margin:0.5em 1em 0.5em 0}.mw-parser-output .portal.tright{margin:0.5em 0 0.5em 1em}.mw-parser-output .portal>ul{display:table;box-sizing:border-box;padding:0.1em;max-width:175px;background:#f9f9f9;font-size:85%;line-height:110%;font-style:italic;font-weight:bold}.mw-parser-output .portal>ul>li{display:table-row}.mw-parser-output .portal>ul>li>span:first-child{display:table-cell;padding:0.2em;vertical-align:middle;text-align:center}.mw-parser-output .portal>ul>li>span:last-child{display:table-cell;padding:0.2em 0.2em 0.2em 0.3em;vertical-align:middle}</style><div role="navigation" aria-label="Portals" class="noprint portal plainlist tright">
228<ul>
229<li><span><a href="/wiki/File:Nuvola_apps_edu_mathematics_blue-p.svg" class="image"><img alt="icon" src="//upload.wikimedia.org/wikipedia/commons/thumb/3/3e/Nuvola_apps_edu_mathematics_blue-p.svg/28px-Nuvola_apps_edu_mathematics_blue-p.svg.png" decoding="async" width="28" height="28" class="noviewer" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/3/3e/Nuvola_apps_edu_mathematics_blue-p.svg/42px-Nuvola_apps_edu_mathematics_blue-p.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/3/3e/Nuvola_apps_edu_mathematics_blue-p.svg/56px-Nuvola_apps_edu_mathematics_blue-p.svg.png 2x" data-file-width="128" data-file-height="128" /></a></span><span><a href="/wiki/Portal:Mathematics" title="Portal:Mathematics">Mathematics portal</a></span></li></ul></div>
230<ul><li><a href="/wiki/Closest_string" title="Closest string">Closest string</a></li>
231<li><a href="/wiki/Damerau%E2%80%93Levenshtein_distance" title="Damerau–Levenshtein distance">Damerau–Levenshtein distance</a></li>
232<li><a href="/wiki/Euclidean_distance" title="Euclidean distance">Euclidean distance</a></li>
233<li><a href="/wiki/Gap-Hamming_problem" title="Gap-Hamming problem">Gap-Hamming problem</a></li>
234<li><a href="/wiki/Gray_code" title="Gray code">Gray code</a></li>
235<li><a href="/wiki/Jaccard_index" title="Jaccard index">Jaccard index</a></li>
236<li><a href="/wiki/Levenshtein_distance" title="Levenshtein distance">Levenshtein distance</a></li>
237<li><a href="/wiki/Mahalanobis_distance" title="Mahalanobis distance">Mahalanobis distance</a></li>
238<li><a href="/wiki/S%C3%B8rensen_similarity_index" class="mw-redirect" title="Sørensen similarity index">Sørensen similarity index</a></li>
239<li><a href="/wiki/Sparse_distributed_memory" title="Sparse distributed memory">Sparse distributed memory</a></li>
240<li><a href="/wiki/Word_ladder" title="Word ladder">Word ladder</a></li></ul>
241<h2><span class="mw-headline" id="References">References</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Hamming_distance&action=edit&section=7" title="Edit section: References">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
242<div class="reflist" style="list-style-type: decimal;">
243<div class="mw-references-wrap"><ol class="references">
244<li id="cite_note-Robinson2003-1"><span class="mw-cite-backlink">^ <a href="#cite_ref-Robinson2003_1-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-Robinson2003_1-1"><sup><i><b>b</b></i></sup></a> <a href="#cite_ref-Robinson2003_1-2"><sup><i><b>c</b></i></sup></a> <a href="#cite_ref-Robinson2003_1-3"><sup><i><b>d</b></i></sup></a></span> <span class="reference-text"><cite class="citation book">Robinson, Derek J. S. (2003). <i>An Introduction to Abstract Algebra</i>. <a href="/wiki/Walter_de_Gruyter" title="Walter de Gruyter">Walter de Gruyter</a>. pp. 255–257. <a href="/wiki/International_Standard_Book_Number" title="International Standard Book Number">ISBN</a> <a href="/wiki/Special:BookSources/978-3-11-019816-4" title="Special:BookSources/978-3-11-019816-4"><bdi>978-3-11-019816-4</bdi></a>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=book&rft.btitle=An+Introduction+to+Abstract+Algebra&rft.pages=255-257&rft.pub=Walter+de+Gruyter&rft.date=2003&rft.isbn=978-3-11-019816-4&rft.aulast=Robinson&rft.aufirst=Derek+J.+S.&rfr_id=info%3Asid%2Fen.wikipedia.org%3AHamming+distance" class="Z3988"></span><style data-mw-deduplicate="TemplateStyles:r935243608">.mw-parser-output cite.citation{font-style:inherit}.mw-parser-output .citation q{quotes:"\"""\"""'""'"}.mw-parser-output .id-lock-free a,.mw-parser-output .citation .cs1-lock-free a{background:url("//upload.wikimedia.org/wikipedia/commons/thumb/6/65/Lock-green.svg/9px-Lock-green.svg.png")no-repeat;background-position:right .1em center}.mw-parser-output .id-lock-limited a,.mw-parser-output .id-lock-registration a,.mw-parser-output .citation .cs1-lock-limited a,.mw-parser-output .citation .cs1-lock-registration a{background:url("//upload.wikimedia.org/wikipedia/commons/thumb/d/d6/Lock-gray-alt-2.svg/9px-Lock-gray-alt-2.svg.png")no-repeat;background-position:right .1em center}.mw-parser-output .id-lock-subscription a,.mw-parser-output .citation .cs1-lock-subscription a{background:url("//upload.wikimedia.org/wikipedia/commons/thumb/a/aa/Lock-red-alt-2.svg/9px-Lock-red-alt-2.svg.png")no-repeat;background-position:right .1em center}.mw-parser-output .cs1-subscription,.mw-parser-output .cs1-registration{color:#555}.mw-parser-output .cs1-subscription span,.mw-parser-output .cs1-registration span{border-bottom:1px dotted;cursor:help}.mw-parser-output .cs1-ws-icon a{background:url("//upload.wikimedia.org/wikipedia/commons/thumb/4/4c/Wikisource-logo.svg/12px-Wikisource-logo.svg.png")no-repeat;background-position:right .1em center}.mw-parser-output code.cs1-code{color:inherit;background:inherit;border:inherit;padding:inherit}.mw-parser-output .cs1-hidden-error{display:none;font-size:100%}.mw-parser-output .cs1-visible-error{font-size:100%}.mw-parser-output .cs1-maint{display:none;color:#33aa33;margin-left:0.3em}.mw-parser-output .cs1-subscription,.mw-parser-output .cs1-registration,.mw-parser-output .cs1-format{font-size:95%}.mw-parser-output .cs1-kern-left,.mw-parser-output .cs1-kern-wl-left{padding-left:0.2em}.mw-parser-output .cs1-kern-right,.mw-parser-output .cs1-kern-wl-right{padding-right:0.2em}</style></span>
245</li>
246<li id="cite_note-Warren_2013-2"><span class="mw-cite-backlink"><b><a href="#cite_ref-Warren_2013_2-0">^</a></b></span> <span class="reference-text"><cite class="citation book">Warren, Jr., Henry S. (2013) [2002]. <a href="/wiki/Hacker%27s_Delight" title="Hacker's Delight"><i>Hacker's Delight</i></a> (2 ed.). <a href="/wiki/Addison_Wesley" class="mw-redirect" title="Addison Wesley">Addison Wesley</a> - <a href="/wiki/Pearson_Education,_Inc." class="mw-redirect" title="Pearson Education, Inc.">Pearson Education, Inc.</a> pp. 81–96. <a href="/wiki/International_Standard_Book_Number" title="International Standard Book Number">ISBN</a> <a href="/wiki/Special:BookSources/978-0-321-84268-8" title="Special:BookSources/978-0-321-84268-8"><bdi>978-0-321-84268-8</bdi></a>. 0-321-84268-5.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=book&rft.btitle=Hacker%27s+Delight&rft.pages=81-96&rft.edition=2&rft.pub=Addison+Wesley+-+Pearson+Education%2C+Inc.&rft.date=2013&rft.isbn=978-0-321-84268-8&rft.aulast=Warren%2C+Jr.&rft.aufirst=Henry+S.&rfr_id=info%3Asid%2Fen.wikipedia.org%3AHamming+distance" class="Z3988"></span><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r935243608"/></span>
247</li>
248<li id="cite_note-cc17-3"><span class="mw-cite-backlink">^ <a href="#cite_ref-cc17_3-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-cc17_3-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><cite id="CITEREFCohenHonkalaLitsynLobstein1997" class="citation">Cohen, G.; Honkala, I.; Litsyn, S.; Lobstein, A. (1997), <i>Covering Codes</i>, North-Holland Mathematical Library, <b>54</b>, <a href="/wiki/Elsevier" title="Elsevier">Elsevier</a>, pp. 16–17, <a href="/wiki/International_Standard_Book_Number" title="International Standard Book Number">ISBN</a> <a href="/wiki/Special:BookSources/9780080530079" title="Special:BookSources/9780080530079"><bdi>9780080530079</bdi></a></cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=book&rft.btitle=Covering+Codes&rft.series=North-Holland+Mathematical+Library&rft.pages=16-17&rft.pub=Elsevier&rft.date=1997&rft.isbn=9780080530079&rft.aulast=Cohen&rft.aufirst=G.&rft.au=Honkala%2C+I.&rft.au=Litsyn%2C+S.&rft.au=Lobstein%2C+A.&rfr_id=info%3Asid%2Fen.wikipedia.org%3AHamming+distance" class="Z3988"></span><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r935243608"/></span>
249</li>
250<li id="cite_note-4"><span class="mw-cite-backlink"><b><a href="#cite_ref-4">^</a></b></span> <span class="reference-text"><cite class="citation journal">Hamming, R. W. (April 1950). <a rel="nofollow" class="external text" href="https://calhoun.nps.edu/bitstream/10945/46756/1/Hamming_1982.pdf">"Error detecting and error correcting codes"</a> <span class="cs1-format">(PDF)</span>. <i>The Bell System Technical Journal</i>. <b>29</b> (2): 147–160. <a href="/wiki/Digital_object_identifier" title="Digital object identifier">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1002%2Fj.1538-7305.1950.tb00463.x">10.1002/j.1538-7305.1950.tb00463.x</a>. <a href="/wiki/International_Standard_Serial_Number" title="International Standard Serial Number">ISSN</a> <a rel="nofollow" class="external text" href="//www.worldcat.org/issn/0005-8580">0005-8580</a>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.jtitle=The+Bell+System+Technical+Journal&rft.atitle=Error+detecting+and+error+correcting+codes&rft.volume=29&rft.issue=2&rft.pages=147-160&rft.date=1950-04&rft_id=info%3Adoi%2F10.1002%2Fj.1538-7305.1950.tb00463.x&rft.issn=0005-8580&rft.aulast=Hamming&rft.aufirst=R.+W.&rft_id=https%3A%2F%2Fcalhoun.nps.edu%2Fbitstream%2F10945%2F46756%2F1%2FHamming_1982.pdf&rfr_id=info%3Asid%2Fen.wikipedia.org%3AHamming+distance" class="Z3988"></span><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r935243608"/></span>
251</li>
252<li id="cite_note-Ayala2012-5"><span class="mw-cite-backlink"><b><a href="#cite_ref-Ayala2012_5-0">^</a></b></span> <span class="reference-text"><cite class="citation book">Ayala, Jose (2012). <i>Integrated Circuit and System Design</i>. <a href="/wiki/Springer_Science%2BBusiness_Media" title="Springer Science+Business Media">Springer</a>. p. 62. <a href="/wiki/International_Standard_Book_Number" title="International Standard Book Number">ISBN</a> <a href="/wiki/Special:BookSources/978-3-642-36156-2" title="Special:BookSources/978-3-642-36156-2"><bdi>978-3-642-36156-2</bdi></a>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=book&rft.btitle=Integrated+Circuit+and+System+Design&rft.pages=62&rft.pub=Springer&rft.date=2012&rft.isbn=978-3-642-36156-2&rft.aulast=Ayala&rft.aufirst=Jose&rfr_id=info%3Asid%2Fen.wikipedia.org%3AHamming+distance" class="Z3988"></span><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r935243608"/></span>
253</li>
254<li id="cite_note-Roth2006-6"><span class="mw-cite-backlink"><b><a href="#cite_ref-Roth2006_6-0">^</a></b></span> <span class="reference-text"><cite class="citation book">Roth, Ron (2006). <i>Introduction to Coding Theory</i>. <a href="/wiki/Cambridge_University_Press" title="Cambridge University Press">Cambridge University Press</a>. p. 298. <a href="/wiki/International_Standard_Book_Number" title="International Standard Book Number">ISBN</a> <a href="/wiki/Special:BookSources/978-0-521-84504-5" title="Special:BookSources/978-0-521-84504-5"><bdi>978-0-521-84504-5</bdi></a>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=book&rft.btitle=Introduction+to+Coding+Theory&rft.pages=298&rft.pub=Cambridge+University+Press&rft.date=2006&rft.isbn=978-0-521-84504-5&rft.aulast=Roth&rft.aufirst=Ron&rfr_id=info%3Asid%2Fen.wikipedia.org%3AHamming+distance" class="Z3988"></span><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r935243608"/></span>
255</li>
256<li id="cite_note-7"><span class="mw-cite-backlink"><b><a href="#cite_ref-7">^</a></b></span> <span class="reference-text"><cite class="citation journal">Pilcher, Christopher D.; Wong, Joseph K.; Pillai, Satish K. (2008-03-18). <a rel="nofollow" class="external text" href="//www.ncbi.nlm.nih.gov/pmc/articles/PMC2267810">"Inferring HIV Transmission Dynamics from Phylogenetic Sequence Relationships"</a>. <i>PLOS Medicine</i>. <b>5</b> (3): e69. <a href="/wiki/Digital_object_identifier" title="Digital object identifier">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1371%2Fjournal.pmed.0050069">10.1371/journal.pmed.0050069</a>. <a href="/wiki/International_Standard_Serial_Number" title="International Standard Serial Number">ISSN</a> <a rel="nofollow" class="external text" href="//www.worldcat.org/issn/1549-1676">1549-1676</a>. <a href="/wiki/PubMed_Central" title="PubMed Central">PMC</a> <span class="cs1-lock-free" title="Freely accessible"><a rel="nofollow" class="external text" href="//www.ncbi.nlm.nih.gov/pmc/articles/PMC2267810">2267810</a></span>. <a href="/wiki/PubMed_Identifier" class="mw-redirect" title="PubMed Identifier">PMID</a> <a rel="nofollow" class="external text" href="//pubmed.ncbi.nlm.nih.gov/18351799">18351799</a>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.jtitle=PLOS+Medicine&rft.atitle=Inferring+HIV+Transmission+Dynamics+from+Phylogenetic+Sequence+Relationships&rft.volume=5&rft.issue=3&rft.pages=e69&rft.date=2008-03-18&rft_id=%2F%2Fwww.ncbi.nlm.nih.gov%2Fpmc%2Farticles%2FPMC2267810&rft.issn=1549-1676&rft_id=info%3Apmid%2F18351799&rft_id=info%3Adoi%2F10.1371%2Fjournal.pmed.0050069&rft.aulast=Pilcher&rft.aufirst=Christopher+D.&rft.au=Wong%2C+Joseph+K.&rft.au=Pillai%2C+Satish+K.&rft_id=%2F%2Fwww.ncbi.nlm.nih.gov%2Fpmc%2Farticles%2FPMC2267810&rfr_id=info%3Asid%2Fen.wikipedia.org%3AHamming+distance" class="Z3988"></span><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r935243608"/></span>
257</li>
258<li id="cite_note-8"><span class="mw-cite-backlink"><b><a href="#cite_ref-8">^</a></b></span> <span class="reference-text">"<a rel="nofollow" class="external text" href="https://www.academia.edu/37704595/A_Survey_of_Encoding_Techniques_for_Reducing_Data-Movement_Energy">A Survey of Encoding Techniques for Reducing Data-Movement Energy</a>", JSA, 2018</span>
259</li>
260</ol></div></div>
261<h2><span class="mw-headline" id="Further_reading">Further reading</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Hamming_distance&action=edit&section=8" title="Edit section: Further reading">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
262<ul><li><img alt="" src="//upload.wikimedia.org/wikipedia/en/thumb/6/62/PD-icon.svg/12px-PD-icon.svg.png" decoding="async" width="12" height="12" srcset="//upload.wikimedia.org/wikipedia/en/thumb/6/62/PD-icon.svg/18px-PD-icon.svg.png 1.5x, //upload.wikimedia.org/wikipedia/en/thumb/6/62/PD-icon.svg/24px-PD-icon.svg.png 2x" data-file-width="196" data-file-height="196" /> This article incorporates <a href="/wiki/Copyright_status_of_works_by_the_federal_government_of_the_United_States" title="Copyright status of works by the federal government of the United States">public domain material</a> from the <a href="/wiki/General_Services_Administration" title="General Services Administration">General Services Administration</a> document <a rel="nofollow" class="external text" href="http://www.its.bldrdoc.gov/fs-1037/fs-1037c.htm">"Federal Standard 1037C"</a>.</li>
263<li><cite class="citation journal"><a href="/wiki/Peter_Wegner" title="Peter Wegner">Wegner, Peter</a> (1960). "A technique for counting ones in a binary computer". <i><a href="/wiki/Communications_of_the_ACM" title="Communications of the ACM">Communications of the ACM</a></i>. <b>3</b> (5): 322. <a href="/wiki/Digital_object_identifier" title="Digital object identifier">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1145%2F367236.367286">10.1145/367236.367286</a>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.jtitle=Communications+of+the+ACM&rft.atitle=A+technique+for+counting+ones+in+a+binary+computer&rft.volume=3&rft.issue=5&rft.pages=322&rft.date=1960&rft_id=info%3Adoi%2F10.1145%2F367236.367286&rft.aulast=Wegner&rft.aufirst=Peter&rfr_id=info%3Asid%2Fen.wikipedia.org%3AHamming+distance" class="Z3988"></span><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r935243608"/></li>
264<li><cite class="citation book"><a href="/wiki/David_J._C._MacKay" title="David J. C. MacKay">MacKay, David J. C.</a> (2003). <a rel="nofollow" class="external text" href="http://www.inference.phy.cam.ac.uk/mackay/itila/book.html"><i>Information Theory, Inference, and Learning Algorithms</i></a>. Cambridge: <a href="/wiki/Cambridge_University_Press" title="Cambridge University Press">Cambridge University Press</a>. <a href="/wiki/International_Standard_Book_Number" title="International Standard Book Number">ISBN</a> <a href="/wiki/Special:BookSources/0-521-64298-1" title="Special:BookSources/0-521-64298-1"><bdi>0-521-64298-1</bdi></a>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=book&rft.btitle=Information+Theory%2C+Inference%2C+and+Learning+Algorithms&rft.place=Cambridge&rft.pub=Cambridge+University+Press&rft.date=2003&rft.isbn=0-521-64298-1&rft.aulast=MacKay&rft.aufirst=David+J.+C.&rft_id=http%3A%2F%2Fwww.inference.phy.cam.ac.uk%2Fmackay%2Fitila%2Fbook.html&rfr_id=info%3Asid%2Fen.wikipedia.org%3AHamming+distance" class="Z3988"></span><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r935243608"/></li></ul>
265<div role="navigation" class="navbox" aria-labelledby="Strings" style="padding:3px"><table class="nowraplinks mw-collapsible autocollapse navbox-inner" style="border-spacing:0;background:transparent;color:inherit"><tbody><tr><th scope="col" class="navbox-title" colspan="2"><div class="plainlinks hlist navbar mini"><ul><li class="nv-view"><a href="/wiki/Template:Strings" title="Template:Strings"><abbr title="View this template" style=";;background:none transparent;border:none;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none; padding:0;">v</abbr></a></li><li class="nv-talk"><a href="/wiki/Template_talk:Strings" title="Template talk:Strings"><abbr title="Discuss this template" style=";;background:none transparent;border:none;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none; padding:0;">t</abbr></a></li><li class="nv-edit"><a class="external text" href="https://en.wikipedia.org/w/index.php?title=Template:Strings&action=edit"><abbr title="Edit this template" style=";;background:none transparent;border:none;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none; padding:0;">e</abbr></a></li></ul></div><div id="Strings" style="font-size:114%;margin:0 4em"><a href="/wiki/String_(computer_science)" title="String (computer science)">Strings</a></div></th></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="/wiki/String_metric" title="String metric">String metric</a></th><td class="navbox-list navbox-odd hlist" style="text-align:left;border-left-width:2px;border-left-style:solid;width:100%;padding:0px"><div style="padding:0em 0.25em">
266<ul><li><a href="/wiki/Approximate_string_matching" title="Approximate string matching">Approximate string matching</a></li>
267<li><a href="/wiki/Bitap_algorithm" title="Bitap algorithm">Bitap algorithm</a></li>
268<li><a href="/wiki/Damerau%E2%80%93Levenshtein_distance" title="Damerau–Levenshtein distance">Damerau–Levenshtein distance</a></li>
269<li><a href="/wiki/Edit_distance" title="Edit distance">Edit distance</a></li>
270<li><a href="/wiki/Gestalt_Pattern_Matching" title="Gestalt Pattern Matching">Gestalt Pattern Matching</a></li>
271<li><a class="mw-selflink selflink">Hamming distance</a></li>
272<li><a href="/wiki/Jaro%E2%80%93Winkler_distance" title="Jaro–Winkler distance">Jaro–Winkler distance</a></li>
273<li><a href="/wiki/Lee_distance" title="Lee distance">Lee distance</a></li>
274<li><a href="/wiki/Levenshtein_automaton" title="Levenshtein automaton">Levenshtein automaton</a></li>
275<li><a href="/wiki/Levenshtein_distance" title="Levenshtein distance">Levenshtein distance</a></li>
276<li><a href="/wiki/Wagner%E2%80%93Fischer_algorithm" title="Wagner–Fischer algorithm">Wagner–Fischer algorithm </a></li></ul>
277</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="/wiki/String-searching_algorithm" title="String-searching algorithm">String-searching algorithm</a></th><td class="navbox-list navbox-even hlist" style="text-align:left;border-left-width:2px;border-left-style:solid;width:100%;padding:0px"><div style="padding:0em 0.25em">
278<ul><li><a href="/wiki/Apostolico%E2%80%93Giancarlo_algorithm" title="Apostolico–Giancarlo algorithm">Apostolico–Giancarlo algorithm</a></li>
279<li><a href="/wiki/Boyer%E2%80%93Moore_string-search_algorithm" title="Boyer–Moore string-search algorithm">Boyer–Moore string-search algorithm</a></li>
280<li><a href="/wiki/Boyer%E2%80%93Moore%E2%80%93Horspool_algorithm" title="Boyer–Moore–Horspool algorithm">Boyer–Moore–Horspool algorithm</a></li>
281<li><a href="/wiki/Knuth%E2%80%93Morris%E2%80%93Pratt_algorithm" title="Knuth–Morris–Pratt algorithm">Knuth–Morris–Pratt algorithm</a></li>
282<li><a href="/wiki/Rabin%E2%80%93Karp_algorithm" title="Rabin–Karp algorithm">Rabin–Karp algorithm</a></li></ul>
283</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">Multiple string searching</th><td class="navbox-list navbox-odd hlist" style="text-align:left;border-left-width:2px;border-left-style:solid;width:100%;padding:0px"><div style="padding:0em 0.25em">
284<ul><li><a href="/wiki/Aho%E2%80%93Corasick_algorithm" title="Aho–Corasick algorithm">Aho–Corasick</a></li>
285<li><a href="/wiki/Commentz-Walter_algorithm" title="Commentz-Walter algorithm">Commentz-Walter algorithm</a></li></ul>
286</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="/wiki/Regular_expression" title="Regular expression">Regular expression</a></th><td class="navbox-list navbox-even hlist" style="text-align:left;border-left-width:2px;border-left-style:solid;width:100%;padding:0px"><div style="padding:0em 0.25em">
287<ul><li><a href="/wiki/Comparison_of_regular-expression_engines" title="Comparison of regular-expression engines">Comparison of regular-expression engines</a></li>
288<li><a href="/wiki/Regular_grammar" title="Regular grammar">Regular grammar</a></li>
289<li><a href="/wiki/Thompson%27s_construction" title="Thompson's construction">Thompson's construction</a></li>
290<li><a href="/wiki/Nondeterministic_finite_automaton" title="Nondeterministic finite automaton">Nondeterministic finite automaton</a></li></ul>
291</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="/wiki/Sequence_alignment" title="Sequence alignment">Sequence alignment</a></th><td class="navbox-list navbox-odd hlist" style="text-align:left;border-left-width:2px;border-left-style:solid;width:100%;padding:0px"><div style="padding:0em 0.25em">
292<ul><li><a href="/wiki/Hirschberg%27s_algorithm" title="Hirschberg's algorithm">Hirschberg's algorithm</a></li>
293<li><a href="/wiki/Needleman%E2%80%93Wunsch_algorithm" title="Needleman–Wunsch algorithm">Needleman–Wunsch algorithm</a></li>
294<li><a href="/wiki/Smith%E2%80%93Waterman_algorithm" title="Smith–Waterman algorithm">Smith–Waterman algorithm</a></li></ul>
295</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="/wiki/Data_structure" title="Data structure">Data structure</a></th><td class="navbox-list navbox-even hlist" style="text-align:left;border-left-width:2px;border-left-style:solid;width:100%;padding:0px"><div style="padding:0em 0.25em">
296<ul><li><a href="/wiki/Deterministic_acyclic_finite_state_automaton" title="Deterministic acyclic finite state automaton">DAFSA</a></li>
297<li><a href="/wiki/Suffix_array" title="Suffix array">Suffix array</a></li>
298<li><a href="/wiki/Suffix_automaton" title="Suffix automaton">Suffix automaton</a></li>
299<li><a href="/wiki/Suffix_tree" title="Suffix tree">Suffix tree</a></li>
300<li><a href="/wiki/Generalized_suffix_tree" title="Generalized suffix tree">Generalized suffix tree</a></li>
301<li><a href="/wiki/Rope_(data_structure)" title="Rope (data structure)">Rope</a></li>
302<li><a href="/wiki/Ternary_search_tree" title="Ternary search tree">Ternary search tree</a></li>
303<li><a href="/wiki/Trie" title="Trie">Trie</a></li></ul>
304</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">Other</th><td class="navbox-list navbox-odd hlist" style="text-align:left;border-left-width:2px;border-left-style:solid;width:100%;padding:0px"><div style="padding:0em 0.25em">
305<ul><li><a href="/wiki/Parsing" title="Parsing">Parsing</a></li>
306<li><a href="/wiki/Pattern_matching" title="Pattern matching">Pattern matching</a></li>
307<li><a href="/wiki/Compressed_pattern_matching" title="Compressed pattern matching">Compressed pattern matching</a></li>
308<li><a href="/wiki/Longest_common_subsequence_problem" title="Longest common subsequence problem">Longest common subsequence</a></li>
309<li><a href="/wiki/Longest_common_substring_problem" title="Longest common substring problem">Longest common substring</a></li>
310<li><a href="/wiki/Sequential_pattern_mining" title="Sequential pattern mining">Sequential pattern mining</a></li>
311<li><a href="/wiki/Category:String_sorting_algorithms" title="Category:String sorting algorithms">Sorting</a></li></ul>
312</div></td></tr></tbody></table></div>
313<!--
314NewPP limit report
315Parsed by mw1278
316Cached time: 20200219212347
317Cache expiry: 2592000
318Dynamic content: false
319Complications: [vary‐revision‐sha1]
320CPU time usage: 0.388 seconds
321Real time usage: 0.611 seconds
322Preprocessor visited node count: 1299/1000000
323Post‐expand include size: 40931/2097152 bytes
324Template argument size: 1252/2097152 bytes
325Highest expansion depth: 13/40
326Expensive parser function count: 7/500
327Unstrip recursion depth: 1/20
328Unstrip post‐expand size: 36039/5000000 bytes
329Number of Wikibase entities loaded: 3/400
330Lua time usage: 0.203/10.000 seconds
331Lua memory usage: 5.5 MB/50 MB
332-->
333<!--
334Transclusion expansion time report (%,ms,calls,template)
335100.00% 472.272 1 -total
336 41.02% 193.738 1 Template:Reflist
337 22.54% 106.442 5 Template:Cite_book
338 15.19% 71.746 3 Template:Cite_journal
339 11.29% 53.326 2 Template:Multiple_image
340 10.28% 48.537 1 Template:More_inline
341 8.45% 39.918 1 Template:Short_description
342 8.33% 39.353 1 Template:Ambox
343 7.50% 35.410 1 Template:Use_American_English
344 6.20% 29.283 1 Template:Portal
345-->
346
347<!-- Saved in parser cache with key enwiki:pcache:idhash:41227-0!canonical!math=5 and timestamp 20200219212416 and revision id 941648206
348 -->
349</div><noscript><img src="//en.wikipedia.org/wiki/Special:CentralAutoLogin/start?type=1x1" alt="" title="" width="1" height="1" style="border: none; position: absolute;" /></noscript></div>
350 <div class="printfooter">Retrieved from "<a dir="ltr" href="https://en.wikipedia.org/w/index.php?title=Hamming_distance&oldid=941648206">https://en.wikipedia.org/w/index.php?title=Hamming_distance&oldid=941648206</a>"</div>
351 <div id="catlinks" class="catlinks" data-mw="interface"><div id="mw-normal-catlinks" class="mw-normal-catlinks"><a href="/wiki/Help:Category" title="Help:Category">Categories</a>: <ul><li><a href="/wiki/Category:String_similarity_measures" title="Category:String similarity measures">String similarity measures</a></li><li><a href="/wiki/Category:Coding_theory" title="Category:Coding theory">Coding theory</a></li><li><a href="/wiki/Category:Metric_geometry" title="Category:Metric geometry">Metric geometry</a></li><li><a href="/wiki/Category:Cubes" title="Category:Cubes">Cubes</a></li><li><a href="/wiki/Category:Similarity_and_distance_measures" title="Category:Similarity and distance measures">Similarity and distance measures</a></li></ul></div><div id="mw-hidden-catlinks" class="mw-hidden-catlinks mw-hidden-cats-hidden">Hidden categories: <ul><li><a href="/wiki/Category:Use_American_English_from_March_2019" title="Category:Use American English from March 2019">Use American English from March 2019</a></li><li><a href="/wiki/Category:All_Wikipedia_articles_written_in_American_English" title="Category:All Wikipedia articles written in American English">All Wikipedia articles written in American English</a></li><li><a href="/wiki/Category:Articles_with_short_description" title="Category:Articles with short description">Articles with short description</a></li><li><a href="/wiki/Category:Articles_lacking_in-text_citations_from_May_2015" title="Category:Articles lacking in-text citations from May 2015">Articles lacking in-text citations from May 2015</a></li><li><a href="/wiki/Category:All_articles_lacking_in-text_citations" title="Category:All articles lacking in-text citations">All articles lacking in-text citations</a></li><li><a href="/wiki/Category:Wikipedia_articles_incorporating_text_from_the_Federal_Standard_1037C" title="Category:Wikipedia articles incorporating text from the Federal Standard 1037C">Wikipedia articles incorporating text from the Federal Standard 1037C</a></li><li><a href="/wiki/Category:Articles_with_example_Python_code" title="Category:Articles with example Python code">Articles with example Python code</a></li><li><a href="/wiki/Category:Articles_with_example_C%2B%2B_code" title="Category:Articles with example C++ code">Articles with example C++ code</a></li></ul></div></div>
352 <div class="visualClear"></div>
353
354 </div>
355</div>
356<div id='mw-data-after-content'>
357 <div class="read-more-container"></div>
358</div>
359
360<div id="mw-navigation">
361 <h2>Navigation menu</h2>
362 <div id="mw-head">
363
364<div id="p-personal" role="navigation" class="" aria-labelledby="p-personal-label">
365 <h3 id="p-personal-label">Personal tools</h3>
366 <ul >
367
368 <li id="pt-anonuserpage">Not logged in</li>
369 <li id="pt-anontalk"><a href="/wiki/Special:MyTalk" title="Discussion about edits from this IP address [n]" accesskey="n">Talk</a></li><li id="pt-anoncontribs"><a href="/wiki/Special:MyContributions" title="A list of edits made from this IP address [y]" accesskey="y">Contributions</a></li><li id="pt-createaccount"><a href="/w/index.php?title=Special:CreateAccount&returnto=Hamming+distance" title="You are encouraged to create an account and log in; however, it is not mandatory">Create account</a></li><li id="pt-login"><a href="/w/index.php?title=Special:UserLogin&returnto=Hamming+distance" title="You're encouraged to log in; however, it's not mandatory. [o]" accesskey="o">Log in</a></li>
370 </ul>
371</div>
372
373 <div id="left-navigation">
374 <div id="p-namespaces" role="navigation" class="vectorTabs " aria-labelledby="p-namespaces-label">
375 <h3 id="p-namespaces-label">Namespaces</h3>
376 <ul >
377 <li id="ca-nstab-main" class="selected"><a href="/wiki/Hamming_distance" title="View the content page [c]" accesskey="c">Article</a></li><li id="ca-talk"><a href="/wiki/Talk:Hamming_distance" rel="discussion" title="Discussion about the content page [t]" accesskey="t">Talk</a></li>
378 </ul>
379</div>
380<div id="p-variants" role="navigation" class="vectorMenu emptyPortlet" aria-labelledby="p-variants-label">
381 <input type="checkbox" class="vectorMenuCheckbox" aria-labelledby="p-variants-label" />
382 <h3 id="p-variants-label">
383 <span>Variants</span>
384 </h3>
385 <ul class="menu" >
386
387 </ul>
388</div>
389
390 </div>
391 <div id="right-navigation">
392 <div id="p-views" role="navigation" class="vectorTabs " aria-labelledby="p-views-label">
393 <h3 id="p-views-label">Views</h3>
394 <ul >
395 <li id="ca-view" class="collapsible selected"><a href="/wiki/Hamming_distance">Read</a></li><li id="ca-edit" class="collapsible"><a href="/w/index.php?title=Hamming_distance&action=edit" title="Edit this page [e]" accesskey="e">Edit</a></li><li id="ca-history" class="collapsible"><a href="/w/index.php?title=Hamming_distance&action=history" title="Past revisions of this page [h]" accesskey="h">View history</a></li>
396 </ul>
397</div>
398<div id="p-cactions" role="navigation" class="vectorMenu emptyPortlet" aria-labelledby="p-cactions-label">
399 <input type="checkbox" class="vectorMenuCheckbox" aria-labelledby="p-cactions-label" />
400 <h3 id="p-cactions-label">
401 <span>More</span>
402 </h3>
403 <ul class="menu" >
404
405 </ul>
406</div>
407<div id="p-search" role="search">
408 <h3 >
409 <label for="searchInput">Search</label>
410 </h3>
411 <form action="/w/index.php" id="searchform">
412 <div id="simpleSearch">
413 <input type="search" name="search" placeholder="Search Wikipedia" title="Search Wikipedia [f]" accesskey="f" id="searchInput"/>
414 <input type="hidden" value="Special:Search" name="title"/>
415 <input type="submit" name="fulltext" value="Search" title="Search Wikipedia for this text" id="mw-searchButton" class="searchButton mw-fallbackSearchButton"/>
416 <input type="submit" name="go" value="Go" title="Go to a page with this exact name if it exists" id="searchButton" class="searchButton"/>
417 </div>
418 </form>
419</div>
420
421 </div>
422 </div>
423 <div id="mw-panel">
424 <div id="p-logo" role="banner">
425 <a title="Visit the main page" class="mw-wiki-logo" href="/wiki/Main_Page"></a>
426 </div>
427
428<div class="portal" role="navigation" id="p-navigation" aria-labelledby="p-navigation-label">
429 <h3 id="p-navigation-label">
430 Navigation
431 </h3>
432 <div class="body">
433 <ul><li id="n-mainpage-description"><a href="/wiki/Main_Page" title="Visit the main page [z]" accesskey="z">Main page</a></li><li id="n-contents"><a href="/wiki/Wikipedia:Contents" title="Guides to browsing Wikipedia">Contents</a></li><li id="n-featuredcontent"><a href="/wiki/Wikipedia:Featured_content" title="Featured content – the best of Wikipedia">Featured content</a></li><li id="n-currentevents"><a href="/wiki/Portal:Current_events" title="Find background information on current events">Current events</a></li><li id="n-randompage"><a href="/wiki/Special:Random" title="Load a random article [x]" accesskey="x">Random article</a></li><li id="n-sitesupport"><a href="https://donate.wikimedia.org/wiki/Special:FundraiserRedirector?utm_source=donate&utm_medium=sidebar&utm_campaign=C13_en.wikipedia.org&uselang=en" title="Support us">Donate to Wikipedia</a></li><li id="n-shoplink"><a href="//shop.wikimedia.org" title="Visit the Wikipedia store">Wikipedia store</a></li></ul>
434
435 </div>
436</div>
437
438<div class="portal" role="navigation" id="p-interaction" aria-labelledby="p-interaction-label">
439 <h3 id="p-interaction-label">
440 Interaction
441 </h3>
442 <div class="body">
443 <ul><li id="n-help"><a href="/wiki/Help:Contents" title="Guidance on how to use and edit Wikipedia">Help</a></li><li id="n-aboutsite"><a href="/wiki/Wikipedia:About" title="Find out about Wikipedia">About Wikipedia</a></li><li id="n-portal"><a href="/wiki/Wikipedia:Community_portal" title="About the project, what you can do, where to find things">Community portal</a></li><li id="n-recentchanges"><a href="/wiki/Special:RecentChanges" title="A list of recent changes in the wiki [r]" accesskey="r">Recent changes</a></li><li id="n-contactpage"><a href="//en.wikipedia.org/wiki/Wikipedia:Contact_us" title="How to contact Wikipedia">Contact page</a></li></ul>
444
445 </div>
446</div>
447
448<div class="portal" role="navigation" id="p-tb" aria-labelledby="p-tb-label">
449 <h3 id="p-tb-label">
450 Tools
451 </h3>
452 <div class="body">
453 <ul><li id="t-whatlinkshere"><a href="/wiki/Special:WhatLinksHere/Hamming_distance" title="List of all English Wikipedia pages containing links to this page [j]" accesskey="j">What links here</a></li><li id="t-recentchangeslinked"><a href="/wiki/Special:RecentChangesLinked/Hamming_distance" rel="nofollow" title="Recent changes in pages linked from this page [k]" accesskey="k">Related changes</a></li><li id="t-upload"><a href="/wiki/Wikipedia:File_Upload_Wizard" title="Upload files [u]" accesskey="u">Upload file</a></li><li id="t-specialpages"><a href="/wiki/Special:SpecialPages" title="A list of all special pages [q]" accesskey="q">Special pages</a></li><li id="t-permalink"><a href="/w/index.php?title=Hamming_distance&oldid=941648206" title="Permanent link to this revision of the page">Permanent link</a></li><li id="t-info"><a href="/w/index.php?title=Hamming_distance&action=info" title="More information about this page">Page information</a></li><li id="t-wikibase"><a href="https://www.wikidata.org/wiki/Special:EntityPage/Q272172" title="Link to connected data repository item [g]" accesskey="g">Wikidata item</a></li><li id="t-cite"><a href="/w/index.php?title=Special:CiteThisPage&page=Hamming_distance&id=941648206" title="Information on how to cite this page">Cite this page</a></li></ul>
454
455 </div>
456</div>
457
458<div class="portal" role="navigation" id="p-coll-print_export" aria-labelledby="p-coll-print_export-label">
459 <h3 id="p-coll-print_export-label">
460 Print/export
461 </h3>
462 <div class="body">
463 <ul><li id="coll-create_a_book"><a href="/w/index.php?title=Special:Book&bookcmd=book_creator&referer=Hamming+distance">Create a book</a></li><li id="coll-download-as-rl"><a href="/w/index.php?title=Special:ElectronPdf&page=Hamming+distance&action=show-download-screen">Download as PDF</a></li><li id="t-print"><a href="/w/index.php?title=Hamming_distance&printable=yes" title="Printable version of this page [p]" accesskey="p">Printable version</a></li></ul>
464
465 </div>
466</div>
467
468<div class="portal" role="navigation" id="p-lang" aria-labelledby="p-lang-label">
469 <h3 id="p-lang-label">
470 Languages
471 </h3>
472 <div class="body">
473 <ul><li class="interlanguage-link interwiki-af"><a href="https://af.wikipedia.org/wiki/Hammingafstand" title="Hammingafstand – Afrikaans" lang="af" hreflang="af" class="interlanguage-link-target">Afrikaans</a></li><li class="interlanguage-link interwiki-bg"><a href="https://bg.wikipedia.org/wiki/%D0%A0%D0%B0%D0%B7%D1%81%D1%82%D0%BE%D1%8F%D0%BD%D0%B8%D0%B5_%D0%BD%D0%B0_%D0%A5%D0%B5%D0%BC%D0%B8%D0%BD%D0%B3" title="Разстояние на Хеминг – Bulgarian" lang="bg" hreflang="bg" class="interlanguage-link-target">Български</a></li><li class="interlanguage-link interwiki-ca"><a href="https://ca.wikipedia.org/wiki/Dist%C3%A0ncia_de_Hamming" title="Distància de Hamming – Catalan" lang="ca" hreflang="ca" class="interlanguage-link-target">Català</a></li><li class="interlanguage-link interwiki-cs"><a href="https://cs.wikipedia.org/wiki/Hammingova_vzd%C3%A1lenost" title="Hammingova vzdálenost – Czech" lang="cs" hreflang="cs" class="interlanguage-link-target">Čeština</a></li><li class="interlanguage-link interwiki-de"><a href="https://de.wikipedia.org/wiki/Hamming-Abstand" title="Hamming-Abstand – German" lang="de" hreflang="de" class="interlanguage-link-target">Deutsch</a></li><li class="interlanguage-link interwiki-el"><a href="https://el.wikipedia.org/wiki/%CE%91%CF%80%CF%8C%CF%83%CF%84%CE%B1%CF%83%CE%B7_%CE%A7%CE%AC%CE%BC%CE%B9%CE%BD%CE%B3%CE%BA" title="Απόσταση Χάμινγκ – Greek" lang="el" hreflang="el" class="interlanguage-link-target">Ελληνικά</a></li><li class="interlanguage-link interwiki-es"><a href="https://es.wikipedia.org/wiki/Distancia_de_Hamming" title="Distancia de Hamming – Spanish" lang="es" hreflang="es" class="interlanguage-link-target">Español</a></li><li class="interlanguage-link interwiki-fa"><a href="https://fa.wikipedia.org/wiki/%D9%81%D8%A7%D8%B5%D9%84%D9%87_%D9%87%D9%85%DB%8C%D9%86%DA%AF" title="فاصله همینگ – Persian" lang="fa" hreflang="fa" class="interlanguage-link-target">فارسی</a></li><li class="interlanguage-link interwiki-fr"><a href="https://fr.wikipedia.org/wiki/Distance_de_Hamming" title="Distance de Hamming – French" lang="fr" hreflang="fr" class="interlanguage-link-target">Français</a></li><li class="interlanguage-link interwiki-ko"><a href="https://ko.wikipedia.org/wiki/%ED%95%B4%EB%B0%8D_%EA%B1%B0%EB%A6%AC" title="해밍 거리 – Korean" lang="ko" hreflang="ko" class="interlanguage-link-target">한국어</a></li><li class="interlanguage-link interwiki-hr"><a href="https://hr.wikipedia.org/wiki/Hammingova_udaljenost" title="Hammingova udaljenost – Croatian" lang="hr" hreflang="hr" class="interlanguage-link-target">Hrvatski</a></li><li class="interlanguage-link interwiki-it"><a href="https://it.wikipedia.org/wiki/Distanza_di_Hamming" title="Distanza di Hamming – Italian" lang="it" hreflang="it" class="interlanguage-link-target">Italiano</a></li><li class="interlanguage-link interwiki-he"><a href="https://he.wikipedia.org/wiki/%D7%9E%D7%A8%D7%97%D7%A7_%D7%94%D7%9E%D7%99%D7%A0%D7%92" title="מרחק המינג – Hebrew" lang="he" hreflang="he" class="interlanguage-link-target">עברית</a></li><li class="interlanguage-link interwiki-hu"><a href="https://hu.wikipedia.org/wiki/Hamming-t%C3%A1vols%C3%A1g" title="Hamming-távolság – Hungarian" lang="hu" hreflang="hu" class="interlanguage-link-target">Magyar</a></li><li class="interlanguage-link interwiki-nl"><a href="https://nl.wikipedia.org/wiki/Hammingafstand" title="Hammingafstand – Dutch" lang="nl" hreflang="nl" class="interlanguage-link-target">Nederlands</a></li><li class="interlanguage-link interwiki-ja"><a href="https://ja.wikipedia.org/wiki/%E3%83%8F%E3%83%9F%E3%83%B3%E3%82%B0%E8%B7%9D%E9%9B%A2" title="ハミング距離 – Japanese" lang="ja" hreflang="ja" class="interlanguage-link-target">日本語</a></li><li class="interlanguage-link interwiki-no"><a href="https://no.wikipedia.org/wiki/Hamming-avstand" title="Hamming-avstand – Norwegian Bokmål" lang="nb" hreflang="nb" class="interlanguage-link-target">Norsk bokmål</a></li><li class="interlanguage-link interwiki-pl"><a href="https://pl.wikipedia.org/wiki/Odleg%C5%82o%C5%9B%C4%87_Hamminga" title="Odległość Hamminga – Polish" lang="pl" hreflang="pl" class="interlanguage-link-target">Polski</a></li><li class="interlanguage-link interwiki-pt"><a href="https://pt.wikipedia.org/wiki/Dist%C3%A2ncia_de_Hamming" title="Distância de Hamming – Portuguese" lang="pt" hreflang="pt" class="interlanguage-link-target">Português</a></li><li class="interlanguage-link interwiki-ro"><a href="https://ro.wikipedia.org/wiki/Distan%C8%9B%C4%83_Hamming" title="Distanță Hamming – Romanian" lang="ro" hreflang="ro" class="interlanguage-link-target">Română</a></li><li class="interlanguage-link interwiki-ru"><a href="https://ru.wikipedia.org/wiki/%D0%A0%D0%B0%D1%81%D1%81%D1%82%D0%BE%D1%8F%D0%BD%D0%B8%D0%B5_%D0%A5%D1%8D%D0%BC%D0%BC%D0%B8%D0%BD%D0%B3%D0%B0" title="Расстояние Хэмминга – Russian" lang="ru" hreflang="ru" class="interlanguage-link-target">Русский</a></li><li class="interlanguage-link interwiki-sr"><a href="https://sr.wikipedia.org/wiki/%D0%A5%D0%B5%D0%BC%D0%B8%D0%BD%D0%B3%D0%BE%D0%B2%D0%BE_%D1%80%D0%B0%D1%81%D1%82%D0%BE%D1%98%D0%B0%D1%9A%D0%B5" title="Хемингово растојање – Serbian" lang="sr" hreflang="sr" class="interlanguage-link-target">Српски / srpski</a></li><li class="interlanguage-link interwiki-fi"><a href="https://fi.wikipedia.org/wiki/Hammingin_et%C3%A4isyys" title="Hammingin etäisyys – Finnish" lang="fi" hreflang="fi" class="interlanguage-link-target">Suomi</a></li><li class="interlanguage-link interwiki-sv"><a href="https://sv.wikipedia.org/wiki/Hammingavst%C3%A5nd" title="Hammingavstånd – Swedish" lang="sv" hreflang="sv" class="interlanguage-link-target">Svenska</a></li><li class="interlanguage-link interwiki-th"><a href="https://th.wikipedia.org/wiki/%E0%B8%A3%E0%B8%B0%E0%B8%A2%E0%B8%B0%E0%B8%97%E0%B8%B2%E0%B8%87%E0%B9%81%E0%B8%AE%E0%B8%A1%E0%B8%A1%E0%B8%B4%E0%B8%87" title="ระยะทางแฮมมิง – Thai" lang="th" hreflang="th" class="interlanguage-link-target">ไทย</a></li><li class="interlanguage-link interwiki-tr"><a href="https://tr.wikipedia.org/wiki/Hamming_uzakl%C4%B1%C4%9F%C4%B1" title="Hamming uzaklığı – Turkish" lang="tr" hreflang="tr" class="interlanguage-link-target">Türkçe</a></li><li class="interlanguage-link interwiki-uk"><a href="https://uk.wikipedia.org/wiki/%D0%92%D1%96%D0%B4%D1%81%D1%82%D0%B0%D0%BD%D1%8C_%D0%93%D0%B5%D0%BC%D0%BC%D1%96%D0%BD%D0%B3%D0%B0" title="Відстань Геммінга – Ukrainian" lang="uk" hreflang="uk" class="interlanguage-link-target">Українська</a></li><li class="interlanguage-link interwiki-vi"><a href="https://vi.wikipedia.org/wiki/Kho%E1%BA%A3ng_c%C3%A1ch_Hamming" title="Khoảng cách Hamming – Vietnamese" lang="vi" hreflang="vi" class="interlanguage-link-target">Tiếng Việt</a></li><li class="interlanguage-link interwiki-zh"><a href="https://zh.wikipedia.org/wiki/%E6%B1%89%E6%98%8E%E8%B7%9D%E7%A6%BB" title="汉明距离 – Chinese" lang="zh" hreflang="zh" class="interlanguage-link-target">中文</a></li></ul>
474 <div class="after-portlet after-portlet-lang"><span class="wb-langlinks-edit wb-langlinks-link"><a href="https://www.wikidata.org/wiki/Special:EntityPage/Q272172#sitelinks-wikipedia" title="Edit interlanguage links" class="wbc-editpage">Edit links</a></span></div>
475 </div>
476</div>
477
478 </div>
479</div>
480
481
482<div id="footer" role="contentinfo" >
483 <ul id="footer-info" class="">
484 <li id="footer-info-lastmod"> This page was last edited on 19 February 2020, at 21:24<span class="anonymous-show"> (UTC)</span>.</li>
485 <li id="footer-info-copyright">Text is available under the <a rel="license" href="//en.wikipedia.org/wiki/Wikipedia:Text_of_Creative_Commons_Attribution-ShareAlike_3.0_Unported_License">Creative Commons Attribution-ShareAlike License</a><a rel="license" href="//creativecommons.org/licenses/by-sa/3.0/" style="display:none;"></a>;
486additional terms may apply. By using this site, you agree to the <a href="//foundation.wikimedia.org/wiki/Terms_of_Use">Terms of Use</a> and <a href="//foundation.wikimedia.org/wiki/Privacy_policy">Privacy Policy</a>. Wikipedia® is a registered trademark of the <a href="//www.wikimediafoundation.org/">Wikimedia Foundation, Inc.</a>, a non-profit organization.</li>
487 </ul>
488 <ul id="footer-places" class="">
489 <li id="footer-places-privacy"><a href="https://foundation.wikimedia.org/wiki/Privacy_policy" class="extiw" title="wmf:Privacy policy">Privacy policy</a></li>
490 <li id="footer-places-about"><a href="/wiki/Wikipedia:About" title="Wikipedia:About">About Wikipedia</a></li>
491 <li id="footer-places-disclaimer"><a href="/wiki/Wikipedia:General_disclaimer" title="Wikipedia:General disclaimer">Disclaimers</a></li>
492 <li id="footer-places-contact"><a href="//en.wikipedia.org/wiki/Wikipedia:Contact_us">Contact Wikipedia</a></li>
493 <li id="footer-places-developers"><a href="https://www.mediawiki.org/wiki/Special:MyLanguage/How_to_contribute">Developers</a></li>
494 <li id="footer-places-statslink"><a href="https://stats.wikimedia.org/v2/#/en.wikipedia.org">Statistics</a></li>
495 <li id="footer-places-cookiestatement"><a href="https://foundation.wikimedia.org/wiki/Cookie_statement">Cookie statement</a></li>
496 <li id="footer-places-mobileview"><a href="//en.m.wikipedia.org/w/index.php?title=Hamming_distance&mobileaction=toggle_view_mobile" class="noprint stopMobileRedirectToggle">Mobile view</a></li>
497 </ul>
498 <ul id="footer-icons" class="noprint">
499 <li id="footer-copyrightico"><a href="https://wikimediafoundation.org/"><img src="/static/images/wikimedia-button.png" srcset="/static/images/wikimedia-button-1.5x.png 1.5x, /static/images/wikimedia-button-2x.png 2x" width="88" height="31" alt="Wikimedia Foundation"/></a></li>
500 <li id="footer-poweredbyico"><a href="https://www.mediawiki.org/"><img src="/static/images/poweredby_mediawiki_88x31.png" alt="Powered by MediaWiki" srcset="/static/images/poweredby_mediawiki_132x47.png 1.5x, /static/images/poweredby_mediawiki_176x62.png 2x" width="88" height="31"/></a></li>
501 </ul>
502 <div style="clear: both;"></div>
503</div>
504
505
506<script>(RLQ=window.RLQ||[]).push(function(){mw.config.set({"wgPageParseReport":{"limitreport":{"cputime":"0.388","walltime":"0.611","ppvisitednodes":{"value":1299,"limit":1000000},"postexpandincludesize":{"value":40931,"limit":2097152},"templateargumentsize":{"value":1252,"limit":2097152},"expansiondepth":{"value":13,"limit":40},"expensivefunctioncount":{"value":7,"limit":500},"unstrip-depth":{"value":1,"limit":20},"unstrip-size":{"value":36039,"limit":5000000},"entityaccesscount":{"value":3,"limit":400},"timingprofile":["100.00% 472.272 1 -total"," 41.02% 193.738 1 Template:Reflist"," 22.54% 106.442 5 Template:Cite_book"," 15.19% 71.746 3 Template:Cite_journal"," 11.29% 53.326 2 Template:Multiple_image"," 10.28% 48.537 1 Template:More_inline"," 8.45% 39.918 1 Template:Short_description"," 8.33% 39.353 1 Template:Ambox"," 7.50% 35.410 1 Template:Use_American_English"," 6.20% 29.283 1 Template:Portal"]},"scribunto":{"limitreport-timeusage":{"value":"0.203","limit":"10.000"},"limitreport-memusage":{"value":5772017,"limit":52428800}},"cachereport":{"origin":"mw1278","timestamp":"20200219212347","ttl":2592000,"transientcontent":false}}});});</script>
507<script type="application/ld+json">{"@context":"https:\/\/schema.org","@type":"Article","name":"Hamming distance","url":"https:\/\/en.wikipedia.org\/wiki\/Hamming_distance","sameAs":"http:\/\/www.wikidata.org\/entity\/Q272172","mainEntity":"http:\/\/www.wikidata.org\/entity\/Q272172","author":{"@type":"Organization","name":"Contributors to Wikimedia projects"},"publisher":{"@type":"Organization","name":"Wikimedia Foundation, Inc.","logo":{"@type":"ImageObject","url":"https:\/\/www.wikimedia.org\/static\/images\/wmf-hor-googpub.png"}},"datePublished":"2002-02-25T15:51:15Z","dateModified":"2020-02-19T21:24:16Z","image":"https:\/\/upload.wikimedia.org\/wikipedia\/commons\/b\/b4\/Hamming_distance_3_bit_binary.svg","headline":"number of bits that differ between two strings"}</script>
508<script>(RLQ=window.RLQ||[]).push(function(){mw.config.set({"wgBackendResponseTime":113,"wgHostname":"mw1327"});});</script></body></html>