- #1
Askhwhelp
- 86
- 0
Find the number of ways to arrange three types of flags on an n foot flag pole: red flags (1 foot high), white flags (1 foot high), blue flags (3 feet high)
Find a recurrence relation for this number with one condition that there cannot be three 1 foot flags in a row (regardless of their color).
R= Red, W=White, B=Blue
a_1 = 2, R, W
a_2 = 4, RW, WR, WW, RR
a_3 = 1, B
a_4 = 4, B(a_1), W(a_3), R(a_3)
a_5 = 12, B(a_2), W(a_4), R(a_4)
a_6 = 21, B(a_3), W(a_5-2(a_3)), R(a_5-2(a_3))
a_7 = 30, B(a_4), W(a_6-2(a_4)), R(a_6-2(a_4))
a_8 = 24, B(a_5), W(a_7-2(a_5)), R(a_7-2(a_5))
a_9 = -number,B(a_6), W(a_8-2(a_6)), R(a_8-2(a_6))
Since there is a negative number, I do not think this is right...could anyone point out what I did wrong?
Find a recurrence relation for this number with one condition that there cannot be three 1 foot flags in a row (regardless of their color).
R= Red, W=White, B=Blue
a_1 = 2, R, W
a_2 = 4, RW, WR, WW, RR
a_3 = 1, B
a_4 = 4, B(a_1), W(a_3), R(a_3)
a_5 = 12, B(a_2), W(a_4), R(a_4)
a_6 = 21, B(a_3), W(a_5-2(a_3)), R(a_5-2(a_3))
a_7 = 30, B(a_4), W(a_6-2(a_4)), R(a_6-2(a_4))
a_8 = 24, B(a_5), W(a_7-2(a_5)), R(a_7-2(a_5))
a_9 = -number,B(a_6), W(a_8-2(a_6)), R(a_8-2(a_6))
Since there is a negative number, I do not think this is right...could anyone point out what I did wrong?