How many numbers are there with 10 as the hamming distance and can be represented using 15 bits.

118 views

Hamming distance between two binary numbers is the number of different bits between two numbers. With respect to 0, how many numbers are there with 10 as the hamming distance and can be represented using 15 bits.

posted Oct 22, 2013

For Hamming distance 10 means 10 bit should be different from 15 bit. So there are 15! / 10! * 5! ways to chose 10 bit from 15 bit.

``````15 X 14 X 13 X 12 X 11
-------------------------------   =  3003
5 X 4 X 3 X 2
``````

And 2 value possible for each bit. So total number for Hamming distance 10 = 3003 X 2 = 6006

Please read some permutation combination basic concept. If things are not clear.
Please let me know If I am wrong .
Similar Questions

Hamming distance between two binary number is the number of different bits between the two numbers.
With respect to 0, how many numbers are there with 10 as the hamming distance and can be represented
using 15 bits.

Result should be stored in new linked list.

Input:
First List: 5->6->3 // represents number 563
Second List: 8->4->2 // represents number 842
Output
Resultant list: 4->7->4->0->4->6 // represents number 474046