JEE Main 2024 · 1 February · morning · Numerical answer · +4 / −1

The number of elements in the set S={(x, y, z): x, y, z ∈ Z, x+2 y+3 z=42, x, y, z ≥ 0} equals __________.

Answer and solution

Answer 169

Solution

Maths sir · 3 steps

Fix z first: then x is decided by y, so you only count the possible values of y.

  1. Fix z. Since 3z ≤ 42, z runs from 0 to 14. For a fixed z, x = 42 - 3z - 2y is fixed once y is chosen. It stays ≥ 0 for y = 0, 1, …, ⌊ (42-3z)/2 ⌋.

    |S| = Σ_(z=0)¹⁴ ( ⌊ (42-3z)/2 ⌋ + 1 )

  2. Split by parity. The floor behaves differently for even and odd z, so add the two cases separately. Each case is an arithmetic progression with common difference -3.
    Case42 - 3zChoices for ySum
    z = 2k, k = 0 to 742 - 6k (even)22 - 3k22 + 19 + … + 1 = 92
    z = 2k+1, k = 0 to 639 - 6k (odd)20 - 3k20 + 17 + … + 2 = 77
  3. So. |S| = 92 + 77 = 169.

The common slip: 154. Counting only ⌊ (42-3z)/2 ⌋ choices for y leaves out y = 0 for each of the 15 values of z, which gives 154.

The idea to keep. For x + ay + bz = n with non-negative integers, fix the variable with the largest coefficient, count the choices for the next one, and let the last one absorb what is left.

Answer from the NTA final answer key. Solution by PrepWiser.

Study Permutations & Combinations

Asked about 160 times in JEE Main since 2020. This question is from 2024.