What is the distance of the following code


What is the distance of the following code :
00000, 010101, 000111, 011001, 11111
(a) 2
(b) 3
(c) 4
(d) 5
(Please answer with brief explanation)

Ravi Garg edited question
    Anupriya Anu (anonymous)

    Compute Hamming Distance

    Anupriya Anu answered
      Ramamurthi Kumar (anonymous)

      Is it 2 ???

      Ramamurthi Kumar answered
        Ravi Garg (anonymous)

        I donno the answer..please explain it

        Ravi Garg answered
          Ramamurthi Kumar (anonymous)

          I assume u r asking about hamming distance. All we need to do is xor every number , find the number of 1s in resultant number. That is hamming distance. No of bit changes in the final number obtained is hamming distance. But there is a catch in the string u given . That all the strings should be of equal length. In the last 11111. I prepended 0.

          Ramamurthi Kumar answered
            Parimal (anonymous)

            3 ?

            Parimal answered
              Add image to editor add image from link

              Question stats

              • Active
              • Views1230 times
              • Answers8 answers
              • Followers1 follower
              Question and answer is powered by AnsPress