Question:

There are 6 boxes numbered 1,2,... 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

Each valid colouring is decided by where the run of green boxes starts and where it stops. Count the possible runs.
Updated On: Nov 7, 2026
  • 5
  • 21
  • 33
  • 60
Show Solution
collegedunia
Verified By Collegedunia

The Correct Option is B

Solution and Explanation

Step 1: Understanding the Concept:
The green balls must sit in a run of neighbouring boxes with no gap, and there must be at least one green ball. Every other box gets a red ball. So each way of filling the boxes is fixed by choosing which block of consecutive boxes holds the green balls.

Step 2: Key Formula or Approach:
Count the blocks by their length k. A block of length k inside 6 boxes can start at box 1, 2, ... up to box \( 6 - k + 1 \), so there are \( 7 - k \) such blocks.

Step 3: Count for each length.
Length 1: 6 blocks (any single box).
Length 2: 5 blocks (1-2, 2-3, 3-4, 4-5, 5-6).
Length 3: 4 blocks.
Length 4: 3 blocks.
Length 5: 2 blocks.
Length 6: 1 block (all boxes green).

Step 4: Add them up.
\[ 6 + 5 + 4 + 3 + 2 + 1 = 21 \] Each block gives exactly one valid colouring, because all boxes outside the block must be red.

Step 5: Check the options.
Option 1 (5) counts only the blocks of length 2 and ignores all other lengths. Option 3 (33) and option 4 (60) are bigger than the count of blocks. There are only 21 runs, so 21 is right.

Final Answer:
There are 21 ways, option 2. \[ \boxed{21} \]
Was this answer helpful?
0
0

Top CAT Quantitative Aptitude Questions

View More Questions