How many strings of n bits are there which differ by exactly m bits?

36 Views Asked by At

For example:
If n = 8 and m = 0: ans = 1
If n = 8 and m = 1: ans = 8
If n = 8 and m = 2: ans = ?
If n =256 and m = 3: ans = ?

1

There are 1 best solutions below

1
On BEST ANSWER

Just choose the $m$ bits out of $n$ to be different, so $n \choose m$