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
    Susmit Wagle (anonymous)

    hamming distance is define as min no of 1s in exoring any pair of given set….for 010101 and 011001 it is 2 1s (001101)……i.e. in sort find exor of all pair and count no of 1s in each ans….the min of that will be hamming distance smile emoticon

    Susmit Wagle answered
      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
              Add image to editor add image from link

              Question stats

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