# On the Complexity of Exact Pattern Matching in Graphs: Binary Strings   and Bounded Degree

**Authors:** Massimo Equi, Roberto Grossi, Veli M\"akinen

arXiv: 1901.05264 · 2020-06-04

## TL;DR

This paper establishes a conditional lower bound on the computational complexity of exact pattern matching in labeled graphs with binary labels, showing it cannot be solved faster than quadratic time unless SETH is false, even in restricted graph classes.

## Contribution

The paper provides a direct reduction from SETH to the exact pattern matching problem in graphs, strengthening the understanding of its computational hardness and linking it to well-known complexity hypotheses.

## Key findings

- Exact pattern matching in graphs is conditionally quadratic-time hard.
- The problem remains hard even for restricted graph classes like bounded degree and acyclic graphs.
- Exact and approximate pattern matching are both quadratic-time hard under SETH.

## Abstract

Exact pattern matching in labeled graphs is the problem of searching paths of a graph $G=(V,E)$ that spell the same string as the pattern $P[1..m]$. This basic problem can be found at the heart of more complex operations on variation graphs in computational biology, of query operations in graph databases, and of analysis operations in heterogeneous networks, where the nodes of some paths must match a sequence of labels or types. We describe a simple conditional lower bound that, for any constant $\epsilon>0$, an $O(|E|^{1 - \epsilon} \, m)$-time or an $O(|E| \, m^{1 - \epsilon})$-time algorithm for exact pattern matching on graphs, with node labels and patterns drawn from a binary alphabet, cannot be achieved unless the Strong Exponential Time Hypothesis (SETH) is false. The result holds even if restricted to undirected graphs of maximum degree three or directed acyclic graphs of maximum sum of indegree and outdegree three. Although a conditional lower bound of this kind can be somehow derived from previous results (Backurs and Indyk, FOCS'16), we give a direct reduction from SETH for dissemination purposes, as the result might interest researchers from several areas, such as computational biology, graph database, and graph mining, as mentioned before. Indeed, as approximate pattern matching on graphs can be solved in $O(|E|\,m)$ time, exact and approximate matching are thus equally hard (quadratic time) on graphs under the SETH assumption. In comparison, the same problems restricted to strings have linear time vs quadratic time solutions, respectively, where the latter ones have a matching SETH lower bound on computing the edit distance of two strings (Backurs and Indyk, STOC'15).

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/1901.05264/full.md

## Figures

4 figures with captions in the complete paper: https://tomesphere.com/paper/1901.05264/full.md

## References

30 references — full list in the complete paper: https://tomesphere.com/paper/1901.05264/full.md

---
Source: https://tomesphere.com/paper/1901.05264