(a) Find a recurrence relation for the number of ways to arrange three types of flags on a flagpole n feet high: red flags (1 foot high), gold flags (1 foot high), and green flags (2 feet high).
(b) Repeat part (a) with the added condition that there may not be three 1-foot flags (red or gold) in a row.
(c) Repeat part (a) with the condition of no red above gold above green (in a row).
The parts i am struggling with are parts b and c.