IBM Research | Ponder This | November 2010 solutions
Skip to main content

November 2010

<<October November December>>


Fixing m to be a power of 2; setting k and l to be zero; and looping i and j over the range [1,m], we get an integer f(i,j,k,l,m) for each pair (i,j).

Drawing a point on the j-th row of the i-th line when f(i,j,0,0,m) is zero and leaving it blank when it is not yields the Hilbert space-filling curve, which is a fractal.We received two interesting answers. The first was from John Tromp, who sent us a magnificent C program that generates this curve and has its shape:

The second was from Tim Tran, who switched the order, fixed i and j, and looped with k and l, producing a fractal-like construct:


If you have any problems you think we might enjoy, please send them in. All replies should be sent to: ponder@il.ibm.com