Edmond Blossoms Algorithm
Edmond Blossoms Algorithm
maxenal
FIGURE-2
<1, 2>,<3,4>, <6,7),<5,8> is amaximum
matching
PERFECT MATCHING
AUGMENTING PATH
An alternating path is said to be an augmenting path if the first vertex and the
last vertex in it are
unmatched.
CHARACTERIZATIONOF MAXIMAL MATCHING
THEOREM
ITGis a graph and Misa matching in G. Then Mis maximum matching iff (G,M) has no
augmenting path.
FIGURE-3
Let c= Vo, V1, V2 ..V2k be an odd cycle where < Vo, V e E-M and <
V1, V2 > e M.. <vak-1, V2K> ¬ M, < Vo, V2k > ¬ E- M.. Then c is called an odd
alternating cycle.
TRANSFORMA T/O N
Let G=(V, E) be a graph and M be a matching in G. Let Ube the set of
unmatched vertices.Then H=G/U is a graph obtained from Gafter applying the
following transformation:
Combine the vertices in Uinto a single vertex and modify the edges accordingly.
RESULT:Every augmented path in G(GM) is transformed into an odd alternating
cycle in (G/U, M)
between vertices and edges in (G,M) and (G/U,M)
function say oto map
Here, we use a
such that
(G M) H=(6/UM)
Here,U={1, 5)
FIGURE-4
1. Uo={s}: level[s]=0
2. for each ve V-{s) do
a. level[v]=o
3. i=1
1,2
5. while (U ) do
a. U, = 0
b. fòr each ve U1 do
i. for each w e Adi[v] do
1. if (i is odd) then
a. if <v,w> eE-M and level[w]=oo then
i. U,= U, +{w}
ii. level[w]=i
ii. Er= ErU (<v,w).
2. else
a. if <v,w> e Mand level[w]=oo then
i. U,= U, +{w)
i. level[w]=i
ii. Er= ErU{v,w»}
6. U = V- Er
Type-C: Non-matching edges from a vertex at even level to the immediate next
level but- mot e
CLAIM
In Hevery alternating odd cycle must pass through at least one type -B edge.
PROOF
Let Xbe an alternating odd cycle in H which contains no B-type edge
X: pieip2e2. where p is a piece comprising of tree edges and type-C edges and e is
atype-A edge
But a tYpe-Aedge can either lead to a vertex in set Uo or to some vertex at lower level
but never back to s
OBSERVATIONS:
An augmenting path Pin G=> Ø(P) an alternating odd cycle in H
O.
U1
-O
V2 V2 V3
V
Let Mbe a matching in a graph Gwith cycles.
Let u be an unsaturated vertex. Then there may be two paths from uto a vertexx in G
as shownin the example below
X
b C
FLOWER
It is aunion of two
alternating paths from uthat reacha vertex on steps of
parity. opposite
b C
FLOWER
STEM
The stem of the f lower is the
maximal common initial path of
non-negative even length
V
STEM
BLOSSOM
The blossom of the flower is the
odd cycle obtained by
deleting the stem.
X
INITIALIZATION
S={u), T=Ø
ITERATION
a. If Shas no unmarked vertex then stop
else select an unmarked vertex ve S
b. for each vertex yinAdjacent (v) do
i. If y is unsaturated by Mthen trace back from y[expand blossom
as needed to report an m-augmenting u,y path]
ii. if ybelongs to s,then a blossom has been found
1. suspend exploration of v,
2. Contract the blossom replacing it's vertices in S and T by a
single new vertex in S
3. continue the search from this new vertex in the smaller
graph(recursion)
iii. else
1. y is matched with some w by M,so include yin T and win S
c. After exploring all neighbours of Vmark v and iterate
EXAMPLE
Now, S-(U)
Now, hcannot be explored further and exploration from U leads toan
unsaturated vertex x.
Generate the u,x path expanding each blossom encountered in the
process.Thus the augmented patth is given by the following graph.
f
C
b d
X
b d
X