Sunday, May 5, 2013

Minimum Spanning Tree

Today I was correcting handins about building MSTs and I re-read some chapters from Sedgewick. A new thing i "learned" or at least that came to my attention is that when we are talking about big-O runtime it really doesn't matter if we are talking O(E log E) or O(E log V) since E <=V^2 -> log(E)<= log(V^2)=2log(V) --> O(log(E)) = O(log(V)).

So jumping lots of hoops to get from E log E to E log V really doesn't do much but allow you to practice building Union-Find datastructures and priority queues.

No comments:

Post a Comment