So far I have worked out the total number of combinations with no repeats which I believe to be

10 x 9 x 8 x 7 = 5040

I'm not quite sure where to proceed after this, I think I have to work out the total number of combinations with a 1 and 0 in it and then subtract this from 5040 for my answer. However, i'm not sure how to work this out. Any help would be appreciated. Thanks!


Assuming the codeword can start with $0$

As you have done, total number of combinations with no repeats $=10 \times 9 \times 8 \times7 =5040$

To find the number of codewords with both $0$ and $1,$ include both of them and select other $2$ digits in $\dbinom{8}{2}$ ways. these $4$ digits can be arranged in $4!$ ways. So, $\dbinom{8}{2} \times 4!=672$ ways.

Thus you get $5040-672=4368$ codewords

  • $\begingroup$ Thanks for the help, the answer i've been given is the one you had before the edit '4368'. $\endgroup$ – Mark Feb 2 '17 at 17:48
  • $\begingroup$ What you have after the edit was actually a method I tried, but wasn't matching the answer. $\endgroup$ – Mark Feb 2 '17 at 17:50
  • $\begingroup$ 4368 the right answer, i tested with a program. I got confused after writing that answer. reverted back. $\endgroup$ – Kiran Feb 2 '17 at 17:50
  • $\begingroup$ Thanks, I understand it all except where '8' is coming from, any chance you could explain that? $\endgroup$ – Mark Feb 2 '17 at 17:54
  • 1
    $\begingroup$ Oh right thanks, you've been a lot of help! $\endgroup$ – Mark Feb 2 '17 at 18:12

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.