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 G and a vertex set X ⊂eq V(G), consider the collection of subsets of the form N(u) X where u ranges over all vertices outside X. These intersections, which we call the traces of X, capture all ways vertices in G connect to X, 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 X, both problems have obvious algorithms with running time O(|N(X)| · |X|) 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 ηl (IPEC 2023) used a data structure that answers trace queries in d-degenerate graphs with linear initialisation time and query time that only depends on the query set X and d. However, the query time is exponential in |X|, which makes this approach impractical. By using a stronger parameter than degeneracy, namely the strong 2-colouring number s2, we construct a data structure in O(d · \|G\|) time, which answers subsequent trace frequency queries in time O((d2 + s2d+2)|X|), where \|G\| is the number of edges of G, s2 is the strong 2-colouring number and d the degeneracy of a suitable ordering of G. 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 2-colouring number is feasible with a simple heuristic.

0

Turn this paper into a full lesson

ArcXiv compiles a staged curriculum from this paper: 8-12 lessons across beginner → advanced, synthesised section guides, visuals, flashcards, a quiz, exercises, and on-demand deep dives per section. Grounded in the abstract, never invented.

Discussion (0)

Sign in to join the discussion.

Loading comments…