# Odd solutions are in 3d

This puzzle is part of the Monthly Topic Challenge #11: Now in 3D.

You are given a collection of sticks which are straight lines of length 1. Two such sticks can be attached to each other at their end points either to form a straight line of length two or at a 90 degree angle. Your task is to build a closed path with an odd length (that is using an odd number of sticks).

Part a) Show that this is impossible if all sticks remain in the 2-dimensional plane.

Part b) What is the shortest solution (using the smallest amount of sticks) in 3 dimensions?

• In that closed path, does the last stick have to be connected to the first stick at a right angle too? Or do they not have to be connected, and just touch at any angle? Jun 5 at 8:36
• @JaapScherphuis Yes. Once the loop is closed there shouldn't be a distinguishable first or last stick anymore. Jun 5 at 8:40

So...

If all sticks are in a flat plane, they all must be either — or | (nothing else!).

Now, to build a closed path, the sticks must return to where they came from. Let's call this the origin point $$(0,0)$$. Furthermore, we can think of — as the X-axis and | as the Y-axis.

Turns out, each — changes our X-axis by $$1$$ and | changes our Y-axis by $$1$$! Since we need both our coordinates to be at $$0$$, the number of — and |s each have to be even.

We get WAY more options. Instead of choosing left or right when rotating 90 degrees, we can also choose to go up, down, 45-degree up, 88-degree up, and everything in-between. Wow!

What's the shortest solution, then?

Probably 7 sticks! Here's a visualization in GeoGebra.

Why's that the shortest solution?

Well... With 2 sticks, the best we can do is form a 90-degree angle with distance $$\sqrt2$$ from the origin. So, 3 sticks isn't enough.

Also, I previously did this for a 5-stick solution, but the first and last sticks don't form a 90-degree angle. All I did was add 2 more sticks, and that's it!

Though...

I can't (yet) prove how we need at least 7 sticks and not 5. Maybe you can prove/disprove it 🙂

Edit: Seems like @Herbert Kociemba has proven it!
Edit 2: @Jaap Scherphuis did it manually.

• I found the same solution, but then realised that where the loop closes, the sticks do not meet at a right angle.
– fljx
Jun 5 at 8:35
• Breaking the length-2 segment into 4 length-1 segments creates a 9-gonal solution with only right angles. Unclear to me whether there is a 7-gonal solution with only right angles. Jun 5 at 10:16
• There does not exist a solution with 5 sticks in 3D. Put the endpoints p0..p4 of the sticks s01, s12, s23, s34 and s40 into a coordinate system. Without loss of generality you can assume p0=(0,0,0), p1=(1,0,0) and p4= (0,0,1). p2= (1,y2,z2) and p3=(x3,y3,1). With these 4 variables 5 equations have to be true simultanuously: (p2-p1)*(p2-p1)=1, (p3-p2)*(p3-p2)=1, (p4-p3)*(p4-p3)=1, (p3-p2)*(p2-p1)=0 and (p4-p3)*(p3-p2)=0 where * denotes the scalar product. With Mathematica for example you can see that you can solve 4 but not all 5 equations simultanuously. Jun 5 at 14:17
• @HerbertKociemba ah, that's right! Is some programming needed to prove that, though? Can we do it manually? Jun 5 at 14:39
• You can prove it manually, but it is a bit tricky. I'd set $p0=(-1/2,0,0)$, $p1=(1/2,0,0)$, and assume without loss of generality that $p2_z=p4_z$, and $p2_y=-p4_y$, i.e. hold it so that these three sticks are rotationally symmetric about the z axis. If the two sticks meeting at $p3$ are straight, then the distance $p2-p4$ is $2$, which fixes them but gives them wrong angles. If the two sticks at $p3$ are at right angles, then distance $p2-p4$ is $\sqrt2$. Again those points $p2$,$p4$ can be solved, but to make their angles equal symmetry forces $p3_x=0$, but that also gives wrong angles. Jun 5 at 15:06