Suppose that a computer program provides a non-negative and integer-valued random solution to the equation . Which of the following is the probability that all of in the provided solution are positive?
- (A)
- (B)
- (C)
- (D)
Suppose that a computer program provides a non-negative and integer-valued random solution to the equation . Which of the following is the probability that all of in the provided solution are positive?
ANSWER
The probability is , option (A).
Official answer: ASource: Official answer key, GATE 2026 DA (IIT Guwahati)
The question treats the program's output as a random solution chosen uniformly from all non-negative integer solutions of . This is the usual reading, so the probability is .
Total: by stars and bars, the number of non-negative integer solutions of is .
Favourable: put for each . Then exactly when , and the equation becomes . Its number of non-negative solutions is .
Probability , which is option (A).
Check on the other options. (B) and (D) have denominator . That would count non-negative solutions of a sum with five variables, or of with something, and neither applies here. (C) has numerator , which is the number of solutions with all of a sum equal to 21, not 20.
KEY IDEA
Count with stars and bars. All non-negative solutions: . For positive solutions, subtract 1 from each variable first, so the sum falls from to .
WATCH OUT FOR
Using or for the count, which comes from mixing up " choose " with " choose ". Another slip is forgetting to subtract 4 from 20 for the positive case.
From the GATE 2026 DA paper. Every question of this paper · Download the full paper · All 5 Counting & axioms questions, with notes