Matchings in graphs: Difference between revisions
Line 19: | Line 19: | ||
'''Definitions:''' | '''Definitions:''' | ||
# A '''blossom''' is a cycle <math> | # A '''blossom''' is a cycle <math>B</math> of odd length in <math>G</math> such that <math>\lfloor|B|/2\rfloor</math> edges on <math>B</math> are matched and the remaining node on <math>B</math> is matched as well (by an edge not on <math>B</math>, in fact). | ||
# '''Shrinking''' a blossom <math> | # The unique matched edge with exactly one incident node on <mathB</math> is called the '''stem''' of the blossom. | ||
## Insert a new node <math> | # '''Shrinking''' a blossom <math>B</math> means: | ||
## For each edge <math>\{v,w\}</math> such that <math>v</math> is on <math> | ## Insert a new node <math>u_B</math> in <math>V</math>. | ||
## Remove all nodes and edges on <math> | ## For each edge <math>\{v,w\}</math> such that <math>v</math> is on <math>B</math> and <math>w</math> is not: Replace <math>\{v,w\}</math> by a new edge <math>\{v_B,w\}</math>. | ||
# An augmenting path <math>p</math> '''conforms''' to <math> | ## Remove all nodes and edges on <math>B</math>. | ||
# An augmenting path <math>p</math> '''conforms''' to <math>B</math> if <math>p</math> contains the stem. | |||
'''Statement:''' | '''Statement:''' | ||
Let <math>G=(V,E)</math> be an undirected graph, <math>M</math> a matching in <math>G</math>, and <math> | Let <math>G=(V,E)</math> be an undirected graph, <math>M</math> a matching in <math>G</math>, and <math>B</math> a blossom. Further, let <math>G'=(V',E')</math> be the undirected graph resulting from shrinking <math>B</math>, and let <math>M'</math> be the restriction of <math>M</math> to <math>G'</math>. There is a conforming augmenting path in <math>G</math> with respect to <math>M</math> if, and only if, there is an augmenting path in <math>G'</math> with respect to <math>M'</math> that contains <math>u_B</math>. | ||
'''Proof:''' | '''Proof:''' | ||
First suppose there is a conforming augmenting path <math>p</math> in <math>G</math> with respect to <math>M</math>. According to either possible orientation of <math>p</math>, let <math>s</math> and <math>t</math> denote the first and the last node of <math>p</math>. Moreover, let <math>v</math> and <math>w</math> denote the first and the last node of <math>p</math> that also belongs to <math> | First suppose there is a conforming augmenting path <math>p</math> in <math>G</math> with respect to <math>M</math>. According to either possible orientation of <math>p</math>, let <math>s</math> and <math>t</math> denote the first and the last node of <math>p</math>. Moreover, let <math>v</math> and <math>w</math> denote the first and the last node of <math>p</math> that also belongs to <math>B</math> (possibly <math>v=w</math>). The concatenation of the subpaths of <math>p</math> from <math>s</math> to <math>v</math> and from <math>w</math> to <math>t</math> is an augmenting path in <math>G'</math>, and this path contains <math>u_B</math>. | ||
So, consider the case that there is an augmenting path <math>p</math> in <math>G'</math> with respect to <math>M'</math>, and that <math>p</math> contains <math> | So, consider the case that there is an augmenting path <math>p</math> in <math>G'</math> with respect to <math>M'</math>, and that <math>p</math> contains <math>u_B</math>. Then <math>p</math> contains the stem of <math>B</math> because this is the only matched edge incident to <math>u_B</math>. Let <math>v</math> be the node of <math>B</math> incident to the stem and let <math>w</math> be the node on <math>p</math> that is farthest away from <math>v</math> on <math>p</math> among all nodes of <math>p</math> that also belong to <math>B</math>. Exactly one of the two subpaths of <math>B</math> from <math>v</math> to <math>w</math> yields a conforming augmenting path by concatenation with the two subpaths of <math>p</math> from the end nodes of <math>p</math> up to <math>v</math> and <math>w</math>, respectively. |
Revision as of 06:47, 22 November 2014
Matchings
- Let [math]\displaystyle{ G=(V,E) }[/math] be an undirected graph. A matching in [math]\displaystyle{ G }[/math] is a set [math]\displaystyle{ M\subseteq E }[/math] of edges such that no two edges in [math]\displaystyle{ M }[/math] are incident.
- A node [math]\displaystyle{ v\in V }[/math] is matched with respect to a matching [math]\displaystyle{ M }[/math] if it is incident to a member of [math]\displaystyle{ M }[/math]; otherwise, [math]\displaystyle{ v }[/math] is called free or exposed.
- A matching is called perfect if there is no exposed node.
Remark: A perfect matching [math]\displaystyle{ M }[/math] is only possible if [math]\displaystyle{ |V| }[/math] is even. Then [math]\displaystyle{ M }[/math] is perfect if, and only if, [math]\displaystyle{ |M|=|V|/2 }[/math].
Alternating and augmenting paths
- A path [math]\displaystyle{ p }[/math] in an undirected graph [math]\displaystyle{ G=(V,E) }[/math] is called alternating with respect to some matching [math]\displaystyle{ M }[/math] if, for any two subsequent edges on [math]\displaystyle{ p }[/math], exactly one of them belongs to [math]\displaystyle{ M }[/math]. In other words, the edges in [math]\displaystyle{ M }[/math] and the edges not in [math]\displaystyle{ M }[/math] appear strictly alternatingly on [math]\displaystyle{ p }[/math].
- A path [math]\displaystyle{ p }[/math] in an undirected graph [math]\displaystyle{ G=(V,E) }[/math] is called augmenting with respect to some matching [math]\displaystyle{ M }[/math] if [math]\displaystyle{ p }[/math] is alternating and both of its end nodes are exposed.
- Augmenting a matching [math]\displaystyle{ M }[/math] along an augmenting path [math]\displaystyle{ p }[/math] means increasing the size of [math]\displaystyle{ M }[/math] by one as follows:
- Each edge of [math]\displaystyle{ p }[/math] that was in [math]\displaystyle{ M }[/math] immediately before this augmentation step, is removed from [math]\displaystyle{ M }[/math].
- Each edge of [math]\displaystyle{ p }[/math] that was not in [math]\displaystyle{ M }[/math] immediately before this augmentation step, is inserted in [math]\displaystyle{ M }[/math].
Blossoms
Definitions:
- A blossom is a cycle [math]\displaystyle{ B }[/math] of odd length in [math]\displaystyle{ G }[/math] such that [math]\displaystyle{ \lfloor|B|/2\rfloor }[/math] edges on [math]\displaystyle{ B }[/math] are matched and the remaining node on [math]\displaystyle{ B }[/math] is matched as well (by an edge not on [math]\displaystyle{ B }[/math], in fact).
- The unique matched edge with exactly one incident node on <mathB</math> is called the stem of the blossom.
- Shrinking a blossom [math]\displaystyle{ B }[/math] means:
- Insert a new node [math]\displaystyle{ u_B }[/math] in [math]\displaystyle{ V }[/math].
- For each edge [math]\displaystyle{ \{v,w\} }[/math] such that [math]\displaystyle{ v }[/math] is on [math]\displaystyle{ B }[/math] and [math]\displaystyle{ w }[/math] is not: Replace [math]\displaystyle{ \{v,w\} }[/math] by a new edge [math]\displaystyle{ \{v_B,w\} }[/math].
- Remove all nodes and edges on [math]\displaystyle{ B }[/math].
- An augmenting path [math]\displaystyle{ p }[/math] conforms to [math]\displaystyle{ B }[/math] if [math]\displaystyle{ p }[/math] contains the stem.
Statement: Let [math]\displaystyle{ G=(V,E) }[/math] be an undirected graph, [math]\displaystyle{ M }[/math] a matching in [math]\displaystyle{ G }[/math], and [math]\displaystyle{ B }[/math] a blossom. Further, let [math]\displaystyle{ G'=(V',E') }[/math] be the undirected graph resulting from shrinking [math]\displaystyle{ B }[/math], and let [math]\displaystyle{ M' }[/math] be the restriction of [math]\displaystyle{ M }[/math] to [math]\displaystyle{ G' }[/math]. There is a conforming augmenting path in [math]\displaystyle{ G }[/math] with respect to [math]\displaystyle{ M }[/math] if, and only if, there is an augmenting path in [math]\displaystyle{ G' }[/math] with respect to [math]\displaystyle{ M' }[/math] that contains [math]\displaystyle{ u_B }[/math].
Proof: First suppose there is a conforming augmenting path [math]\displaystyle{ p }[/math] in [math]\displaystyle{ G }[/math] with respect to [math]\displaystyle{ M }[/math]. According to either possible orientation of [math]\displaystyle{ p }[/math], let [math]\displaystyle{ s }[/math] and [math]\displaystyle{ t }[/math] denote the first and the last node of [math]\displaystyle{ p }[/math]. Moreover, let [math]\displaystyle{ v }[/math] and [math]\displaystyle{ w }[/math] denote the first and the last node of [math]\displaystyle{ p }[/math] that also belongs to [math]\displaystyle{ B }[/math] (possibly [math]\displaystyle{ v=w }[/math]). The concatenation of the subpaths of [math]\displaystyle{ p }[/math] from [math]\displaystyle{ s }[/math] to [math]\displaystyle{ v }[/math] and from [math]\displaystyle{ w }[/math] to [math]\displaystyle{ t }[/math] is an augmenting path in [math]\displaystyle{ G' }[/math], and this path contains [math]\displaystyle{ u_B }[/math].
So, consider the case that there is an augmenting path [math]\displaystyle{ p }[/math] in [math]\displaystyle{ G' }[/math] with respect to [math]\displaystyle{ M' }[/math], and that [math]\displaystyle{ p }[/math] contains [math]\displaystyle{ u_B }[/math]. Then [math]\displaystyle{ p }[/math] contains the stem of [math]\displaystyle{ B }[/math] because this is the only matched edge incident to [math]\displaystyle{ u_B }[/math]. Let [math]\displaystyle{ v }[/math] be the node of [math]\displaystyle{ B }[/math] incident to the stem and let [math]\displaystyle{ w }[/math] be the node on [math]\displaystyle{ p }[/math] that is farthest away from [math]\displaystyle{ v }[/math] on [math]\displaystyle{ p }[/math] among all nodes of [math]\displaystyle{ p }[/math] that also belong to [math]\displaystyle{ B }[/math]. Exactly one of the two subpaths of [math]\displaystyle{ B }[/math] from [math]\displaystyle{ v }[/math] to [math]\displaystyle{ w }[/math] yields a conforming augmenting path by concatenation with the two subpaths of [math]\displaystyle{ p }[/math] from the end nodes of [math]\displaystyle{ p }[/math] up to [math]\displaystyle{ v }[/math] and [math]\displaystyle{ w }[/math], respectively.