in Algorithms closed by
682 views
0 votes
0 votes

How to solve such type of questions ? 

in Algorithms closed by
682 views

4 Comments

Ans given in key is 14 but I doubt maybe wrong . 

0
0
The main concept is to form a cycle of minimum length.

==> here 1 and 2 we have select. But for 3 we have an option. we can put this weight in the cycle of length three.

==>So, we can't select the weight 3 because it will form the cycle.

using this concept we can further proceed the question
0
0

i am getting 14.

A ->B = 1

B -> D = 2

A-> D = 3. ( Can't select because form a cycle)

A->C = 4.

B -> C = 5. ( can't select because it will form a cycle)

C->E = 6.   take C -> D = 6, C -> E = 7 . MST 1+2+4+7=14

0
0

Related questions