1
$\begingroup$

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!

1 Answers 1

1

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

  • 0
    Thanks for the help, the answer i've been given is the one you had before the edit '4368'.2017-02-02
  • 0
    What you have after the edit was actually a method I tried, but wasn't matching the answer.2017-02-02
  • 0
    4368 the right answer, i tested with a program. I got confused after writing that answer. reverted back.2017-02-02
  • 0
    Thanks, I understand it all except where '8' is coming from, any chance you could explain that?2017-02-02
  • 0
    Is it just that digit 1 can be in 4 possible positions, digit 0 can be in 4 possible positions, so 4 +4 = 8?2017-02-02
  • 0
    @MGordon0405, after selecting 0 and 1, we have $8$ digits remaining (2,3,4,5,6,7,8,9) and we are picking two more digits from these $8$.2017-02-02
  • 1
    Oh right thanks, you've been a lot of help!2017-02-02