# Answer to Puzzle #3: The Fly in a Cubic Room

3. You are a bug sitting in one corner of a cubic room. You wish to walk (no flying) to the extreme opposite corner (the one farthest from you). Describe the shortest path that you can walk.

I worked this one out for myself so it clearly isn't that hard...

Before reading the answer can I interest you in a clue?

First consider the diagram:-

The problem phrased differently is that we have to get from point A to point B only moving along the walls.

The shortest route is shown it is A-H-B where H is the mid point of D-E.

The length of this route can easily be calculated, assume the cube has sides of length 1 unit (it doesn't matter what these units are, meters, feet, what ever) The distance A-H is the hypotenuse of a triangle 1 x ½ a quick bit of pythag tells us that A-H equals √(5/4). Similarly H-B has the same length hence the total length is 2 x √(5/4) this is actually equal to the square root of 5

The above is a flat diagram of a cube net, such that you could cut it out and fold it to make the cube we have been considering, the labelling is the same. There are two point 'B's that when it is folded would become one. We know that the shortest distance between two points is a straight line so a rigorous mathematical proof is not necessary.

The diagram shows two acceptable routes but there are actually six. It's an interesting exercise to draw them all on to the cube net.

ETA: Some people have been confused by the diagram. I think possibly the line A-H looks like it might be the back edged of the cube, with H being the hidden corner. So we are absolutely clear I made a video, this time using Minecraft:

First consider the diagram:-

The problem phrased differently is that we have to get from point A to point B only moving along the walls.

The shortest route is shown it is A-H-B where H is the mid point of D-E.

The length of this route can easily be calculated, assume the cube has sides of length 1 unit (it doesn't matter what these units are, meters, feet, what ever) The distance A-H is the hypotenuse of a triangle 1 x ½ a quick bit of pythag tells us that A-H equals √(5/4). Similarly H-B has the same length hence the total length is 2 x √(5/4) this is actually equal to the square root of 5

__A-H-B = √5 = 2.236__

## Proof this is the shortest route

So far we have calculated the shortest route, but not necessarily proved it to be so. Cameron Tiesma sent me this. Consider the following diagram:The above is a flat diagram of a cube net, such that you could cut it out and fold it to make the cube we have been considering, the labelling is the same. There are two point 'B's that when it is folded would become one. We know that the shortest distance between two points is a straight line so a rigorous mathematical proof is not necessary.

The diagram shows two acceptable routes but there are actually six. It's an interesting exercise to draw them all on to the cube net.

ETA: Some people have been confused by the diagram. I think possibly the line A-H looks like it might be the back edged of the cube, with H being the hidden corner. So we are absolutely clear I made a video, this time using Minecraft:

© Nigel Coldwell 2004 - – The

**questions**on this site may be reproduced without further permission, I do not claim copyright over them. The

**answers**are mine and may not be reproduced without my expressed prior consent. Please enquire using the link at the top of the page.

__PayPal__

I always think it's arrogant to add a donate button, but it has been requested. If I help you get a job though, you could buy me a pint! - nigel