A person forgets his -digit ATM pin code. But he remembers that in the code all the digits are different, the greatest digit is 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
JEE Mathematics 2023 Question with Solution
Answer
Correct answer:72
Step-by-step solution
Standard Method
Given: A -digit ATM pin code has all digits different, the greatest digit is , and if the code is , then
Find: The maximum number of trials needed, which equals the total number of valid codes.
Since the greatest digit is and all digits are different, the four digits are chosen from
with definitely included.
Let the code be . Then
So the total sum becomes
Hence the sum of all four digits must be even.
Now count the -element digit sets containing that can be split into two pairs having equal sum. The valid sets listed in the solution are
Thus, there are such sets.
For each valid set of distinct digits, the number of permutations satisfying
is .
Therefore, total possible codes are
So the maximum number of trials necessary is .
Counting Insight
Given: Distinct digits, maximum digit , and equal pair-sum condition.
Find: Total number of valid codes.
A quick way is to first identify all -digit sets containing for which the digits can be grouped into two pairs with the same sum. The extracted working gives exactly such sets.
For each such set, once two equal-sum pairs are available, the digits can be arranged into positions in valid ways while preserving
Hence the required number is
Therefore, the correct numerical answer is .
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 means must be present in the code. It does not merely mean no digit exceeds . Always include in every valid case.
Using the condition 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
- The number of strictly increasing functions f from the set 1, 2, 3, 4, 5, 6 to the set 1, 2, 3,, 9 such that…Medium · JEE 2026
- Let S = (m, n): m, n 1, 2, 3,....., 50. If the number of elements (m, n) in S such that 6^m+9^n is a multiple…Medium · JEE 2026
- The largest n N, for which 7^n divides 101!, is:Easy · JEE 2026
- If ( 1^15C0 + 1^15C1) ( 1^15C1 + 1^15C2) ( 1^15C12 + 1^15C13) = ^13^14C0 ^14C1 ^14C12, then 30 is equal to.Medium · JEE 2026
- Let ABC be a triangle. Consider four points p1, p2, p3, p4 on the side AB, five points p5, p6, p7, p8, p9 on…Medium · JEE 2026
- The number of 4-letter words, with or without meaning, which can be formed using the letters PQRPRSTUVP, is:Medium · JEE 2026
