Since that turned out to be pretty easy, here's a related problem: ----- Consider the 4 families of parallel planes given by ± x ± y ± z = K for all integers K. Let the union of all such planes be denoted by V. For any integer point P = (K,L,M), how long is the shortest path connecting P to (0,0,0) that lies entirely in V ??? —Dan Allan Wechsler wrote: ----- You have a box bounded by the planes x=0, x=K, y=0, y=L, z=0, z=M. My intuition is that confining the path to the surface of that box doesn't cost you anything. If that intuition is correct, the answer is sqrt(min((K+L)^2 + M^2, (K+M)^2 + L^2, (L+M)^2 + K^2)). On Mon, Nov 13, 2017 at 7:57 PM, Dan Asimov <dasimov@earthlink.net> wrote: Let W denote the union of all coordinate planes given by x = K or y = K or z = K for K an integer. I.e., W = Z x R x R u R x Z x R u R x R x Z with Z = integers, R = reals. Question: --------- Let P, Q belong to Z^3. What is the length of the shortest path connecting P to Q that lies entirely in W ??? * * * WLOG assume P = (K,L,M) and Q = (0,0,0). The answer is a function of form f(K,L,M). What is f(K,L,M) ??? I'm not sure if this is easy or hard. -----