Download Mathematica Code (.sea.hqx)


Genetically Seeking Sparse Rulers
David Fowler
University of Nebraska-Lincoln


Using an n - inch ruler with markings at every inch, one can measure any integral number of inches from 1 to n. A little thought shows that not all of those marks are necessary. Rulers with minimal or nearly minimal numbers of markings are called "sparse rulers." This notebook contains the code for finding sparse rulers using a genetic algorithm.

The procedure in a genetic algorithm is to work iteratively toward a solution to a problem. At any given iteration, a family of possible solutions is evaluated for their "fitness," that is, how close they come to satifying the conditions of the problem. The algorithm selects the fittest solutions and then recombines these solutions to produce a new generation of solutions. In this way a solution to the problem "evolves."

References to genetic algorithms [Holland, 1992], genetic programming [Koza, 1992], and further general questions of evolution and order [Kauffman, 1993] can be found at the conclusion of this notebook.