Skip to content
Conference

String Matching in (Block) Graphs: A Full Classification by Walk Length

Jul 2026 · Embedded Systems and Applications · pp. 105:1-105:19 · 0 citations · 41 references
Computer Science

TL;DR

A near-linear-time algorithm is given and there is no combinatorial algorithm improving over the state-of-the-art $\mathcal{O}(m|E| + N)$ bound for any $b\ge 4$.

Abstract

We consider directed graphs in which the nodes are labeled with strings. A walk in such a graph naturally corresponds to the concatenation of the visited nodes'labels. These graphs are widely used in bioinformatics to compactly describe large collections of highly similar genomes. Given such a graph $G=(V,E)$ and a pattern of length $m$, we seek a walk whose corresponding string has an occurrence of the pattern. We call this the SMLG problem. Amir et al. [J. Algorithms, 2000] showed that SMLG can be solved in $\mathcal{O}(m|E| + N)$ time, where $N$ is the total length of all node labels. Equi et al. [ACM Trans. Algorithms, 2023] showed that this is essentially optimal (under SETH). The existing lower bound assumes that the sought walk is of length $\Theta(|V|)$. Thus, we might be able to bypass this lower bound by restricting the walk length to $b-1$, which naturally reduces to having as input a directed graph whose set of nodes is partitioned into $b$ blocks. Then, we seek a walk in this graph that starts in the first block and ends in the last block. We call this the $b$-SMBG problem. We provide a more fine-grained classification that essentially settles the complexity of $b$-SMBG parameterized by $b$: (1) We give a near-linear-time algorithm for $b=3$. (2) We show that there is no combinatorial algorithm improving over the state-of-the-art $\mathcal{O}(m|E| + N)$ bound for any $b\ge 4$. (3) We also present a fast matrix multiplication-based algorithm yielding an improvement for $b \in \mathcal{O}(1)$, which is conditionally optimal. (4) Finally, we show that under SETH, for any $b \in \omega(\log |V|)$, no algorithm can improve over the state of the art.

View source

Similar papers

Jul 2026

Fundamental Limits of Query-Based Subgraph Detection

This paper investigates an information-limited version of the planted subgraph detection problem, in which the planted structure is an arbitrary sequence of graphs, where $\Gamma_n$ is embedded in an ambient graph on $n$ vertices, but the observer does not have access to the full adjacency matrix.

Wasim Huleihel · 0 citations
Preprint Aug 2026

A Separator-based Algorithm for the Graph Edit Distance Problem

A novel exponential time algorithm is presented to compute the exact GED and a corresponding edit sequence in $O^*(4 + \varepsilon)^n$ time and polynomial space, provided one of the two graphs admits strictly sublinear balanced separators.

L. Bülte, Philip Mayer, Lars Müller et al. · 0 citations
Conference Jul 2026

Text Indexing: From Reporting to Counting

We prove an elementary yet powerful combinatorial lemma: in any rooted tree with $L$ leaves, the number of nodes whose depth is smaller than the number of their leaf descendants is at most $L$. For any string $T$ of length $n$, a direct application of this lemma to the suffix trie of $T$ yields that the number of subst...

B. Bals, P. Charalampopoulos, Oded Lachish et al. · 0 citations
Preprint Jul 2026

Finding Adam in noisy trees

It is proved that, as long as $p=o(\log n /n)$, for any $\varepsilon>0$, one can construct a confidence set of vertices of size $K(\varepsilon)$ that depends only on $\varepsilon$ and not on $n$, such that it contains the root with probability at least $1-\varepsilon$.

Luc Devroye, Gábor Lugosi, Neeladri Maitra · 1 citation · ⚡1
Preprint Aug 2026

A Linear-Time Approximation Scheme for the Densest Subgraph Problem

This paper provides the first truly linear-time approximation scheme for the Densest Subgraph Problem, and uses assignments arising from a flow-based formulation together with a structural carving lemma to progressively carve "sparse" parts of the graph while nearly preserving the densest subgraph.

Elena Grigorescu, Mehrshad Taziki · 0 citations
Preprint Aug 2026

The Cayley Completion of a Graph

A finite connected graph is rarely a Cayley graph. We measure how far it is from being one: given $G$ with $n$ vertices and $m$ edges, how few edges must be added, or added and deleted, before the result is a Cayley graph of an abelian group of order $n$ on the same vertex set? This defines two invariants, the completi...

Rigobert Fokam Souop, Laurent Bitjoka · 2 citations · ⚡2

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.