15
Perfect Matching for Biconnected Cubic Graphs in O(nlog 2 n) Time Krzysztof Diks & Piotr Stańczyk

Perfect Matching for Biconnected Cubic Graphs in O(nlog 2 n) Time Krzysztof Diks & Piotr Stańczyk

Embed Size (px)

Citation preview

Page 1: Perfect Matching for Biconnected Cubic Graphs in O(nlog 2 n) Time Krzysztof Diks & Piotr Stańczyk

Perfect Matching for Biconnected Cubic Graphs in O(nlog2n) Time

Krzysztof Diks & Piotr Stańczyk

Page 2: Perfect Matching for Biconnected Cubic Graphs in O(nlog 2 n) Time Krzysztof Diks & Piotr Stańczyk

Petersen theorem (1891)

Cubic graph without perfect matching contains at least three bridges

Conclusion: every biconnected cubic graph has a perfect matching

Page 3: Perfect Matching for Biconnected Cubic Graphs in O(nlog 2 n) Time Krzysztof Diks & Piotr Stańczyk

Frink’s algorithm - O(n2) time (1926)

Observation: at least one of two local reductions of n+2-vertex biconnected graph leads to n-vertex biconnected graph

Idea: keep reducing a graph (preserving biconnectivity) until it consists of 2 vertices.

Page 4: Perfect Matching for Biconnected Cubic Graphs in O(nlog 2 n) Time Krzysztof Diks & Piotr Stańczyk

Frink’s algorithm - O(n2) time (1926) Reduce graph to 2-vertex (preserving

biconnectivity) – O(n) phases, O(n) time each Construct arbitrary matching – O(1) Reverse all reductions (4 cases possible) – O(n)

phases, O(n) time each (worst case)

Page 5: Perfect Matching for Biconnected Cubic Graphs in O(nlog 2 n) Time Krzysztof Diks & Piotr Stańczyk

Biedl’s et al. algorithm – O(nlog4n) time (SODA,1999) Valid reduction selection

Instead of computing biconnected components from scratch use dynamic graph biconnectivity algorithm – O(log4n) per edge removal/addition/query

Elimination of case (d) from the revertion process 1) Select an edge e which is excluded from the matching 2) Perform reductions against edges incident to e (edge e

„travels” along the graph) 3) Construct initial matching excluding edge e 4) Reverse all reductions – case d) does not occur, as e is

never matched

Complexity: O(nlog4n)

Page 6: Perfect Matching for Biconnected Cubic Graphs in O(nlog 2 n) Time Krzysztof Diks & Piotr Stańczyk

New algorithm – O(nlog2n) time Replace dynamic graph biconnectivity algorithm

with: Dynamic graph connectivity algorithm –

O(log2n) deterministic / O(lognloglog3n) randomized time Tarjan’s dynamic trees – O(logn) (addition, removal of

edges, change of tree’s root, LCA computation)

How to perform reduction phase with a new approach?

Page 7: Perfect Matching for Biconnected Cubic Graphs in O(nlog 2 n) Time Krzysztof Diks & Piotr Stańczyk

New algorithm – O(nlog2n) time Remove reduction edge along with all incident

vertices / edges. Two cases are possible: Resulting graph is not connected

If so, graph has a structure presented in figure (a) One reduction leads to not connected graph (can be verified

with dynamic connectivity algorithm) The other reduction leads to biconnected graph (Frink’s

theorem)

Page 8: Perfect Matching for Biconnected Cubic Graphs in O(nlog 2 n) Time Krzysztof Diks & Piotr Stańczyk

New algorithm – O(nlog2n) time Resulting graph is connected

Analyze changes in spanning tree maintained by dynamic connectivity data-structure, update Tarjan’s dynamic trees

Analyze edges of a spanning tree T spanned by vertices A, B, E and F. Select reduction which covers all spanned edges with cycles (use LCA operation from Tarjan’s trees)

Selected reduction maintains biconnectivity…

Page 9: Perfect Matching for Biconnected Cubic Graphs in O(nlog 2 n) Time Krzysztof Diks & Piotr Stańczyk

New algorithm – O(nlog2n) time Selected reduction maintains biconnectivity:

Added edges and edges spanned by A, B, C and D are covered by a cycle

Any other edge e → before reduction there was a cycle c covering e.

If c is a cycle in reduced graph → OK Otherwise, c contains some removed edges E. Let f be a cycle in

T+E containing all edges of E. Symmetric difference of f and c is a cycle in reduced graph

Each edge belongs to some cycle → graph is biconnected Overall complexity: O(nlog2n) deterministic,

O(nlognloglog3n) randomized

Page 10: Perfect Matching for Biconnected Cubic Graphs in O(nlog 2 n) Time Krzysztof Diks & Piotr Stańczyk

Possible improvement Replacement of dynamic connectivity algorithm with

decremental counterpart – how to handle edge insertion?

New vertex and edge representation:

Allowed Not allowed

Page 11: Perfect Matching for Biconnected Cubic Graphs in O(nlog 2 n) Time Krzysztof Diks & Piotr Stańczyk

Possible improvement It is not allowed to perform reductions against not

allowed edges – how to bypass it… Introduce support for reverse points in decremental

connectivity data-structure In case of performing reduction against not allowed edge,

it is required to execute reverse point first, three cases are possible…

Page 12: Perfect Matching for Biconnected Cubic Graphs in O(nlog 2 n) Time Krzysztof Diks & Piotr Stańczyk

Possible improvement Even cycle case:

Page 13: Perfect Matching for Biconnected Cubic Graphs in O(nlog 2 n) Time Krzysztof Diks & Piotr Stańczyk

Possible improvement Odd cycle case: not allowed – introduces bridge

Page 14: Perfect Matching for Biconnected Cubic Graphs in O(nlog 2 n) Time Krzysztof Diks & Piotr Stańczyk

Possible improvement No cycle case:

Page 15: Perfect Matching for Biconnected Cubic Graphs in O(nlog 2 n) Time Krzysztof Diks & Piotr Stańczyk

Thank you Any questions?