QlarIITy

MathematicsJEE Main 2023 · 31 JanuaryInteger

Let A=[aij]A = [a_{ij}], aij∈Z∩[0,4]a_{ij} \in Z \cap [0, 4], 1≤i,j≤21 \leq i, j \leq 2. The number of matrices AA such that the sum of all entries is a prime number p∈(2,13)p \in (2, 13) is ______.

Try it before you look.The full solution is on this page, below the answer box, the moment you check. No sign-in needed.

Solution

Core idea. A count of bounded whole-number solutions is found by removing the solutions that break the bound.

Concept refresher. The number of ways to write nn as an ordered sum of rr whole numbers, each at least zero, is

N=n+r−1Cr−1N = {}^{n + r - 1}C_{r - 1}

Picture the situation. The four entries are whole numbers from 0 to 4, so their sum is at most 16. The primes strictly between 2 and 13 are 3, 5, 7 and 11. For each, the number of matrices is the number of ways to write that prime as an ordered sum of four whole numbers, none of them more than 4.

Approach. For each of the four primes count the ordered sums, correcting for the upper limit.

  1. Step 1: The sums 3 and 5

    For the sum 3 no entry can exceed 4, so the count is 6C3=20{}^{6}C_3 = 20. For the sum 5 there are 8C3=56{}^{8}C_3 = 56 solutions, of which 4 have an entry equal to 5, leaving 52.

  2. Step 2: The sum 7

    There are 10C3=120{}^{10}C_3 = 120 solutions. If one chosen entry is at least 5, taking 5 from it leaves a sum of 2, with 5C3=10{}^{5}C_3 = 10 solutions; the 4 choices of entry give 40. So the count is 120−40=80120 - 40 = 80.

  3. Step 3: The sum 11

    There are 14C3=364{}^{14}C_3 = 364 solutions. One chosen entry at least 5 leaves a sum of 6, with 9C3=84{}^{9}C_3 = 84 solutions, so 336 are removed. Two chosen entries at least 5 leave a sum of 1, with 4 solutions, for each of the 6 pairs, so 24 are added back. The count is 364−336+24=52364 - 336 + 24 = 52.

  4. Step 4: The total

    Adding the counts for the four prime sums gives 20+52+80+52=20420 + 52 + 80 + 52 = 204 matrices.

Answer. 204

Sanity check. The counts for the sums 5 and 11 are equal, as they must be: replacing each entry ee by 4−e4 - e turns a sum of 5 into a sum of 11.

Common wrong answers

  • 560: Ignoring the upper limit 4 on each entry gives 20+56+120+364=56020 + 56 + 120 + 364 = 560.
  • 224: Including the prime 13, although the interval is open, adds 20 more matrices and gives 224.

Key takeaway

The trap. For a large sum two entries can exceed the limit together, and those cases are added back.

How toppers think. They use the symmetry between a sum and its complement to check the counts.

Remember. N=n+r−1Cr−1N = {}^{n + r - 1}C_{r - 1}

More on Types of Matrices