How many ways are there to build a tower of 5 cubes height, out of red, yellow, blue, and green cubes, such that at least one of each pair of adjacent cubes is green or blue?
Hey everyone. I first thought about solving this using a recursion relation but then realised it might be better to solve it using the Inclusion-Exclusion principle.
My attempt: Define $A_i$ - there is no blue/green cube among the pair of cubes: cube $i$ and cube $i+1$. $1\le i\le 4$
We are looking for $|\bigcap_{i=1}^4 \overline {A_i}|=|\overline {\bigcup_{i=1}^4 A_i}| $
$|\overline{\bigcup_{i=1}^4 A_i}| $= $4^5-4(2^2)+6(2^3)-4(2^4)+2^5$
where $4^5$ is the number of ways to build the tower without any restraints, etc. Is this correct, am I doing something wrong? Edit: Yes this is indeed not correct and yes I am indeed wrong :)
Thanks in advance.
The approach is good, but two things should be fixed: