The author claims that it is safer to have a repeated digit
Solution
Since the pin contains 4 number
The first number of pin can be choosen from 10 possible combinations i.e. 0 to 9
The second number can be choosen in 9 ways to avoid repetition
The third number can be choosen in 8 ways to avoid repetition
The fourth number can be choosen in 7 ways to avoid repetition
Number of ways with no digit repeated = 10 * 9 * 8 * 7 = 5040 ways
Yes, the statement that we have 5040 possibilites with no digit repeated is true
Claim for 5 digit Pin = 10 * 9 * 8 * 7 * 6 = 30240 ways
So with repetititon we have 100000 - 30240 = 69760 ways (hence it is better to have repetition in the case of 5 digit pin)
Claim for 5 digit Pin = 10 * 9 * 8 * 7 * 6 * 5 = 151200 ways
So with repetititon we have 1000000 - 151200= 848800 ways (hence it is better to have repetition in the case of 6 digit pin)
