Reverse Engineering Prefix Tables
The Prefix table of a string reports for each position the maximal length of its prefixes starting here. The Prefix table and its dual Suffix table are basic tools used in the design of the most efficient string-matching and pattern extraction algorithms. These tables can be computed in linear time independently of the alphabet size.
We give an algorithmic characterisation of a Prefix table (it can be adapted to a Suffix table). Namely, the algorithm tests if an integer table of size $n$ is the Prefix table of some word and, if successful, it constructs the lexicographically smallest string having it as a Prefix table. We show that the alphabet of the string can be bounded to $\log_2 n$ letters. The overall algorithm runs in $O(n)$ time.
Design and analysis of algorithms
Algorithms on strings
Pattern matching
String matching
Combinatorics on words
Prefix table
Suffix table
289-300
Regular Paper
Julien
Clement
Julien Clement
Maxime
Crochemore
Maxime Crochemore
Giuseppina
Rindone
Giuseppina Rindone
10.4230/LIPIcs.STACS.2009.1825
Creative Commons Attribution-NoDerivs 3.0 Unported license
https://creativecommons.org/licenses/by-nd/3.0/legalcode