1
$\begingroup$

So there are $10$ combinations for each digit except the last which has 5 possibilities ($0,2,4,6,8$). Thus $10*10*10*10*10*10*10*5=50000000$ combinations right?

As a follow up, how many strings of 8 digits have at least one repeated digit?

I'm not sure how to approach this one. The first digit you have $10$ possibilities and then the next digit you only have $1$ possibility and for the next $6$ digits you have $10$ possibilities for each.

$\endgroup$
2
$\begingroup$

Yes, on the # of combinations with an even digit.

For the case of strings with 8 digits with at least one repeated digit, try counting the total number of strings with 8 digits ($10^8$) and subtracting the number of strings with no repeated digits ($10*9*8*7*6*5*4*3$ where the number goes down by 1 for each place since you can't repeat any of the digits to the left of the digit you're placing, if you build the numbers left to right).

$\endgroup$
  • $\begingroup$ The first term should be 9 and not $10$- can't start a number with $0$ $\endgroup$ – voldemort Apr 17 '14 at 20:55
  • 2
    $\begingroup$ @voldemort it depends on whether we're talking about 8 digit numbers or strings of digits of length 8. It sounded like the OP wanted strings of digits of length 8, so starting with a zero is no problem. $\endgroup$ – user2566092 Apr 17 '14 at 20:56
  • $\begingroup$ @user2566092: ok- if the latter then I retract my comment. Sorry Batman :). $\endgroup$ – voldemort Apr 17 '14 at 20:58
  • $\begingroup$ @Batman so it would be $10^8-(10*9*8*7*6*5*4*3)=98185600$ $\endgroup$ – atherton Apr 18 '14 at 0:59
1
$\begingroup$

For the first question your reasing is almost correct, except that for the first place you have $9$ choices and not $10$ as an $8$ digit number can't begin with $0$.

For the follow up question, find the number of $8$ digit numbers with no repeated digits. (i.e. look at the complement).

$\endgroup$

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.