Abstract
We use a greedy strategy to list the spanning trees of the fan graph, \(F_n\), such that successive trees differ by pivoting a single edge around a vertex. 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)-amortized time using O(n) space. Additionally, we present O(n)-time algorithms for ranking and unranking the spanning trees for our listing; an improvement over the generic \(O(n^3)\)-time algorithm for ranking and unranking spanning trees of an arbitrary graph.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
References
Berger, I.: The enumeration of trees without duplication. IEEE Trans. Circuit Theory 14(4), 417–418 (1967). https://doi.org/10.1109/TCT.1967.1082758
Bogdanowicz, Z.R.: Formulas for the number of spanning trees in a fan. Appl. Math. Sci. 2(16), 781–786 (2008)
Chakraborty, M., Chowdhury, S., Chakraborty, J., Mehera, R., Pal, R.K.: Algorithms for generating all possible spanning trees of a simple undirected connected graph: an extensive review. Complex Intell. Syst. 5(3), 265–281 (2018). https://doi.org/10.1007/s40747-018-0079-7
Char, J.: Generation of trees, two-trees, and storage of master forests. IEEE Trans. Circuit Theory 15(3), 228–238 (1968)
Colbourn, C.J., Day, R.P., Nel, L.D.: Unranking and ranking spanning trees of a graph. J. Algorithms 10(2), 271–286 (1989)
Cummins, R.: Hamilton circuits in tree graphs. IEEE Trans. Circuit Theory 13(1), 82–90 (1966). https://doi.org/10.1109/TCT.1966.1082546
Feussner, W.: Ueber stromverzweigung in netzförmigen leitern. Ann. Phys. 314(13), 1304–1329 (1902)
Gabow, H.N., Myers, E.W.: Finding all spanning trees of directed and undirected graphs. SIAM J. Comput. 7(3), 280–287 (1978)
Hakimi, S.: On trees of a graph and their generation. J. Franklin Inst. 272(5), 347–359 (1961)
Hartung, E., Hoang, H.P., Mütze, T., Williams, A.: Combinatorial generation via permutation languages. In: Proceedings of the Fourteenth Annual ACM-SIAM Symposium on Discrete Algorithms, pp. 1214–1225. SIAM (2020)
Hoang, H.P., Mütze, T.: Combinatorial generation via permutation languages. II. Lattice congruences. arXiv preprint arXiv:1911.12078 (2019)
Holzmann, C.A., Harary, F.: On the tree graph of a matroid. SIAM J. Appl. Math. 22(2), 187–193 (1972). https://doi.org/10.1137/0122021
Kamae, T.: The existence of a Hamilton circuit in a tree graph. IEEE Trans. Circuit Theory 14(3), 279–283 (1967)
Kapoor, S., Ramesh, H.: Algorithms for enumerating all spanning trees of undirected and weighted graphs. SIAM J. Comput. 24(2), 247–265 (1995)
Kishi, G., Kajitani, Y.: On Hamilton circuits in tree graphs. IEEE Trans. Circuit Theory 15(1), 42–50 (1968). https://doi.org/10.1109/TCT.1968.1082762
Matsui, T.: A flexible algorithm for generating all the spanning trees in undirected graphs. Algorithmica 18, 530–543 (1997)
Mayeda, W., Seshu, S.: Generation of trees without duplications. IEEE Trans. Circuit Theory 12(2), 181–185 (1965)
Merino, A., Mütze, T.: Efficient generation of rectangulations via permutation languages. In: 37th International Symposium on Computational Geometry (SoCG 2021). Schloss Dagstuhl-Leibniz-Zentrum für Informatik (2021)
Minty, G.: A simple algorithm for listing all the trees of a graph. IEEE Trans. Circuit Theory 12(1), 120 (1965)
Shioura, A., Tamura, A.: Efficiently scanning all spanning trees of an undirected graph. J. Oper. Res. Soc. Jpn. 38(3), 331–344 (1995)
Shioura, A., Tamura, A., Uno, T.: An optimal algorithm for scanning all spanning trees of undirected graphs. SIAM J. Comput. 26(3), 678–692 (1997)
Smith, M.J.: Generating spanning trees. Master’s thesis, University of Victoria (1997)
Williams, A.: The greedy gray code algorithm. In: Dehne, F., Solis-Oba, R., Sack, J.-R. (eds.) WADS 2013. LNCS, vol. 8037, pp. 525–536. Springer, Heidelberg (2013). https://doi.org/10.1007/978-3-642-40104-6_46
Winter, P.: An algorithm for the enumeration of spanning trees. BIT Numer. Math. 26, 44–62 (1985)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2021 Springer Nature Switzerland AG
About this paper
Cite this paper
Cameron, B., Grubb, A., Sawada, J. (2021). A Pivot Gray Code Listing for the Spanning Trees of the Fan Graph. In: Chen, CY., Hon, WK., Hung, LJ., Lee, CW. (eds) Computing and Combinatorics. COCOON 2021. Lecture Notes in Computer Science(), vol 13025. Springer, Cham. https://doi.org/10.1007/978-3-030-89543-3_5
Download citation
DOI: https://doi.org/10.1007/978-3-030-89543-3_5
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-89542-6
Online ISBN: 978-3-030-89543-3
eBook Packages: Computer ScienceComputer Science (R0)