So here is the problem:
Ignore problem 7, i blanked out irrelevant parts.
I already know that the answer to Problem 8 is 13 as stated in the picture. But i dont know how to algorithmically come to this conclusion.
I know how to create a MST from a graph using Prims Algorithm, but I feel like there is a better way to quickly come up with an answer here.
As it says in this link :
This problem can be solved by many different algorithms. It is the topic of some very recent research. There are several "best" algorithms, depending on the assumptions you make:
O(m log beta(m,n))
where the beta function has a complicated definition: the smallest i
such that log(log(log(...log(n)...)))
is less than m/n
, where the logs are nested i
times.3These algorithms are all quite complicated, and probably not that great in practice unless you're looking at really huge graphs. The book tries to keep things simpler, so it only describes one algorithm but doesn't do a very good job of it. I'll go through three simple classical algorithms (spending not so much time on each one).
So it is better to stick with Prim or Kruskal