Here is a question. I seem to have a hard time answering questions of this kind. I would appreciate it if you would not only help answer this, but carefully explain the process so I can understand it, and apply the same when I encounter questions of this kind.
Six houses in a row are each to be painted with one of the colors red, blue, green, and yellow. In how many different ways can the houses be painted so that no two adjacent houses can be the same color?
Thanks in advance!