Arrangements with Repetition II

Project ID: 
3000000068
SubArea: 
Level: 
Question: 

A PIN code is composed of $4$ digits. Tom wanted to know how many different PINs he can create if a digit in a PIN can repeat at most twice. Tom solved the problem in the following way:

(1) He realized that he can use a total of $10$ digits.

(2) First, he calculated the total number of different PINs without considering the repetition of individual digits. According to Tom, there are $10^4=10\,000$ possibilities.

(3) Next, Tom calculated the number of possible PINs that do not meet the given condition, specifically those containing a digit that repeats exactly three times:

$\qquad$ a) There are $10$ different triplets composed of the same digit.

$\qquad$ b) For each such triplet, there are $4$ different placements of digits in a PIN.

$\qquad$ c) A triplet of the same digit can be completed into a PIN using one of the $10$ different digits.

$\qquad$ d) Therefore, there is a total of $4\cdot10\cdot10=400$ PINs containing a triplet of the same digit.

(4) Tom did not forget about the "forbidden" PINs consisting of four identical digits. According to Tom, there are $10$ of those.

(5) Finally, Tom subtracted the number of all "forbidden" PINs from the total number of all possible PINs and obtained: $$10^4-400-10=9\,590$$ different PINs that meet the given condition.

Did Tom make a mistake in his reasoning?

Answer 1: 

No. Tom solved the problem correctly.

Answer 2: 

Yes. He made a mistake in step (2). The total number of different PINs without considering the repetition of digits is $10\cdot9\cdot8\cdot7=5\,040$. Thus, $5\,040-400-10=4\,630$ different PINs can be created that meet the given condition.

Answer 3: 

Yes. He made a mistake in step (3b). A triplet can only be arranged in a PIN in $3$ ways. Therefore, there is a total of $3\cdot10\cdot10=300$ different PINs containing a triplet of the same digit. Thus, $10^4-300-10=9\,690$ different PINs can be created that meet the given condition.

Answer 4: 

Yes. He made a mistake in step (3c). A triplet of the same digits can be completed into a valid PIN with exactly $9$ different digits. Therefore, there is a total of $4\cdot10\cdot9=360$ PINs containing a triplet of the same digit. Thus, $10^4-360-10=9\,630$ different PINs can be created that meet the given condition.

Fixed Answer: 
All Fixed
Correct Answer: 
Answer 4