Presentation is loading. Please wait.

Presentation is loading. Please wait.

MIN-COST ABORESCENCES YQ Lu. Aborescence Definition: Given a directed graph G=(V,E) and a root r, an aborescence rooted at r is a subgraph T that each.

Similar presentations


Presentation on theme: "MIN-COST ABORESCENCES YQ Lu. Aborescence Definition: Given a directed graph G=(V,E) and a root r, an aborescence rooted at r is a subgraph T that each."— Presentation transcript:

1 MIN-COST ABORESCENCES YQ Lu

2 Aborescence Definition: Given a directed graph G=(V,E) and a root r, an aborescence rooted at r is a subgraph T that each vertex v!= r is uniquely reachable from r Directed analogue of a spanning tree Equivalent definitions: No directed cycles, and each vertex v != r has exactly one entering edge No directed cycles, and T has |V| - 1 arcs

3 Min-cost aborescences Given a directed graph G with: non-negative costs on each edge a root r such that each vertex is reachable from r: Find an aborescence rooted at r of total min cost. Distinct from other related problems: Minimum spanning tree Shortest paths tree etc

4 Main Idea of Edmond’s Algorithm Pick edges greedily This might not work, but helps reduce to subproblem Solve recursively

5 Naïve Greedy Picking Recall that an aborescence must contain exactly one edge entering each vertex Strategy: for each v != r, pick the cheapest edge entering it Claim: if this is an aborescence, it is a min-cost aborescence Problem: directed cycles might result (this gives us a O(E) algorithm for DAGs)

6 Pre-processing graph Label each vertex v != r by y(v), the min cost of any edge entering v The reduced cost of an edge (u,v) is c’(u,v) = c(u,v) – y(v). Equivalence: T is a min-cost aborescence in G with costs c iff T is a min-cost aborescence in G with costs c’. Proof: (see board)

7 Edmond’s Algorithm Relabel costs c in graph G by reduced costs c’ Let F* = set of 0-cost edges If F* does not have a cycle: F* is a min-cost aborescence, we are done! If F* has cycles: Shrink one cycle C={v_c} into one v’ Call new graph G’ Perform algorithm recursively on G’ to get T’ Extend T’, min-cost aborescence in G’, to get T, min-cost aborescence in G

8 Extension step Since T’ is a min-cost aborescence in G’ Each node (including the contracted cycle v’) has exactly one incoming edge Suppose incoming edge to v’ corresponded to (u,v) in original graph Return all edges in T’ and all edges in cycle except for the one entering v Claim: this gives a min-cost aborescence in G Proof: (see board)

9 Runtime Reducing costs takes O(E) time Picking 0-cost edges takes O(E) time Cycle detection takes O(V) time Recursive step is carried out at most O(V) times Algorithm runs in O(VE) time Possible to reduce to O(E + V log V) (Gabow, Galil, Spencer, Tarjan 1985)


Download ppt "MIN-COST ABORESCENCES YQ Lu. Aborescence Definition: Given a directed graph G=(V,E) and a root r, an aborescence rooted at r is a subgraph T that each."

Similar presentations


Ads by Google