Answer:
The number of ways are there to paint the four buildings is 48.
Explanation:
I) let the first building be any color. Therefore the first building can be painted with any of the 4 colors.
Therefore the first building can be colored in 4 ways.
ii) the second building can be colored in 3 ways since it cannot be colored the
same color as the first building.
iii) the third building can also be colored in 3 ways.
iv) the last building can be colored in 2 ways because it cannot be the same color as the first building or the color of the adjacent building.
Therefore the total number of ways the buildings can be colored = 4
3
3
2 = 48.