0
$\begingroup$

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 = ?

$\endgroup$
  • $\begingroup$ Isn't this just $n\choose m$? Perhaps I am misinterpreting the question.. $\endgroup$ – John Doe Jan 7 at 19:30
1
$\begingroup$

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

$\endgroup$
  • $\begingroup$ You're right of course. Thanks! $\endgroup$ – d ei Jan 9 at 20:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.