
We present a new algorithm for subsequence matching in grammar compressed strings. Given a grammar of size $n$ compressing a string of size $N$ and a pattern string of size $m$ over an alphabet of size $��$, our algorithm uses $O(n+\frac{n��}{w})$ space and $O(n+\frac{n��}{w}+m\log N\log w\cdot occ)$ or $O(n+\frac{n��}{w}\log w+m\log N\cdot occ)$ time. Here $w$ is the word size and $occ$ is the number of occurrences of the pattern. Our algorithm uses less space than previous algorithms and is also faster for $occ=o(\frac{n}{\log N})$ occurrences. The algorithm uses a new data structure that allows us to efficiently find the next occurrence of a given character after a given position in a compressed string. This data structure in turn is based on a new data structure for the tree color problem, where the node colors are packed in bit strings.
To appear at CPM '14
FOS: Computer and information sciences, Data structures, straight-line program, Computer Science - Data Structures and Algorithms, compressed subsequence matching, tree coloring, first colored ancestor, Data Structures and Algorithms (cs.DS), SLP, Algorithms on strings
FOS: Computer and information sciences, Data structures, straight-line program, Computer Science - Data Structures and Algorithms, compressed subsequence matching, tree coloring, first colored ancestor, Data Structures and Algorithms (cs.DS), SLP, Algorithms on strings
| selected citations These citations are derived from selected sources. This is an alternative to the "Influence" indicator, which also reflects the overall/total impact of an article in the research community at large, based on the underlying citation network (diachronically). | 9 | |
| popularity This indicator reflects the "current" impact/attention (the "hype") of an article in the research community at large, based on the underlying citation network. | Average | |
| influence This indicator reflects the overall/total impact of an article in the research community at large, based on the underlying citation network (diachronically). | Average | |
| impulse This indicator reflects the initial momentum of an article directly after its publication, based on the underlying citation network. | Average |
