# Distance of ray reflection inside a unit cube

There is a unit cube with internal mirror faces. A ray is emitted into the cube from one vertex, reflects off four faces (without touching vertices or edges), and stops at the opposite vertex from which it started. What is the minimum possible distance the ray travels?

• Can you explain how is it achieved? Thanks! – yp wu Jun 25 '18 at 9:30

Suppose to watch the cube "from above", so that emitting vertex (red in diagram below) and receiving vertex are opposite vertices of a unit square. We can reflect this square about its sides, so that the light path is a straight line in this lattice. I represented in the diagram the shortest paths from the red point to one of the black points (which are reflections of the receiving vertex). Each horizontal reflection is represented by the path crossing one of the lines.

The blue path is the shortest one and has no reflections: that means the four reflections occur along the vertical. This path is identical with the black paths, which have four horizontal reflections and no vertical one. The other paths must be discarded, because they either have too many reflections (red paths) or hit a vertex/edge (violet and green paths). The case of the green path is not so obvious, but to make four reflections it has to include two vertical reflections and the only way is to travel a unit vertical distance at each step. The only allowed path is represented below in 3D. It is made of five segments, each of length $\sqrt{1^2+(1/5)^2+(1/5)^2}=\sqrt{27}/5$. The total length is then $\sqrt{27}$. • This is awsome! Thanks for the clear explanation. – yp wu Jun 26 '18 at 2:45

Well it could hit a face right below it by reflecting off the wall opposite it half way down. We consider a triangle with one side of length $1$ and the other side of length $\frac{1}{2}$. Applying the Pythagorean Theorem, the third side has length $\frac{\sqrt{5}}{2}$. Since it has to reflect back, the answer I come up with is $\sqrt{5}$.

Bob

• As the problem description, the ray cannot touch any vertices or edges. – yp wu Jun 25 '18 at 0:35