JEE Main 2023 · 15 April · morning · Numerical answer · +4 / −0
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 ___________.
Answer and solution
Answer 72
Solution
Maths sir · 3 steps
7 must sit in one pair, so fix its partner and hunt for the other pair with the same sum.
- Set up pairs. The digits come from 0 to 7, all different, and 7 must appear. Split the code into two pairs with equal sums. One pair is {7, x} with sum 7 + x. The other pair {p, q} must have the same sum, using digits from 0 to 6 other than x.
Partner x of 7 Required sum Possible other pair Count 0 7 {1,6}, {2,5}, {3,4} 3 1 8 {2,6}, {3,5} 2 2 9 {3,6}, {4,5} 2 3 10 {4,6} 1 4 11 {5,6} 1 5 or 6 12 or 13 none, since the largest sum from two different digits up to 6 is 11 0 - Arrange each choice. There are 3 + 2 + 2 + 1 + 1 = 9 ways to choose the two pairs. For each choice, either pair can go in the first two places (2 ways), and each pair can be written in either order (2 × 2 ways).
9 × 2 × 2 × 2 = 72
- So. There are 72 possible codes, so the maximum number of trials needed is 72.
The common slip: 36. Forgetting that the two pairs can swap places, the first two digits and the last two, gives 36, not 72.
The idea to keep. For an equal-sum condition, count unordered pairs first, then multiply by the arrangements: the order of the pairs and the order inside each pair.
Answer from the NTA final answer key. Solution by PrepWiser.