NVAMediumJEE 2023Applications of P&C

JEE Mathematics 2023 Question with Solution

A person forgets his 44-digit ATM pin code. But he remembers that in the code all the digits are different, the greatest digit is 77 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

Correct answer:72

Step-by-step solution

Standard Method

Given: A 44-digit ATM pin code has all digits different, the greatest digit is 77, and if the code is abcdabcd, then

a+b=c+da+b=c+d

Find: The maximum number of trials needed, which equals the total number of valid codes.

Since the greatest digit is 77 and all digits are different, the four digits are chosen from

{0,1,2,3,4,5,6,7}\{0,1,2,3,4,5,6,7\}

with 77 definitely included.

Let the code be abcdabcd. Then

a+b=c+da+b=c+d

So the total sum becomes

a+b+c+d=2(a+b)a+b+c+d=2(a+b)

Hence the sum of all four digits must be even.

Now count the 44-element digit sets containing 77 that can be split into two pairs having equal sum. The valid sets listed in the solution are

{7,6,1,0},{7,5,2,0},{7,4,3,0},\{7,6,1,0\},\quad \{7,5,2,0\},\quad \{7,4,3,0\}, {7,5,3,2},{7,6,3,1},{7,6,4,2}.\{7,5,3,2\},\quad \{7,6,3,1\},\quad \{7,6,4,2\}.

Thus, there are 66 such sets.

For each valid set of 44 distinct digits, the number of permutations satisfying

a+b=c+da+b=c+d

is 1212.

Therefore, total possible codes are

6×12=726\times 12=72

So the maximum number of trials necessary is 7272.

Counting Insight

Given: Distinct digits, maximum digit 77, and equal pair-sum condition.

Find: Total number of valid codes.

A quick way is to first identify all 44-digit sets containing 77 for which the digits can be grouped into two pairs with the same sum. The extracted working gives exactly 66 such sets.

For each such set, once two equal-sum pairs are available, the digits can be arranged into positions a,b,c,da,b,c,d in 1212 valid ways while preserving

a+b=c+da+b=c+d

Hence the required number is

6×12=726\times 12=72

Therefore, the correct numerical answer is 7272.

Common mistakes

  • Assuming only combinations of digits are needed. This is wrong because ATM codes are ordered, so different arrangements of the same digits give different codes. Count valid permutations, not only digit sets.

  • Forgetting that the greatest digit is 77 means 77 must be present in the code. It does not merely mean no digit exceeds 77. Always include 77 in every valid case.

  • Using the condition a+b=c+da+b=c+d only at the set level and not at the arrangement level. Even if a digit set works, not every permutation satisfies the position-wise sum condition. Count only those permutations that keep the first-pair sum equal to the last-pair sum.

Practice more Applications of P&C questions

Get unlimited AI-adaptive practice, mastery tracking, and an AI tutor that explains every step — free to start.

Related questions