{ "name": "HammingDistance", "summary": "How many positions of two sequences of the same length hold different letters.", "tags": [ "sequences", "distance" ], "sources": [ { "title": "Hamming, Error detecting and error correcting codes, Bell System Technical Journal 29 (1950)" } ], "cases": [ { "call": "HammingDistance(\"GATTACA\", \"GACTATA\")" }, { "call": "HammingDistance(\"\", \"\")" }, { "call": "HammingDistance(\"AAAA\", \"TTTT\")" } ], "references": [ { "lang": "python", "level": "plain", "file": "ref/python/plain.py", "note": "The same count." }, { "lang": "mojo", "level": "plain", "file": "ref/mojo/plain.mojo", "note": "The same count in Mojo." } ], "proof": { "lang": "dafny", "file": "proof/hamming_distance.dfy", "note": "The loop computes the number of mismatched positions, which lies in [0, |S|]." } }