The number of solutions (x, y, z) to the equation x − y − z = 25, where x, y, and z are positive integers such that x ≤ 40, y ≤ 12, and z ≤ 12 is
Show solution
Correct answer: B
Think of this as: once we choose and , the equation fixes automatically — so the entire problem reduces to counting admissible pairs .
Step 1 — Express in terms of and .
From :
Since and are positive integers (), the smallest can be is , which already satisfies . The real restriction comes from the upper cap:
So we need to count pairs with , , and .
💡 Teacher tip: Whenever one variable is determined by the others, eliminate it first. Here is a "freebie" — it adds no combinatorial freedom, so we focus entirely on .
Step 2 — Group pairs by their sum .
For a fixed sum , the number of positive-integer pairs with is (since can take values , and is then determined). However, we must also enforce and .
Step 3 — Count for each range of .
-
to : The largest any single variable can be is , so the cap of 12 never bites. The count is simply .
-
: ranges from to , but forces , and . So → 11 pairs.
-
: ranges from to , but forces , and . So → 10 pairs.
| Sum | Valid values of | Number of pairs |
|---|---|---|
| to | to (all ) | |
| to | ||
| to |
Step 4 — Add them up.
Answer: B — 99
Alternative approach — Complementary counting.
Count all positive-integer pairs with (ignoring the cap of 12), then subtract those that violate or .
- Total without caps:
- Subtract pairs with : allows (2 pairs); allows (1 pair). Total = 3.
- Subtract pairs with : by symmetry, also 3.
- No pair violates both (that would need ).
Both methods agree. The complementary approach is faster under exam pressure — the direct method is more transparent.
💡 Closing insight: The cap of 12 only starts removing pairs at and — for smaller sums, the natural ceiling already keeps both variables . Spotting where a constraint actually bites is often the key to a clean count.