Solving the JIGSAW puzzle problem in linear time

Abstract We introduce an algorithm that efficiently matches (fits together) parts of boundaries of two-dimensional objects in order to assemble apictorial jigsaw puzzles. A rotation-independent shape encoding allows us to find the best (longest) match between two shapes in time proportional to the sum of the lengths of their representations. In order to find this match, we use Weiner's string matching technique combined with compact position trees to find, in linear time, the longest shared pattern between two strings. The shape matching procedure is then used by two greedy algorithms to assemble the apictorial jigsaw puzzles.