跳至主導覽 跳至搜尋 跳過主要內容

Generating pivot Gray codes for spanning trees of complete graphs in constant amortized time

  • Macao Polytechnic University

研究成果: Conference contribution同行評審

摘要

We present the first known pivot Gray code for spanning trees of complete graphs, listing all spanning trees such that consecutive trees differ by pivoting a single edge around a vertex. This pivot Gray code thus addresses an open problem posed by Knuth in The Art of Computer Programming, Volume 4 (Exercise 101, Section 7.2.1.6, [Knuth, 2011]), rated at a difficulty level of 46 out of 50, and imposes stricter conditions than existing revolving-door or edge-exchange Gray codes for spanning trees of complete graphs. Our recursive algorithm generates each spanning tree in constant amortized time using O(n2) space. In addition, we provide a novel proof of Cayley’s formula, nn−2, for the number of spanning trees in a complete graph, derived from our recursive approach. We extend the algorithm to generate edge-exchange Gray codes for general graphs with n vertices, achieving O(n2) time per tree using O(n2) space. For specific graph classes, the algorithm can be optimized to generate edge-exchange Gray codes for spanning trees in constant amortized time per tree for complete bipartite graphs, O(n)-amortized time per tree for fan graphs, and O(n)-amortized time per tree for wheel graphs, all using O(n2) space.

原文English
主出版物標題Proceedings of the 2026 Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2026
編輯Kasper Green Larsen, Barna Saha
發行者Association for Computing Machinery
頁面833-870
頁數38
ISBN(電子)9781611978971
DOIs
出版狀態Published - 2026
事件37th Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2026 - Vancouver, Canada
持續時間: 11 1月 202614 1月 2026

出版系列

名字Proceedings of the Annual ACM-SIAM Symposium on Discrete Algorithms
2026-January
ISSN(列印)1071-9040
ISSN(電子)1557-9468

Conference

Conference37th Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2026
國家/地區Canada
城市Vancouver
期間11/01/2614/01/26

指紋

深入研究「Generating pivot Gray codes for spanning trees of complete graphs in constant amortized time」主題。共同形成了獨特的指紋。

引用此