English

An invertible transform for efficient string matching in labeled digraphs

Data Structures and Algorithms 2021-11-24 v7

Abstract

Let G=(V,E)G = (V, E) be a digraph where each vertex is unlabeled, each edge is labeled by a character in some alphabet Ω\Omega, and any two edges with both the same head and the same tail have different labels. The powerset construction gives a transform of GG into a weakly connected digraph G=(V,E)G' = (V', E') that enables solving the decision problem of whether there is a walk in GG matching an arbitrarily long query string qq in time linear in q|q| and independent of E|E| and V|V|. We show GG is uniquely determined by GG' when for every vVv_\ell \in V, there is some distinct string ss_\ell on Ω\Omega such that vv_\ell is the origin of a closed walk in GG matching ss_\ell, and no other walk in GG matches ss_\ell unless it starts and ends at vv_\ell. We then exploit this invertibility condition to strategically alter any GG so its transform GG' enables retrieval of all tt terminal vertices of walks in the unaltered GG matching qq in O(q+tlogV)O(|q| + t \log |V|) time. We conclude by proposing two defining properties of a class of transforms that includes the Burrows-Wheeler transform and the transform presented here.

Cite

@article{arxiv.1905.03424,
  title  = {An invertible transform for efficient string matching in labeled digraphs},
  author = {Abhinav Nellore and Austin Nguyen and Reid F. Thompson},
  journal= {arXiv preprint arXiv:1905.03424},
  year   = {2021}
}

Comments

13 pages, 3 figures; v7 is the content of the camera-ready copy for CPM 2021 incorporating reviewer feedback

R2 v1 2026-06-23T09:01:09.448Z