2

A password consists of $13$ characters each character being one of the ten digits $0,1,2,3,4,5,6,7,8,9.$ A password must contain at least one odd digit. How many passwords are there$?$

I think the answer is $13 \times 5^{13}$ however I am having trouble convincing myself of this.

user118494
  • 5,837
Steph
  • 147

3 Answers3

7

The reasoning I will provide here is in two steps. First I count the number of passwords of 13 digits, which is $10^{13}$.

Then you only want the passwords with at least one odd digit. So in that list, I will remove all the passwords with only even digits, which is $5^{13}$.

Finally, the number of passwords of 13 digits, with at least one odd digit is $10^{13} - 5^{13}$.

Ibujah
  • 93
2

The number of passwords is:

[Number of passwords without restrictions]- [Number "bad" passwords]

$$ 10^{13} - 5^{13}$$

fredq
  • 950
1

So it's pretty clear that there are $10^{13}$ permutations in total. Now the at least gives you some clue as to what you're supposed to do next. If we want all passwords that contain at least one odd digit, then just subtract all passwords with only even digits, and passwords with only even digits have 5 digits to choose from. So your final answer would be $10^{13}-5^{13}$.