240 likes | 399 Views
Lecture 21 Primal-Dual in Algorithms. Primal Type. At each iteration, a feasible solution is updated to approach the optimal. Dual Type. At each iteration, a non-feasible “solution” is modified to approach to the feasibility.
E N D
Primal Type • At each iteration, a feasible solution is updated to approach the optimal.
Dual Type • At each iteration, a non-feasible “solution” is modified to approach to the feasibility. • E.g., Kruskal Algorithm and Prim Algorithm for minimum spanning tree.
10 8 2 4 6 35 15 1 25 20 30 17 21 40 3 5 7 15 11 Example 4 2 6 1 5 3 7
10 8 2 4 6 35 15 1 25 20 30 17 21 40 3 5 7 15 11 Find a Cycle 4 2 6 1 5 3 7
10 8 2 4 6 35 15 1 25 20 30 17 21 40 3 5 7 15 11 Delete the longest edge 4 2 6 1 5 3 7
10 8 2 4 6 35 15 1 25 20 30 17 21 40 3 5 7 15 11 Find a cycle 4 2 6 1 5 3 7
10 8 2 4 6 35 15 1 25 20 30 17 21 40 3 5 7 15 11 Delete a longest edge 4 2 6 1 5 3 7
10 8 2 4 6 35 15 1 25 20 30 17 21 40 3 5 7 15 11 Find a cycle 4 2 6 1 5 3 7
10 8 2 4 6 35 15 1 25 20 30 17 21 40 3 5 7 15 11 Delete a longest edge 4 2 6 1 5 3 7
10 8 2 4 6 35 15 1 25 20 30 17 21 40 3 5 7 15 11 Find a cycle 4 2 6 1 5 3 7
10 8 2 4 6 35 15 1 25 20 30 17 21 40 3 5 7 15 11 Delete a longest edge 4 2 6 1 5 3 7
10 8 2 4 6 35 15 1 25 20 30 17 21 40 3 5 7 15 11 Find a cycle 4 2 6 1 5 3 7
10 8 2 4 6 35 15 1 25 20 30 17 21 40 3 5 7 15 11 Delete a longest edge 4 2 6 1 5 3 7
10 8 2 4 6 35 15 1 25 20 30 17 21 40 3 5 7 15 11 Find a cycle 4 2 6 1 5 3 7
10 8 2 4 6 35 15 1 25 20 30 17 21 40 3 5 7 15 11 Delete a longest edge 4 2 6 1 5 3 7
Maximum Flow Primal-type • Ford-Fulkerson algorithm • Hopcroft–Karp algorithm Dual-type • Push-relabel algorithm Goldberg-Tarjan algorithm