My three-digit code is 023. Reckha can’t choose a code that is the same as mine in two or more of the three digit-positions, nor that is the same as mine except for switching the positions of two digits (so 320 and 203, for example, are forbidden, but 302 is fine). Reckha can otherwise choose any three-digit code where each digit is in the set {0, 1, 2, ..., 9}. How many codes are available for Reckha?

 May 27, 2020

Let us use complentary counting, first we find for the first digit of the code there are 9 numbers, for the second digit there are 10 possible digits and goes the same for the third digit, multiplying these we get that there are 900 possible outcomes. Now we subtract the four unfavorable outcomes:


1. 023

2. 032

3. 320

4. 203

 (if I miss any tell me please)

Now we subtract total outcomes from unfavorable outcomes which is 900 - 4 and that will be 896.

 Aug 2, 2020

14 Online Users