0

I need to find minimum spanning trees in a large graph using graph-viz. The number of nodes and edge information will be given in another text-file in 2 columns,"source" and "destination". please help.

1 Answers1

1

Graphviz is principally a tool to layout graphs. The algorithms that are included relate to this task. The input for a graph is a graph specification.

What you need is a tool that computes the MST. There are several. The wikipedia article is a good start for references:

http://en.wikipedia.org/wiki/Prim's_algorithm

In python there is

http://pygraphviz.github.io/

In perl, I found

https://gist.github.com/hirotnk/780342

The SO answer here:

Graphviz Dot Algorithm

is also a good reference.

Given the output of an MST tool, you can general a file that is rendered by graphviz.

Community
  • 1
  • 1
JayInNyc
  • 2,193
  • 3
  • 20
  • 21