# Flatlander on torus

Suppose you are a $2$-dimensional being living on an ideal torus made of a cylinder of radius $a$, curled together such it exactly fits inside a sphere/circle of radius $b$, is it possible to determine $a$ and $b$ by walking a finite length, if you can only measure the local distance you walk, but you are allowed to identify places you have been before and the length you had walked at this point?

What is the maximum length you need to walk to determine $a$ and $b$ with optimal strategy?

-

Assume the flatlander is dropped on a point $p\in T$. By doing very precise length measurements he is able to determine the Gaussian curvature $\kappa(p)$ of $T$ at $p$ (this is the Theorema Egregium), and doing the same thing for all points on a tiny circle of radius $\epsilon>0$ around $p$ he will be able to determine the direction of the level line of $\kappa$ through $p$. There is a unique geodesic $\gamma$ through $p$ which intersects this level line orthogonally. He then should proceed along $\gamma$ and make curvature measurements continuously until he is back at $p$. From the minimum and maximum of the curvature he has found underway it is easy to compute $a$ and $b$. (The ${\rm min}$ and the ${\max}$ of $\kappa$ can be determined even if $\gamma$ is slightly "off track".)

-

If the 2D thing cannot distinguish between directions, it may go off in one direction and never return to its starting point, there is no guaranteed strategy. If it can, then to identify a and b it needs two mesurements, so it should go once around the cyclinder to find a, and once around the loop radius b-a, and the start of the b-a radius loop is a distance at most $\pi$a from its starting point.

-
If we choose a random direction, won't we eventually intersect our own path? Also, what if we are allowed to identify places near where we have been before? – Dan Brumleve Jan 26 '12 at 9:46
Dan: If you see the torus as an square with sides identified, it is clear that you can have straight paths which do not self-intersect. Just move in a non-rational direction. en.wikipedia.org/wiki/Irrational_winding_of_a_torus – Thomas Rot Jan 26 '12 at 10:23
If you are allowed to identify points that are near you will find yourself eventually. – Thomas Rot Jan 26 '12 at 10:23
@Thomas, you are right about that. My answer (hand-waving about a "random walk") doesn't assume very much though -- it applies just as well to a discrete complex as to a differentiable manifold. I wonder if it is correct when made precise? – Dan Brumleve Jan 26 '12 at 10:51
Dan: I think random walks on the 2d torus are selfintersecting, but this does not hold in higher dimensions I believe. (I do not know much about random walks though) – Thomas Rot Jan 26 '12 at 13:07

I don't know the optimal strategy, but here is one way to do it: randomly walk the surface until we intersect any our previous positions. Now we have a tile. Repeat until the tiles form the complex of a topological torus. Now if $a < b$ then $a$ can be approximated by a breadth-first search, and $b$ can be approximated by the same search excluding the tiles traversed while estimating $a$. Continue creating tiles via random walks for more precision.

-
You could randomly walk the surface, and never reach a previous position. – Gerry Myerson Jan 26 '12 at 10:52
@Gerry, is it not true that a 2D random walk reaches its original position almost certainly? I thought that only broke down in 3D. Please explain further why I am wrong? – Dan Brumleve Jan 26 '12 at 10:55
Almost certainly $\ne$ certainly. – Gerry Myerson Jan 26 '12 at 11:10
@Gerry, I think we are looking for a practical algorithm here, in which case almost is good enough. However, the assumptions are unclear to me. – Dan Brumleve Jan 26 '12 at 11:15
One problem with this is that the inner and outer circumferences are not distinguished. – Dan Brumleve Jan 26 '12 at 12:32