A collection of general graph matching problems

Revision en2, by MiFaFaOvO, 2018-12-03 20:45:43

It looks there are few problems about general graph matching in the community. And there are a few teams who solved problem B in NEERC both online and onsite. However, the reduction from maximum cost perfection matching to this problem is simple to me. So I want to share some problems for practice.

You can find the template here and here.

The shortest code of the maximum cost matching problem is about 5.7k.

There is a simple way to find the cardinality of the maximum matching, which is half of the rank of the Tutte matrix. We can use Gaussian elimination to compute the rank of a matrix. By the way, if the maximum cost is no more than W, we can also find the maximum cost matching by Tutte matrix and polynomial interpolation in O(Wn3). It is easier to implement.

Here is a collection of general graph matching problems. I'm too lazy to write solutions to these problems. And I can't remember the solution to some problems clearly. You can discuss the problems here.

1. Chinese postman problem. Find a shortest closed path or circuit that visits every edge of a (connected) undirected graph.

2. Given an undirected weighted graph G, find a minimum weight subset E such that each vertex is incident on at least one edges in E.

3. Min cost cycle cover. A cycle cover of an undirected graph is a collection of vertex-disjoint cycles such that each vertex belongs to exactly one cycle. We require each cycle contains at least three vertices. In a weighted graph, the weight of a cycle cover is the sum of the weights of all its edges. Find the minimum total weight cycle cover.

4. Given an undirected weighted graph G, find the shortest simple path from s to t with even edges.

5. A problem from winter camp 2016 There are n balls and m baskets. There are e relationships such that ball u can be put into basket v. We can put at most 3 balls in each basket. And we want to put every ball into baskets. We want to maximize the number of baskets with at most 1 ball.

6. A problem from Chinese Team Test 2013 Find the maximum cut of a planar graph.

7. Two matching. Given an undirected weighted graph G, find a minimum weight subset E such that the degree of each vertex in the subset E is no more than 2.

8. Undirected Vertex Geography. Alice and Bob are playing a game on an undirected graph. They move the token to the unvisited neighbor alternatively. The player who can't move loses. Determine the winner of each starting point. Algebra makes your life much easier in this problem.

9. Given a DAG. You can remove at most 2 vertices with zero in degree in each round. How many rounds do you need to remove all the vertices?

#### History

Revisions Rev. Lang. By When Δ Comment
en6 MiFaFaOvO 2018-12-04 19:00:42 9 Tiny change: 'ndirected weighted ' -> 'ndirected positive weighted '
en5 MiFaFaOvO 2018-12-04 14:33:53 112
en4 MiFaFaOvO 2018-12-04 09:45:32 6 Tiny change: 'SPOIL ALERT : I' -> 'SPOILER ALERT : I'
en3 MiFaFaOvO 2018-12-04 09:24:32 206
en2 MiFaFaOvO 2018-12-03 20:45:43 2396 (published)
en1 MiFaFaOvO 2018-12-03 19:09:46 620 Initial revision (saved to drafts)