Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there an algorithm to compute shortest tree (not path)?

Greetings Overflowers,

I have a weighted directed graph and I want the lowest cost tree that covers all nodes where the root is a specific given node of the graph. I do not know if I can also set a different maximum branching on each node where the number of branches from this node to other nodes (outward edges) is equal or less to that maximum ?

So what is the most suitable algorithm for my needs to start reading ? I hope it is fast enough :)

Many thanks !

like image 599
geeko Avatar asked Dec 11 '25 09:12

geeko


1 Answers

You're looking for a directed minimum spanning tree (arborescence), which is an optimum branching.

http://en.wikipedia.org/wiki/Chu%E2%80%93Liu/Edmonds_algorithm

like image 95
davin Avatar answered Dec 13 '25 00:12

davin



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!