TITLE: Hilbert curve, understanding the original article
QUESTION [14 upvotes]: I'm trying to read and understand the article in which Hilbert gave an illustration of a space filling curve, namely "Ueber die stetige Abbildung einer Linie auf ein Flächenstück". It's only a short 2 page paper, but me being not the best mathematician, I'm not able to fill in the gaps left in the explanation.
This is the three figures available in the paper, below, I give my translation of the relevant piece of text.


"We take a line segment of length 1 and divide it up into 4 pieces of equal length. We then take a unit square and divide it by means of two perpendicular lines into 4 equal quadrants marked 1,2,3,4 (Fig 1). Next, we divide each piece on the line segment into four equal pieces, yeilding 16 pieces; at the same time, we also divide each of the quadrants into equal quadrants, and write the number $1, 2, 3,\ldots, 16$ in the 16 resulting quadrants, where the ordering of the quadrants is to be chosen so that each quadrant shares a side with it's predecessor (Fig 2). If we take this process further - Fig. 3 illustrates the next step - it can easily be seen that to each point on the line, we can assign a singular point in a quadrant. All we need to do is to mark the piece of the segment that contains the point. The quadrants with the same numbers lie necessarily within each other and enclose in the limit (or "on its border", orig. "in der Grenze") a point of the unit square."

Now, I have several issues with this, namely:

I do not understand how the first bold part gives an unambigous definition of the curve. Even if I follow the transitions between quadrants from fig 1 and fig 2, I can still come up with a different ordering (curve) for fig 3 (assuming the recursive nature of the definition), see the red line on the picture below. Notice that it's not even symmetrical (although it could be if I ordered the bottom right (last four) quadrants differently). Where did I go wrong here? (I understand there are other ways to define the curve, such as L-Systems, I'm just curious about this specific definition)



The second thing I do not understand is the second bold part. I can se how he maps intervals on the segment to quadrants, and that in the limit, the quadrants become points, as do intervals on the line. Intuitively, this is clear. However, what I do not understand is the part about quadrants with the same numbers being contained within each other; I'm, however, not all that sure about my translation being correct here.

Any other explanations welcome! I do have a little math background, but I am not a mathematician. I'd just like to convince myself about the correctness of the definition; pardon the inevitable lack of rigor.
thank you!
PS: the original paper, in German, can be found online here (pages 2-3) or at pages 94-95 of Chaos and Fractals: New Frontier of Science by Peitgen, Jürgens, and Saupe.
PPS: Here's the Springer link to Hilbert's paper (may be behind a pay wall)

REPLY [3 votes]: I think the following method yields correct results. Suppose your curve constructed at the $n$-th generation ($n$ starts at $n=1$), that is, you have already constructed a curve for when the square has been subdivided into $4^n$ squares. The curve defines a linear order on the set of those $4^n$ squares by saying that the first square is the one in the bottom left corner and, starting there, following the curve along its path. This is the ordering Hilbert considers.
Take any square from your collection of $4^n$ squares, say it's square number $k\in\lbrace 1,\dots,4^n,\rbrace$, cut it into $4$ equal squares, and draw the square that connects the centers of these smaller squares. This square we can call the "$k$-th central square" (of generation $n$). This gives you $4^n$ central squares.
Here's how you're going to modify the curve to get to the $(n+1)$-th generation. We're going to draw what it does one (generation $n$) square at a time (so there'll be $4^n$ steps).

$k=1$ : your new curve starts on the bottom left vertex of the $1$-th central square, must travel along the $1$-th central square, visit all $4$ vertices of the $1$-th central square (but only $3$ of it's edges), and end at one of the two vertices of the $1$-th central square that's closest to the $2$-th square (I'm deliberately not saying 'first square' or 'second square'). Now you draw the line connecting this last vertex to the directly opposite vertex in the $2$-th central square.

A drawing or intuition should convince you there is exactly one such path. This way you've constructed a curve that visited all $4$ vertices of the $1$-th central square and "connected" the $1$-th square to the $2$-th square, and ended on a vertex of the $2$-th central square.

If $2\leq k\leq 4^{n}-1$ : Suppose you've already constructed a curve that connects the $1$-th square to the $k$-th square, and ended on a vertex of the $k$-th central square. The generation $n$ curve connects square $k$ to square $k+1$. The generation $(n+1)$ curve will also connect square $k$ to square $k+1$. Just ask that it travel along the $k$-th central square, visit all $4$ vertices of that central square (but only $3$ of its eges), and end at one of the $2$ vertices of the $k$-th central square that are closest to the $(k+1)$-th square. You then connect this final vertex to the directly opposite vertex in the $(k+1)$-th central square.

Again, there is only one such path. This curve "connects" the $1$-th square to the $(k+1)$-th square, and ends on a vertex of the $(k+1)$-th central square

When $k=4^n$, you still need to draw a couple of lines. You've got a curve that connects the $1$-th square to the $4^n$-th square, and ends on a vertex of the $4^n$-th central square. You simly demand that it travel along the $4^n$-th central square, visit all its vertices and eends at the bottom right vertex.

The only thing that remains to be checked is that this final path indeed exists, that is, that you're not entering the $4^n$-th central square at its top left vertex, but this should follow from the (intuitively evident) fact that the construction above yields a path that is symetric with respect to the central vertical axis.