TADM2E 6.10

From Algorithm Wiki
Revision as of 15:39, 22 July 2020 by Bkarpov96 (talk | contribs) (6.10 solution)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
1. DFS from any vertex when found back edge add it to F.
2. Applying the Kruskal's algorithm
- First multiply the weights of all edges by -1
- If an edge is found during the algorithm execution, both ends of which belong to the same component, add it to F
By multiplying all edges by -1, the edges with the highest weight will be processed first => the edges with the lowest weight will be added to F
An alternative statement of the problem from point 2 is to find the complement to the maximum spanning tree.

--Bkarpov96 (talk) 15:38, 22 July 2020 (UTC)