Connecting the utilities
Can you find a way to connect each house to the utilities without any pipes crossing?
Problem
In the picture below, there are two houses that need to be connected to water and electricity.
The pipes/wires must not cross each other, and you can't go through one house to get to the other house. Can you find a way to connect them?
What if there were three houses? Or four? Or...
How many houses is it possible to connect to the two utilities, without requiring two lines to cross?
The Gas company wish to connect the houses to the Gas supply as well.
Here's a diagram showing the first two houses again:
Can you find a way to connect them to water, electricity and gas without any lines crossing?
What if there were three houses?
You might wish to arrange the houses and utilities around a circle like this:
Find a way to connect three houses to three utilities, or come up with a convincing explanation why it can't be done!
Image

The pipes/wires must not cross each other, and you can't go through one house to get to the other house. Can you find a way to connect them?
What if there were three houses? Or four? Or...
How many houses is it possible to connect to the two utilities, without requiring two lines to cross?
The Gas company wish to connect the houses to the Gas supply as well.
Here's a diagram showing the first two houses again:
Image

Can you find a way to connect them to water, electricity and gas without any lines crossing?
What if there were three houses?
Image

You might wish to arrange the houses and utilities around a circle like this:
Image

Find a way to connect three houses to three utilities, or come up with a convincing explanation why it can't be done!
Getting Started
Does it matter whereabouts the houses and the utilities are built?
Student Solutions
Thank you to everyone who submitted solutions to this problem.
Julian, from the British School, Manila, in the Philippines, produced some diagrams to show how to connect the houses and utilities when there were two utilities. His method shows that you can connect as many houses as you want to the two utilities:
Image

He was also able to use the same method to connect the three utilities to two houses:
Image

Rhiannon explained why it is impossible to connect all three utilities to all three houses:
Arrange the houses and the utilities in a hexagon, with the utilities and the houses alternating, as in the diagram. Adjacent houses and utilities are connected together.
Image

Each utility must then be connected to the house that is opposite it as well. One utility can have this done inside the hexagon, say the gas. Another can have it outside the hexagon, say the electricity.
Then the loop marked in green has the water on the inside and the house on the outside, so there is no way to connect them.
Image

If instead the electricity had been connected on the other side of the loop, the water would be outside and the house opposite would be inside, and they still couldn't be connected.
Srija was able to show that it can be done on the surface of a doughnut, because you can make use of the hole! Here is the method she used:
Notice that the yellow electric connection goes behind the doughnut, whilst the red gas connection goes all the way round.
Srija was able to show that it can be done on the surface of a doughnut, because you can make use of the hole! Here is the method she used:
Image

Notice that the yellow electric connection goes behind the doughnut, whilst the red gas connection goes all the way round.