Quote:
A locker code consists of five digits, for example 04391, 23335, 05531... David wants to set his locker code so that digit 5 is not immediately followed by the digit 9. How many such codes are possible?
A. 96,000
B. 96,001
C. 96,002
D. 96,003
E. 96,004
The total possibility of such codes that digit 5 is not immediately followed by the digit 9 is the total possibility of five digits - the total possibility of such codes that digit 5 is immediately followed by the digit 9
the total possibility of five digits is {0-9} {0-9} {0-9} {0-9} {0-9} = 10 * 10 * 10 * 10 *10 = 100,000
the total possibility of such codes that digit 5 is immediately followed by the digit 9 is
Case 1: {5} {9} {0-9} {0-9} {0-9} = 1 * 1 * 10 * 10 * 10 = 1,000
Case 2: {0-9} {5} {9} {0-9} {0-9} = 10 * 1 * 1 * 10 * 10 = 1,000
Case 3: {0-9} {0-9} {5} {9} {0-9} = 10 * 10 * 1 * 1 * 10 = 1,000
Case 4: {0-9} {0-9} {0-9} {5} {9} = 10 * 10 * 10 * 1 * 1 = 1,000
There are duplicated values such as 5959_ , _5959, 59_59 (3 possible values)So The total possibility of such codes that digit 5 is not immediately followed by the digit 9 = 100,000 - (4*1,000 -3) = 96,003
I choose D.
Posted from my mobile device