Q38.Marks: +2.0UGC NET Paper 2: Computer Science17th June 2023
How many integral solutions are there to x + y + z + w = 29, where x ≥ 1, y ≥ 2, z ≥ 3 and w ≥ 0?
1.2400
2.2600✓ Correct
3.2800
4.3000
Solution
The correct answer is 2600
Key PointsThis problem deals with integer partitions and combinations. A standard trick for these kinds of problems is to shift everything to the left side to make all the variables unconstrained.
Firstly, let's subtract the constraints from each variable:
x' = x - 1
y' = y - 2
z' = z - 3
w' = w - 0
We can then express the equation in terms of the transformed variables:
Instead of four positive integers x, y, z, and w satisfying the original equation, we are looking for four non-negative integers x', y', z', and w' satisfying the new equation.
This amounts to partitioning 23 into four parts allowing that some of the parts could possibly be 0.
The basic formula for combinations with repetitions (stars-and-bars method) is C(n + r - 1, r - 1), where "n" is the sum and "r" is the number of variables.
So we have C(23 + 4 - 1, 4 - 1) = C(26, 3) = 26! / ((26-3)! * 3!) = 2600.