In a row of five squares, each square is to be colored either red, yellow, or blue, so that no two consecutive squares have the same color, and at lest three of the squares are red. How many ways are there to color the five squares?
In a row of five squares, each square is to be colored either red, yellow, or blue, so that
no two consecutive squares have the same color, and at lest three of the squares are red.
How many ways are there to color the five squares?
Under the rules, reds can't be next to each other, so the three reds have to go in squares 1, 3, and 5.
Square 2 can have either yellow or blue. Each of those choices leaves only one color left for square 4.
So there are only 2 ways to color the five squares.
1st way Red Yellow Red Blue Red
2nd way Red Blue Red Yellow Red
.
I’ll interpret your question as follows. You have an n×n grid of n2 cells. You’ve got one color. Each square can be either colored or left uncolored. (I’ll use 0 for uncolored and 1 for colored.) How many ways can the cells be colored so that no two rows have the same number of colored cells and no two columns have the same number of colored cells. www.mywawavisit.com