Efficient Trace Frequency Queries in Sparse Graphs
Abstract
Understanding how a vertex relates to a set of vertices is a fundamental task in graph analysis. Given a graph and a vertex set , consider the collection of subsets of the form where ranges over all vertices outside . These intersections, which we call the traces of , capture all ways vertices in connect to , and in this paper we consider the problem of listing these traces efficiently, and the related problem of recording the multiplicity (frequency) of each trace. For a given query set , both problems have obvious algorithms with running time and conditional lower bounds suggest that, on general graphs, one cannot expect better. However, in certain sparse graph classes, more efficient algorithms are possible: Drange \etal (IPEC 2023) used a data structure that answers trace queries in -degenerate graphs with linear initialisation time and query time that only depends on the query set and . However, the query time is exponential in , which makes this approach impractical. By using a stronger parameter than degeneracy, namely the strong -colouring number , we construct a data structure in time, which answers subsequent trace frequency queries in time , where is the number of edges of , is the strong -colouring number and the degeneracy of a suitable ordering of . We demonstrate that this data structure is indeed practical and that it beats the simple, obvious alternative in almost all tested settings, using a collection of 217 real-world networks with up to 1.1M edges. As part of this effort, we demonstrate that computing an ordering with a small strong -colouring number is feasible with a simple heuristic.
Keywords
Cite
@article{arxiv.2511.22289,
title = {Efficient Trace Frequency Queries in Sparse Graphs},
author = {Christine Awofeso and Pål Grønås Drange and Patrick Greaves and Oded Lachish and Felix Reidl},
journal= {arXiv preprint arXiv:2511.22289},
year = {2025}
}