0

A number is consist of 4 sequence numbers, 0 or 1. First, we choose 4 numbers to make a number. Next, we choose a number which differ in exactly two digits for the first one. How many numbers can we take?

The answer is $2^4$${4 \choose 2}$. How do you get ${4 \choose 2}$?

maki
  • 213
  • The wording of the question is very strange and should be improved. A more mathematically correct and interesting wording of the question is "Given two random length4 bitstrings (string using only digits 0 and 1) what is the probability that they are hamming distance exactly two apart from one another? (i.e. there are exactly two positions in the string which differ between the two strings)" to which the answer is $\binom{4}{2}/2^4=\frac{6}{16}=\frac{3}{8}$ – JMoravitz Mar 14 '17 at 03:36
  • I undrestand. Thanks. – maki Mar 14 '17 at 03:56

2 Answers2

1

You have the number $a_1a_2a_3a_4,$ so you want $b_1b_2b_3b_4$ such that $$|a_1-b_1|+|a_2-b_2|+|a_3-b_3|+|a_4-b_4|=2,$$ of course $0\leq |a_i-b_i|\leq 1$ so you have to choose out of the $4$ variables $2$(say $i,j$) such that $|a_i-b_i|=|a_j-b_j|=1.$ That can be done in $\binom{4}{2}$ ways.

Phicar
  • 14,722
1

The question is very unclear, but $4 \choose 2$ has to come from selecting which digits differ from the original number.

Ross Millikan
  • 374,822