LMAS: The Key to Enumerating 2-Spheres Over the Edit Metric

Jessie Lenarz1
1Department of Mathematics & Computer Science, Concordia College, Moorhead, Minnesota, USA 56562,

Abstract

This paper gives the exact size of edit spheres of radius 1 and 2 for any word over a finite alphabet. Structural information about the edit metric space, in particular a representation as a pyramid of hypercubes, will be given. The 1-spheres are easy to understand, being identical to 1-spheres over the Hamming metric. Edit metric 2-spheres are much more complicated. The size of a 2-sphere hinges on the structure of the word at its center. That is, the word’s length, number of blocks, and most importantly (and troublesome) the number of locally maximal alternating substrings (LMAS) of each length. An alternating substring switches back and forth between two characters, e.g. 010101, and is maximal if it is contained in no other such substring. This variation in sphere size depending on center characteristics is what truly separates the algebraic character of codes over the edit metric from those over the Hamming metric.