francoisph wrote: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
A. 5
B. 21
C. 33
D. 60
E. 6
could you explain step by step please?
We need to look at the 6 possible cases: 1 green ball, 2 green balls, ..., 6 green balls
1 green ball: could be in box 1, 2, 3, 4, 5, or 6... 6 possibilities
2 green balls: could be in boxes 12, 23, 34, 45, 56... 5 possibilities
3 green balls: could be in boxes 123, 234, 345, 456... 4 possibilities
4 green balls: could be in boxes 1234, 2345, 3456... 3 possibilities
5 green balls: could be in boxes 12345, 23456... 2 possibilities
6 green balls: could be in boxes 123456... 1 possibility
Total: 6+5+4+3+2+1 = 21 possibilities - choose (B).
Of course, we should have seen the pattern pretty quickly and come up with that sum without having to write up all 6 cases.