# Connect 3 houses with 3 wells

Connect every house with every well without the lines intersecting.

I am not sure if this puzzle has a solution. I have been puzzled by it for a long long time. An old man from my village mentioned this puzzle to me 12 years ago. I have never been able to solve it, I'm hoping someone here can.

• nomachetejuggling.com/2011/10/29/… – Anon Jul 1 '15 at 14:08
• @Anon well since houses and wells are 3D things, you can always dig some tunnels or build bridges. – shyos Jul 1 '15 at 14:15
• This is a well-known puzzle and I was sure it must be a duplicate, but I couldn't find it anywhere on the site already. Have an upvote :-) – Rand al'Thor Jul 1 '15 at 15:43
• I, too, assumed that this puzzle must already be on here somewhere. I don't think that this post has yet become a more accessible or complete answer than one of the top google hits, though. Indeed, an answer already links to that. I'm waiting to see how much more we can expand on that site's information. – Engineer Toast Jul 1 '15 at 16:03
• I think that the puzzle should be edited to specify that each hous must be connected to each well using a different pipe and that pipes should not cross the wells. Most of the solutions proposed are really creative but, IMHO, on purpose misunderstanding the sense of the puzzle... – Hunter Jul 2 '15 at 6:49

This is not impossible.

While the graph theory is correct, it's also not relevant. The wells in question aren't vertices, and so we can connect multiple edges to a single well without them overlapping.

Here is a possible solution:

Each house has a pipe that connects to all 3 wells (I've drawn on openings for each pipe in each well). The pipes do not overlap.

• Actually instead of 1 pipe you can use 3 pipes that are very closely together, and your solution still works. The reason it works is because you allow pipes to cross the wells and not originate from a single point. You can also solve this by replacing the wells with vertices, but allow pipes to cross the houses. (Just turn your current solution upside down and you have that) – Dorus Jul 1 '15 at 19:26
• Another solution is to share pipes, since it doesn't say you can't do that you can connect all three wells to house 1, and then simply connect house 2 and house 3 to house 1's supply. – Jack Aidley Jul 1 '15 at 21:25

Probably a bit simpler than what you were looking for. Looking at the other answers, I feel like there might be some details missing from your question.

This link explains why this puzzle is unsolvable:

It also suggests a clever solution in "3 dimensions"
(actually, a 2D solution transfomed into a 3D one).

• If one uses 3D it's not necessary to use a torus, because any intersection can be avoided by placing a pipe over/below another one (digging it in deeper) – Voitcus Jul 2 '15 at 5:36
• For the awesomely nice picture (which I understand you designed and drew yourself just to make the answer be nice, right?) I think you deserve +1. – Konrad Viltersten Jul 3 '15 at 10:09
• Its line a "particle accelerator". :D Be careful. :). BTW. very nice answer – Shivam Pandya Jul 3 '15 at 11:02
• @Voitcus: It's funny how times change. When I went to school (1960s) a solution involving pipes over/below was regarded as "cheating", since the purpose of the problem was to demonstrate what isn't possible on a flat plane but is possible on a torus. Topology 101, I suppose. I vaguely recall there might have been a SciAm article about it. – MartynA Jul 3 '15 at 19:26
• However, I like the torus solution and +1'd it – Voitcus Jul 4 '15 at 14:48

Option 1:
Ask a mathematician to explain why the complete bipartite $K_{3,3}$ graph is non planar.

Option 2:
Put this drawing and a stack of cash in an envelope. Deliver the envelope to a competent engineer.

• This is hilarious, but not really an answer ... – Rand al'Thor Jul 1 '15 at 15:41
• True...but it is a solution – Anon Jul 1 '15 at 15:42
• @randal'thor The question doesn't state that the pipes cannot cross one another. Just that they can't intersect. – David Richerby Jul 1 '15 at 20:40
• @DavidRicherby If you want to get technical, the puzzle doesn't even mention pipes, just lines. And those lines definitely intersect... – Cain Jul 1 '15 at 21:56
• @Cain It's a 2-d representation of a 3-d solution in which the lines don't intersect. – David Richerby Jul 1 '15 at 22:32

This is impossible

Assume 2 houses are fully connected to 3 wells. There must be an 'inner' well which is surrounded by the connections to the other 2 wells.

For the third house to be connected to the inner well, it must be in one of the spaces between the inner well and one of the outer ones. But this means it is seperated from the other outer well. There is thus no way for the third house to join all three wells.

Edit: this answer assumes that lines may not cross a well/house en route to another.

• You're assuming that the pipes can't cross under or over each other. That's normally stated as a condition but this particular telling of the question doesn't mention it. – David Richerby Jul 1 '15 at 20:39
• Assume 2 houses are fully connected to 3 wells. There must be an 'inner' well which is surrounded by the connections to the other 2 wells.  That part must be proved too. – Cthulhu Jul 2 '15 at 10:55
• But this means it is seperated from the other outer well. There is thus no way for the third house to join all three wells this is not rigorous as well. – Cthulhu Jul 2 '15 at 10:58
• @Cthulu You're right, it's not rigorous. This is puzzling, not The Journal of Mathematical Tedium. – frodoskywalker Jul 2 '15 at 11:04

The blue is going through the house.

• Not sure why this is getting downvotes ... the question doesn't actually say the lines can't go through the houses! – Rand al'Thor Jul 4 '15 at 9:26

Not possible

According to graph theory it is the smallest non plannar graph with minimum number of lines.

In graph theory, a planar graph is a graph that can be embedded in the plane. This graph is commonly called as Utility graph or $K_{3,3}$.

There is a lot of interesting problems which can solve(or can prove not solvable :p ) using Graph theory.

Not possible

House 1 and House 2, when connected to Well 1 and Well 3 will form a closed shape around Well 2. House 3 will NOT be able to access one of the wells, regardless of where you put it.

Hi,

Is this not good enough? :/

Edit: Missing a pipe, damn it. I tried adding it but I kept ending up requiring some kind of magic

• I do think that's the first time I've seen anyone solve the puzzle like this, without having to draw singular pipes to each house or go into three dimentions. Great job. – Nefer007 Jul 3 '15 at 14:29
• You missed one: House 2 is not connected to Well 3. – mmking Jul 3 '15 at 14:30
• ARGGHHH DAMN IT! – Michael Baldry Jul 3 '15 at 14:34
• Though you missed one, you perfectly show why it's impossible to do xD – Chen Orihara Jul 3 '15 at 14:42
• Lets just say I intended to show why its impossible.. to illustrate the point. (surely that deserves some up votes?) – Michael Baldry Jul 3 '15 at 14:44

An old man from my village mentioned this puzzle to me 12 years ago. I have never been able to solve it, I'm hoping someone here can.

If the old man ask you to do this on a paper page, there is a solution with this small "legit hack":

just make a hole in the paper, and draw a line through it, then continue the line on the other side and comme back through another hole.

I am not sure this is the correct answer, but this is the best way that I found to answer this puzzle:

## protected by AzaJul 4 '15 at 0:43

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).