LEA
Fakultät für Informatik der Technischen Universität München
Lehrstuhl für Effiziente Algorithmen
Postadresse: 80290 München; Hausadresse: Arcisstr.21, 80333 München

Counting Minimum Weight Spanning Trees

Andrei Z. Broder and Ernst W. Mayr


We present an algorithm for counting the number of minimum weight spanning trees, based on the fact that the generating function for the number of spanning trees of a given graph, by weight, can be expressed as a simple determinant. For a graph on n vertices with m edges, our algorithm requires O(M(n)) elementary operations, where M(n) is the number of elementary operations needed to multiply nxn matrices. The previous best algorithm for this problem, due to Gavril (1987), required O(n M(n)) operations. (Since the number of trees in a complete graph is nn-2 our algorithm, as well as Gavril's, might involve operations on numbers of this magnitude. Such operations are accounted as elementary operations.)