Finding and counting patterns in sparse graphs
Source
Journal of Computer and System Sciences
ISSN
1090-2724
Date Issued
2026-05-01
Author(s)
Abstract
We consider algorithms for finding and counting small, fixed graphs in sparse host graphs. In the non-sparse setting, the parameters treedepth and treewidth play a crucial role in fast, constant-space and polynomial-space algorithms respectively. We discover two new parameters that we call matched treedepth and matched treewidth. We show that, for many patterns, finding and counting patterns with low matched treedepth and low matched treewidth can be done asymptotically faster than the existing algorithms when the host graphs are sparse. As an application to finding and counting fixed-size patterns, we discover O˜(m<sup>3</sup>)-time.<sup>1</sup> constant-space algorithms for graphs on at most 11 edges and O˜(m<sup>2</sup>)-time, polynomial-space algorithms for graphs on at most 9 edges.<sup>2</sup>
Keywords
Matchings | Subgraph detection and counting | Treedepth | Treewidth
