Detecting One-variable Patterns
Abstract
Given a pattern $p = s_1x_1s_2x_2\cdots s_{r-1}x_{r-1}s_r$ such that $x_1,x_2,\ldots,x_{r-1}\in\{x,\overset{{}_{\leftarrow}}{x}\}$, where $x$ is a variable and $\overset{{}_{\leftarrow}}{x}$ its reversal, and $s_1,s_2,\ldots,s_r$ are strings that contain no variables, we describe an algorithm that constructs in $O(rn)$ time a compact representation of all $P$ instances of $p$ in an input string of length $n$ over a polynomially bounded integer alphabet, so that one can report those instances in $O(P)$ time.
- Publication:
-
arXiv e-prints
- Pub Date:
- March 2016
- DOI:
- 10.48550/arXiv.1604.00054
- arXiv:
- arXiv:1604.00054
- Bibcode:
- 2016arXiv160400054K
- Keywords:
-
- Computer Science - Data Structures and Algorithms
- E-Print:
- 16 pages (+13 pages of Appendix), 4 figures, accepted to SPIRE 2017