We are given a finite set of disjoint regions in the plane. We wish to cover all the regions by unit squares, and compute a path that visits the centers of all the unit squares in the cover. Our objective is to minimize the length of this path. The problem arises in the automatic optical inspection of printed circuit boards and other assemblies.
We show that a natural heuristic yields a path of length at most a constant times optimal, whenever the problem of covering the regions by the minimum number of unit squares can be approximated to within a constant. We consider a generalization in which the regions may be covered by squares of different sizes, and for each input region we are given an upper bound on the size of the permissible square. We show that a simple extension of our heuristic is provably good in this case as well.