by Maarten Behn
Group 5
Exercise 2.1
Compute a maximum matching of the graph given below.
Choose the shortest paths in DM such that you apply at least 3 times the ’shrink’ operation of the algorithm.
Exercise 2.2
Consider the following simple algorithm to compute a matching in a given graph .
We fix some .
- Let be the current matching.
- If there is a set of edges and a set of edges such that is a matching, update to . Repeat.
Show the following:
a) The running time of the algorithm is .
Given:
Let
Let be a matching in
Let
The Algorithm written in steps:
Go over all possible
There are different .
Go over all possible
There are different .
Check if is a matching
This takes operations
because we need to check if every new edge has no neigbor in the matching.
because ,
because
because
b) Let M be the matching output by the algorithm and let be a maximum matching in G.
Show that
Lets take
Each connected component is either:
- a cycle: the number of edges from and are equal.
- a path: the number differs by 1 if it starts and ends with an edge from , it has one more edge from than from .
Since no local improvement of exchanging edges from with edges from is possible,
the number of edges cannot exceed the number of edges by more than a factor of .
Exercise 2.3
Consider the game Slither by W. Anderson.
Given an undirected, simple connected graph , two players choose in turns an edge e with the following rule:
was not yet chosen and the set of up to now chosen edges (including ) represents a simple path.
The player who cannot choose an edge according to the rules loses.
Show: If contains a perfect matching, then there is winning-strategy for the first player.
Given
Let
Let be a perfect matching in
Observation
If and both end edges are in
→ no futher edge can be chosen.
Proof
An futher edge can only be choosen if it leads to a vertex not in .
If the vertex would be in , would not be a simple path.
covers all vertecies in , because is perfekt,
therefore there is no edge that leads to a vertex not in .
Winning strategy
The first player always chooses an edge in M.
Therefore the second player must allways choose an edge not in .
The second player will loose after the first player chooses the last edge in
because and both end edges are in .
Assumption
- The first player allways choose an edge in .
- Both end edges are in when the second player chooses.
- P is an alternating path.
Proof
by induction over
Start
The first player chooses an edge in . (1. Assumption)
→ 2. Assumption: both end edges are in
→ 3. Assumption: the path contains only one edge in
Step n’ = n + 1
- If (the second player chooses)
The second player must choose an edge (2. Assumption)
therefore ( is perfekt) and ( is simple).
→ 3. Assumption: The second player extended the end edges whitch are in with an edge that is not in .
- If (the first player chooses)
because would need to contain two cosequtive edges that are not in . (3. Assumption)
→ 1. Assumption the first player can choose
→ 2. and 3. Assumption: The player first will extend the end edge that is not .
At every step in the induction all three assumptions are true.
I have also marked this with the arrows →