English

Pivot Gray Codes for the Spanning Trees of a Graph ft. the Fan

Data Structures and Algorithms 2022-02-04 v1 Discrete Mathematics Combinatorics

Abstract

We consider the problem of listing all spanning trees of a graph GG such that successive trees differ by pivoting a single edge around a vertex. Such a listing is called a "pivot Gray code", and it has more stringent conditions than known "revolving-door" Gray codes for spanning trees. Most revolving-door algorithms employ a standard edge-deletion/edge-contraction recursive approach which we demonstrate presents natural challenges when requiring the "pivot" property. Our main result is the discovery of a greedy strategy to list the spanning trees of the fan graph in a pivot Gray code order. It is the first greedy algorithm for exhaustively generating spanning trees using such a minimal change operation. The resulting listing is then studied to find a recursive algorithm that produces the same listing in O(1)O(1)-amortized time using O(n)O(n) space. Additionally, we present O(n)O(n)-time algorithms for ranking and unranking the spanning trees for our listing; an improvement over the generic O(n3)O(n^3)-time algorithm for ranking and unranking spanning trees of an arbitrary graph. Finally, we discuss how our listing can be applied to find a pivot Gray code for the wheel graph.

Keywords

Cite

@article{arxiv.2202.01746,
  title  = {Pivot Gray Codes for the Spanning Trees of a Graph ft. the Fan},
  author = {Ben Cameron and Aaron Grubb and Joe Sawada},
  journal= {arXiv preprint arXiv:2202.01746},
  year   = {2022}
}

Comments

An extended version of arXiv:2108.09363 which was presented at COCOON 2021