eng
Schloss Dagstuhl – Leibniz-Zentrum für Informatik
Leibniz International Proceedings in Informatics
1868-8969
2012-05-29
272
287
10.4230/LIPIcs.RTA.2012.272
article
Matching of Compressed Patterns with Character-Variables
Schmidt-Schauß, Manfred
We consider the problem of finding an instance of a string-pattern s in a given string under compression by straight line programs (SLP). The variables of the string pattern can be instantiated by single characters. This is a generalisation of the fully compressed pattern match, which is the task of finding a compressed string in another compressed string, which is known to have a polynomial time algorithm.
We mainly investigate patterns s that are linear in the variables, i.e. variables occur at most once in s, also known as partial words.
We show that fully compressed pattern matching with linear patterns can be performed in polynomial time. A polynomial-sized representation of all matches and all substitutions is also computed.
Also, a related algorithm is given that computes all periods of a compressed linear pattern in polynomial time. A technical key result on the structure of partial words shows that an overlap of h+2 copies of a partial word w with at most h holes implies that w is strongly periodic.
https://drops.dagstuhl.de/storage/00lipics/lipics-vol015-rta2012/v20120508-organizer-final/LIPIcs.RTA.2012.272/LIPIcs.RTA.2012.272.pdf
matching
grammar-based compression
partial words