Mathematica 9 is now available
Student Support Forum
Student Support Forum: 'Optimal algorithm/function for diameter of a TREE' topicStudent Support Forum > General > "Optimal algorithm/function for diameter of a TREE"

Help | Reply To Topic
Author Comment/Response
10/27/10 12:08pm

I do not want to use Diameter[g] because it's inefficient for trees. To find the diameter of tree's you just need to do two distance calculations. However distance[g,v] only returns lengths, not vertex index.

Does anyone know of a fast way to calculate diameter of TREE in mathematica?

URL: ,
Help | Reply To Topic