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 mines 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?

Mathgenius Dec 8, 2018

#1**+1 **

it's probably easiest to just list out the forbidden codes

023 - narrators code

02x

0x3

x23

where x is a digit from 0-9, there are 10 each of these for a total of 30

203

302

032

So there are a total of 34 forbidden codes

There are a total of 10^{3} = 1000 codes

1000 - 34 = 966 available codes

Rom Dec 8, 2018