Question:medium

There are six boxes numbered 1, 2, 3, 4, 5, 6. Each box is to be filled up either with a white ball or a black ball in such a manner that at least one box contains a black ball and all the boxes containing black balls are consecutively numbered. The total number of ways in which this can be done equals:

Show Hint

When elements must be "all consecutive," count non-empty intervals. For \(n\) positions, the number of intervals is \(\frac{n(n+1)}{2}\).
Updated On: Jul 16, 2026
  • 15
  • 21
  • 63
  • 64
Show Solution

The Correct Option is B

Solution and Explanation

Step 1: Model any valid filling as \(W^aB^kW^b\): \(a\) whites, then \(k\ge1\) consecutive blacks, then \(b\) whites, with \(a+k+b=6\).

Step 2: For each block length \(k=1,\dots,6\), the number of \((a,b)\) pairs with \(a+b=6-k\) is \(7-k\).

Step 3: Summing over \(k\): \(6+5+4+3+2+1=21\). \[ \boxed{21} \]
Was this answer helpful?
0


Questions Asked in SNAP exam