EACH HEXAGON IS COLOURED EITHER RED, YELLOW OR BLUE, SUCH THAT NO...

24. Each hexagon is coloured either red, yellow or blue, such that no two hexagons

connected by a line segment have the same colour. In how many different ways

can we colour the figure?