# Q. A flag has to be designed with 4 horizontal stripes using some or all of the colours red, green and yellow. What is the number of different ways in which this can be done so that no two adjacent stripes have the same colour?

(a) 12

(b) 18

(c) 24

(d) 36

Correct Answer: (c) 24

#### Question from UPSC Prelims 2023 CSAT

**Explanation : **

## Flag with 4 horizontal stripes

The first stripe can be any one of the 3 colours, so there are 3 options for the first stripe.

For the second stripe, it cannot be the same colour as the first stripe, so there are only 2 options.

Similarly, for the third and fourth stripes, they cannot be the same colour as the stripe before them, so there are 2 options for each of them.

Therefore, the total number of different ways to design the flag is 3 * 2 * 2 * 2 = 24.