arrow-left

All pages
gitbookPowered by GitBook
1 of 1

Loading...

8.6. Homework

This section describes the homework assignment to develop an algorithm to find all minimum spanning tress given an undirected graph.

hashtag
Finding All Minimum Spanning Trees

Your task is to write a program that finds all minimum spanning trees given an undirected graph.

hashtag
Tasks

  • Create a class called that inherits the interface.

  • Override the getMinimumSpanningTrees() method.

  • Feel free to use any classes in the package without modifying.

circle-info

You may want to start with the implementation of either or algorithm and update the code to find all minimum spanning trees.

hashtag
Extra Credit

  • Create an interesting graph and submit both the source code (as in ) and the diagram representing your graph (up to 1 point).

hashtag
Notes

  • Test your code with graphs consisting of zero to many spanning trees.

  • Your output must include only minimum spanning trees.

  • Your output should not include redundant trees. For example, if there are three vertices, 0, 1, and 2, {0 -> 1, 0 -> 2

Write a report that explains the logic and worst-case complexity of your program and save it as hw3.pdf.

} is considered the same as {
0 -> 1
,
0 <- 2
} or {
0 <- 1
,
0 -> 2
} or {
0 <-1
,
0 <- 2
}.
MSTAllHWarrow-up-right
MSTAllarrow-up-right
grapharrow-up-right
Prim's
Kruskal's
MSTAllHWTestarrow-up-right