An optimal algorithm for scanning all spanning trees of undirected graphs

Akiyoshi Shioura, Akihisa Tamura, Takeaki Uno

Research output: Contribution to journalArticle

63 Citations (Scopus)

Abstract

Let G be an undirected graph with V vertices and E edges. Many algorithms have been developed for enumerating all spanning trees in G. Most of the early algorithms use a technique called "backtracking." Recently, several algorithms using a different technique have been proposed by Kapoor and Ramesh (1992), Matsui (1993), and Shioura and Tamura (1993). They find a new spanning tree by exchanging one edge of a current one. This technique has the merit of enabling us to compress the whole output of all spanning trees by outputting only relative changes of edges. Kapoor and Ramesh first proposed an O(N + V + E)-time algorithm by adopting such a "compact" output where N is the number of spanning trees. Another algorithm with the same time complexity was constructed by Shioura and Tamura. These are optimal in the sense of time complexity but not in terms of space complexity because they take O(VE) space. We refine Shioura and Tamura's algorithm and decrease the space complexity from O(VE) to O(V+E) while preserving the time complexity. Therefore, our algorithm is optimal in the sense of both time and space complexities.

Original languageEnglish
Pages (from-to)678-692
Number of pages15
JournalSIAM Journal on Computing
Volume26
Issue number3
DOIs
Publication statusPublished - 1997 Jun

Keywords

  • Optimal algorithm
  • Spanning trees
  • Undirected graphs

ASJC Scopus subject areas

  • Computer Science(all)
  • Mathematics(all)

Fingerprint Dive into the research topics of 'An optimal algorithm for scanning all spanning trees of undirected graphs'. Together they form a unique fingerprint.

  • Cite this