Question:

Suppose that a computer program provides a non-negative and integer-valued random solution to the equation \(n_1 + n_2 + n_3 + n_4 = 20\).
Which of the following is the probability that all of \(n_1, n_2, n_3, n_4\) in the provided solution are positive?

Show Hint

Total non-negative solutions use \(\binom{23}{3}\) (stars and bars with 20 items, 4 bins). For all positive, substitute \(m_i = n_i - 1\) and solve \(\sum m_i = 16\), giving \(\binom{19}{3}\).
Updated On: Jul 22, 2026
  • \(\dbinom{19}{3} \Big/ \dbinom{23}{3}\)
  • \(\dbinom{20}{4} \Big/ \dbinom{24}{4}\)
  • \(\dbinom{20}{3} \Big/ \dbinom{23}{3}\)
  • \(\dbinom{19}{4} \Big/ \dbinom{24}{4}\)
Show Solution
collegedunia
Verified By Collegedunia

The Correct Option is A

Solution and Explanation

Step 1: Recall the stars and bars formula.
The number of non-negative integer solutions to \(x_1 + x_2 + \cdots + x_r = n\) is \(\dbinom{n+r-1}{r-1}\). This counts the ways to place \(n\) identical items into \(r\) labeled bins.

Step 2: Count the total sample space.
Here \(n = 20\) and \(r = 4\) (the variables \(n_1,n_2,n_3,n_4\)). The total number of non-negative integer solutions is:
\[ \binom{20+4-1}{4-1} = \binom{23}{3} \]
Every one of these solutions is treated as equally likely, since the program picks a "random" solution.

Step 3: Count the solutions where all four variables are positive.
If every \(n_i \geq 1\), substitute \(m_i = n_i - 1 \geq 0\). Then:
\[ (m_1+1) + (m_2+1) + (m_3+1) + (m_4+1) = 20 \implies m_1+m_2+m_3+m_4 = 16 \]
Now this is a non-negative integer equation with \(n=16\) and \(r=4\), so the number of solutions is:
\[ \binom{16+4-1}{4-1} = \binom{19}{3} \]

Step 4: Form the probability.
\[ P(\text{all positive}) = \frac{\binom{19}{3}}{\binom{23}{3}} \]

Step 5: Why the other options are wrong.
Option (B) and (D) use \(\binom{n}{4}\) type terms, but the "choose" part of stars and bars for 4 variables should use \(r - 1 = 3\) as the lower index, not \(4\), since we are placing \(3\) dividers among the items, not \(4\).
Option (C) uses \(\binom{20}{3}\) in the numerator, but that is the count for the total non-negative case restated with a wrong shift, it does not correctly represent the "all positive" restriction on the sum equal to \(20\).

Final Answer:
\[ \boxed{P(\text{all positive}) = \dfrac{\binom{19}{3}}{\binom{23}{3}}} \]
Was this answer helpful?
0
0

Top GATE DA Data Science and Artificial Intelligence Questions

View More Questions

Top GATE DA Probability and Statistics Questions