Verified Solution • 2025–26 Session moderate

QJEEM23Ma6e88: JEE Main 2023 Mathematics - Class 11 JEEM23Ma6e88 Solution: A person forgets his 4-digit ATM pin code. But he remembers…

A person forgets his 4-digit ATM pin code. But he remembers that in the code all the digits are different, the greatest digit is 7 and the sum of the first two digits is equal to the sum of the last two digits. Then the maximum number of trials necessary to obtain the correct code is ___________.

Step-by-Step Verified Solution

Let the 4-digit ATM pin code be represented by the digits abxyabxy , where all digits are different, the greatest digit is 7, and the sum of the first two digits is equal to the sum of the last two digits: a+b=x+ya + b = x + y .

Since the greatest digit is 7, the possible digits for the pin code are 0,1,2,3,4,5,6,0, 1, 2, 3, 4, 5, 6, and 77 .

1. Let's denote the sum of the first two digits and the sum of the last two digits as λ\lambda . Since the largest digit is 7, we can analyze different possible values for λ\lambda .

We will analyze different possible values for λ\lambda and the corresponding possible pairs of digits:

- λ=7\lambda = 7 : The pairs of digits that have a sum of 7 are (0,7),(7,0),(1,6),(6,1),(2,5),(5,2),(3,4),(4,3)(0,7),(7,0),(1,6),(6,1),(2,5),(5,2),(3,4),(4,3) . Since 7 must be present, we consider the pairs with 7: (0,7),(7,0)(0,7),(7,0) .

When the pair (0,7)(0,7) is chosen, the other two digits can be any one of the remaining pairs: (1,6),(6,1),(2,5),(5,2),(3,4),(4,3)(1,6),(6,1),(2,5),(5,2),(3,4),(4,3) . For each of these pairs, there are 2 possible pin codes: 07xy07xy and 07yx07yx , where xx and yy are the digits from the chosen pair. In total, there are 12 possible pin codes for this case.

When the pair (7,0)(7,0) is chosen, the other two digits can also be any one of the remaining pairs: (1,6),(6,1),(2,5),(5,2),(3,4),(4,3)(1,6),(6,1),(2,5),(5,2),(3,4),(4,3) . For each of these pairs, there are 2 possible pin codes: 70xy70xy and 70yx70yx , where xx and yy are the digits from the chosen pair. In total, there are 12 possible pin codes for this case.


So, there are 24 possible pin codes for λ=7\lambda = 7 .

JEE Main 2023 (Online) 15th April Morning Shift Mathematics - Permutations and Combinations Question 54 English Explanation 1

- λ=8\lambda = 8 : The pairs of digits that have a sum of 8 are (1,7),(7,1),(2,6),(6,2),(3,5),(5,3)(1,7),(7,1),(2,6),(6,2),(3,5),(5,3) . Since 7 must be present, we consider the pairs with 7: (1,7),(7,1)(1,7),(7,1) .

When the pair (1,7)(1,7) is chosen, the other two digits can be any one of the remaining pairs: (2,6),(6,2),(3,5),(5,3)(2,6),(6,2),(3,5),(5,3) . For each of these pairs, there are 2 possible pin codes: 17xy17xy and 17yx17yx , where xx and yy are the digits from the chosen pair. In total, there are 8 possible pin codes for this case.

When the pair (7,1)(7,1) is chosen, the other two digits can also be any one of the remaining pairs: (2,6),(6,2),(3,5),(5,3)(2,6),(6,2),(3,5),(5,3) . For each of these pairs, there are 2 possible pin codes: 71xy71xy and 71yx71yx , where xx and yy are the digits from the chosen pair. In total, there are 8 possible pin codes for this case.

So, there are 16 possible pin codes for λ=8\lambda = 8 .

JEE Main 2023 (Online) 15th April Morning Shift Mathematics - Permutations and Combinations Question 54 English Explanation 2

- λ=9\lambda = 9 : The pairs of digits that have a sum of 9 are (2,7),(7,2),(3,6),(6,3),(4,5),(5,4)(2,7),(7,2),(3,6),(6,3),(4,5),(5,4) . Since 7 must be present, we consider the pairs with 7: (2,7),(7,2)(2,7),(7,2) .

When the pair (2,7)(2,7) is chosen, the other two digits can be any one of the remaining pairs: (3,6),(6,3),(4,5),(5,4)(3,6),(6,3),(4,5),(5,4) . For each of these pairs, there are 2 possible pin codes: 27xy27xy and 27yx27yx , where xx and yy are the digits from the chosen pair. In total, there are 8 possible pin codes for this case.

When the pair (7,2)(7,2) is chosen, the other two digits can also be any one of the remaining pairs: (3,6),(6,3),(4,5),(5,4)(3,6),(6,3),(4,5),(5,4) . For each of these pairs, there are 2 possible pin codes: 72xy72xy and 72yx72yx , where xx and yy are the digits from the chosen pair. In total, there are 8 possible pin codes for this case.

So, there are 16 possible pin codes for λ=9\lambda = 9 .

JEE Main 2023 (Online) 15th April Morning Shift Mathematics - Permutations and Combinations Question 54 English Explanation 3

- λ=10\lambda = 10 : The pairs of digits that have a sum of 10 are (3,7),(7,3),(4,6),(6,4)(3,7),(7,3),(4,6),(6,4) . Since 7 must be present, we consider the pairs with 7: (3,7),(7,3)(3,7),(7,3) .

When the pair (3,7)(3,7) is chosen, the other two digits can be any one of the remaining pairs: (4,6),(6,4)(4,6),(6,4) . For each of these pairs, there are 2 possible pin codes: 37xy37xy and 37yx37yx , where xx and yy are the digits from the chosen pair. In total, there are 4 possible pin codes for this case.

When the pair (7,3)(7,3) is chosen, the other two digits can also be any one of the remaining pairs: (4,6),(6,4)(4,6),(6,4) . For each of these pairs, there are 2 possible pin codes: 73xy73xy and 73yx73yx , where xx and yy are the digits from the chosen pair. In total, there are 4 possible pin codes for this case.

So, there are 8 possible pin codes for λ=10\lambda = 10 .

JEE Main 2023 (Online) 15th April Morning Shift Mathematics - Permutations and Combinations Question 54 English Explanation 4

- λ=11\lambda = 11 : The pairs of digits that have a sum of 11 are (4,7),(7,4),(5,6),(6,5)(4,7),(7,4),(5,6),(6,5) . Since 7 must be present, we consider the pairs with 7: (4,7),(7,4)(4,7),(7,4) .

When the pair (4,7)(4,7) is chosen, the other two digits can be any one of the remaining pairs: (5,6),(6,5)(5,6),(6,5) . For each of these pairs, there are 2 possible pin codes: 47xy47xy and 47yx47yx , where xx and yy are the digits from the chosen pair. In total, there are 4 possible pin codes for this case.

When the pair (7,4)(7,4) is chosen, the other two digits can also be any one of the remaining pairs: (5,6),(6,5)(5,6),(6,5) . For each of these pairs, there are 2 possible pin codes: 74xy74xy and 74yx74yx , where xx and yy are the digits from the chosen pair. In total, there are 4 possible pin codes for this case.

So, there are 8 possible pin codes for λ=11\lambda = 11 .

JEE Main 2023 (Online) 15th April Morning Shift Mathematics - Permutations and Combinations Question 54 English Explanation 5

- λ=12\lambda = 12 : The only pair of digits that have a sum of 12 is (5,7)(5,7) . Since 7 must be present, this case is not possible.

- λ=13\lambda = 13 : The only pair of digits that have a sum of 13 is (6,7)(6,7) . Since 7 must be present, this case is not possible.

- λ=14\lambda = 14 : The only pair of digits that have a sum of 14 is (7,7)(7,7) . Since all the digits must be different, this case is not possible.

Adding up all the possible pin codes for each value of λ\lambda , we get:

16+24+24+16+8=7216 + 24 + 24 + 16 + 8 = 72

Therefore, the maximum number of trials necessary to obtain the correct code is 72.

Related Learning Resources & Exam Preparation