Question:medium

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

Show Hint

For consecutive selections, the number of ways = total positions - length + 1.
Updated On: Jun 15, 2026
  • 21
  • 33
  • 11
  • 60
  • 52
Show Solution

The Correct Option is A

Solution and Explanation

Step 1: Understanding the Concept:
The problem asks for the number of ways to pick a continuous segment of "green balls" from a sequence of 6 boxes. Each such segment is defined by its start box and end box.
Step 2: Key Formula or Approach:
Number of ways to choose a sub-segment of length \(k\) from \(n\) items = \(n - k + 1\). Total ways = Sum of ways for all possible lengths \(k\) (from 1 to \(n\)).
Step 3: Detailed Explanation:
Possible lengths of the consecutive green ball segment: - Length 1: (1), (2), (3), (4), (5), (6) \(\to\) 6 ways. - Length 2: (1,2), (2,3), (3,4), (4,5), (5,6) \(\to\) 5 ways. - Length 3: (1,2,3), (2,3,4), (3,4,5), (4,5,6) \(\to\) 4 ways. - Length 4: (1,2,3,4), (2,3,4,5), (3,4,5,6) \(\to\) 3 ways. - Length 5: (1,2,3,4,5), (2,3,4,5,6) \(\to\) 2 ways. - Length 6: (1,2,3,4,5,6) \(\to\) 1 way. Total ways = \(6 + 5 + 4 + 3 + 2 + 1 = 21\).
Step 4: Final Answer:
There are 21 ways.
Was this answer helpful?
0