Problem #PRU-88217

Graph theory

Problem

In the town of Ely, all the families have separate houses. On one fine day, each family moved into another, one of the houses house that used to be occupied by other families. They afterwards decided to paint all houses in red, blue or green colors in such a way that for each family the colour of the new and old houses would not match. Is this always possible to paint te houses in such a way, regardless of how families decided to move?