retagged by
810 views

2 Answers

0 votes
0 votes

Option A is correct using path compression and union by rank in disjoint set data struture implementation using array data struture a combination of M uninon and find operation will take O(N+Mlog*N) where log* is very slowly growing function. In physical large  values of  value of log* is 5.Please read about Ackermann function. In kruskal algorithm N=V and M=O(E) so combination of find and union operation will take O(V+Elog*V) for dense graph its equal to O(E).

And time for sorting the edges will O(ElogV). so total time will be E+Elogv

Related questions

5 votes
5 votes
3 answers
2
Kapil asked Jan 24, 2017
3,411 views
It may be the case that "Kruskal's Algorithm may not maintain connectivity while Prim's algorithm always does that" ?Any example which favours this ?
5 votes
5 votes
1 answer
4