# In how many ways can you paint the tiles?

On a shelf, there are 8 tiles which need to be painted. We have 2 colours, yellow and black.

In how many way can we paint the tiles such that no two consecutive tiles have the colour black?

Some examples : Not Allowed

Some examples : Allowed

Above are some ways of painting the tiles. How many total different ways are there?

What if there were just 4 tiles, or 5 tiles? What if there were 100 tiles? How would go about finding the answers.

Update: Many readers have responded via Email and Messages. The starkly different approaches and ways of thinking have been discussed here!

Note to parents and teachers: This problem is suitable for all ages 10+. We need to introduce children to problems that make them think, and dive into ideas. You just need to be comfortable with them exploring, experimenting, struggling and trying different approaches. Contact us if you need resources for this task for your classroom or home. Inline Feedbacks 1. Black, Yellow, Black, Yellow, Black, Yellow, Black, Yellow
2. Yellow, Yellow, Black, Yellow, Yellow, Black, Yellow, Yellow
3. yyybyyyb
4. yyyybyyb
5. yyyyybyb
6. yyyyyyby
7. yyyyyyyb
8. yyybyyby
9. ybyyyyyb
10.yybyyyyb
11.yyyyybyy Hey, i got a pattern. The answer for n tiles is the (n+2)th term of Fibonacci series.

1 1 2 3 5 8 13 21 34 55 89 144 . . . LOVE FOR MATH I come up with a general solution : For n tiles the answer will be
r=(0 to ceil(n/2) )ΣC(n+1-r,r)
where, ceil(x) = [x] + 1 , [x] = Greatest integer function
Like for n=8
it will be C(9,0) + C(8,1) + C(7,2) + C(6,3) + C(5,4) = 1 + 8 + 21 + 20 + 5 = 55
: ) […] Here is the link to the problem being discussed here. Everyone must read this, to understand starkly different ways of thinking about the same problem. […] yes you are right. I missed some for with 4 blacks again.
blacks can take positions from say left to right:
1st; 3 rd; 5 th & 7th positions ;
1 st; 3rd; 5th & 8 th positions;
1 st; 3rd; 6th & 8 th positions;
1 st;4th; 6 th & 8 th positions;
2 nd; 4 th; 6 th &8 th positions;
so it is not 4
Hence correct solution:
1 with no black+8 with one black+(6+5+4+3+2+1) with two blacks+{(4+3+2+1)+(3+2+1)+(2+1)+(1)} with three blacks+5 with four blacks=1+8+21+20+5=55 (edited) Required Numbers = All white tiles(8C0=1)+ one black & remaining white tiles(8C1=8)+ two blacks & remaining whites
(8C2-7C1=28-7=21)+Three blacks & remaining whites(8C3-6C1=56-6=50)+ Four Blacks & remaing whites (8C4-5C1=70-5=65)=1+8+21+50+65=126 The above solution needs Modification.:
Required Numbers = All white tiles(8C0=1)+ one black & remaining white tiles(8C1=8)+ two blacks & remaining whites
(8C2-7C1=28-7=21)+Three blacks & remaining whites(8C3-6C1-(5+4+3+2+1)*2=56-6-30=20)+ Four Blacks & remaing whites (2)=1+8+21+20+2=52 Another way:

1 with no black+8 with one black+(6+5+4+3+2+1) with two blacks+{(4+3+2+1)+(3+2+1)+(2+1)+(1)} with three blacks+2 with four blacks=1+8+21+20+2=52 yes you are right. I missed some for with 4 blacks
blacks can take positions from say left to right:
1st; 3 rd; 5 th & 7th positions ;
1 st; 3rd; 5th & 8 th positions;
1 st;4th; 6 th & 8 th positions;
2 nd; 4 th; 6 th &8 th positions
Hence correct solution:
1 with no black+8 with one black+(6+5+4+3+2+1) with two blacks+{(4+3+2+1)+(3+2+1)+(2+1)+(1)} with three blacks+4 with four blacks=1+8+21+20+4=54