Sie sind auf Seite 1von 9

Maximum Uniquely Restricted

Matching in Permutation Graphs


Abhas Anand, Swapnil Gupta, Sudhanshu Khoriya, Har Simrat Singh
June 5, 2015

Abstract
A matching in a graph is a set of edges no two of which share a
common vertex. In this paper we are discussing about a specialised
type of matching, uniquely restricted matching.
A Uniquely Restricted Matching (URM) is defined to be a matching
M whose saturated vertices induce a subgraph which has only one
perfect matching namely M itself. In this paper we are focussing on
finding a maximum URM in permutation graphs.

1 Introduction
A permutation graph is a graph whose vertices represent the elements
of a permutation and whose edges represent pairs of elements that are re-
versed by permutation.
Suppose π is a permutation of numbers 1, 2, . . . , n then the graph G[π] =
(V, E) is defined as follows

V = {1, 2, . . . , n}

and
ij ∈ E ⇐⇒ (i − j)(πi −1 − πj −1 ) < 0
An undirected graph G is called a permutation graph if there exists a per-
mutation π such that G ∼
= G[π].

1
Figure 1: Permutation Graph G[4, 3, 5, 1, 2]

1.1 Preliminary Definitions :


Degree of an edge : If ei = (vi , vj ) is an edge then degree of edge ei is

deg(ei ) = deg(vi ) + deg(vj )

where deg(vi ) is the degree of the vertex vi .

Cut Edge : An edge in a graph after whose removal there does not exist
any path from its one endpoint to another (i.e. The endpoints lie in
two disjoint cut sets).

Induced Subgraph : (Also called Vertex Induced sub graph). vertex in-
duced subgraph is a subset of vertices of a graph G together with any
edges whose end points are both in this subset.

Alternating Cycle : Suppose we have a matching M in a graph G, an


alternating cycle refers to a cycle (of even length) which has its edge
alternating between M and (G − M )

2
2 Theorems :
Theorem 2.1. [GHL01] Let G = (V, E) be a graph and M a matching on
G. M is uniquely restricted if f G does not contain an alternating cycle with
respect to M .

Theorem 2.2. [GH83] If G has an edge colouring such that each vertex is
incident with atleast one edge of each colour then G has an alternating cycle.

In this paper we make use of the following corollary of the above theorem.

Corollary 2.2.1. [GH83] If a matching M is a perfect matching in a graph


G and no edge of M is a cut edge then G has an alternating cycle containing
one edge of M and one of (G − M ).

3 Algorithms :
The graph is input in form of an adjacency matrix Im . The vertex set is V
and edge set is E where ex = (vi , vj ) ∈ E if vi < vj where vi , vj ∈ V . The
permutation representation of the graph G gives a unique numbering to each
vertex of the graph which is the basis for the ordering of vertices as well as
the edges.

1: procedure Init
2: Calculate deg(vi )∀vi ∈ V .
3: ∀ex = (vi , vj ) ∈ E, deg(ex ) = deg(vi ) + deg(vj ).
4: ∀x D[x] = deg(ex )
5: SORT D in non decreasing order.
If deg(ea = (va1 , va2 )) = deg(eb = (vb1 , vb2 )) then if va1 < vb1 we say
deg(ea ) < deg(eb ) else if va1 = vb1 then if va2 < vb2 we say deg(ea ) < deg(eb ).
The following procedure will be used to make an induced subgraph S =
(Vs , Es ) based on the matching M .

3
1: procedure InducedSubgraph(M )
2: for all i such that vi ∈ V do
3: if vi ∈ M then
4: Vs = Vs ∪ vi
5: for all x such that ex = (vi , vj ) ∈ E do
6: if vi ∈ M & vj ∈ M then
7: Es = Es ∪ ex
return S
The following procedure checks if a given edge e in a graph S = (Vs , Es ) is a
cut edge or not.

1: procedure CutEdge(S,e)
2: e = (vi , vj ) and S = (Vs , Es )
3: Es = Es − e
4: BFS(vi )
5: if vj is visited then
return f alse
6: else
return true

4
Now we present the algorithm to find the maximum uniquely restricted
matching in a given permutation graph.

Algorithm 1 MaxURM
1: Input G = (V, E) in adjacency matrix
2: Init
3: M = φ
4: while D 6= φ do
5: em =MIN (D), where em = (vi , vj ) such that both vi , vj are unmarked.
6: M = M ∪ em
7: S =InducedSubgraph(M)
8: if ∀v ∈ Vs , deg(v) = 1 then . All vertices in Vs are matched
9: Vs = Vs − v
10: for all e ∈ M do
11: if CutEdge(S,e) then
12: em is included
13: Mark vi , vj . End points of matched edge
14: else
15: M = M − em
return M

4 Time Complexity :
For the procedure INIT : Time taken for degree calculation for vertices and
edges = O(|V | + |E|) and O(|E| log(|E|)) for sorting. This effectively turns
out to be O(|E| log(|E|)).

For the procedure INDUCED SUBGRAPH : Time taken for making the in-
duced subgraph is O(|V | + |E|).

For the procedure CUT EDGE : Time taken if O(|V | + |E|) for the BF S.

For the algorithm MaxURM


• Step 2: Takes O(|E| log(|E|))
• Step 4: Loop runs O(|E|) times

5
• Step 5,6: O(1) operations

• Step 7: Takes O(|V | + |E|)

• Step 10: Loop runs O(|M |) times and

• Step 11: Takes O(|V | + |E|)

Therefore total

= O(|E| log(|E|) + |E|.((|V | + |E|) + |M |.(|V | + |E|)))


= O(|E| log(|E|) + |E|2 |M | + |E|.|V |.|M |)

5 Proof of Correctness:
Permutation Graph is a result of a unique permutation on the numbers [n].
The vertices in the graph are indexed on the basis of their respective permu-
tation.
vi = j
j = π −1 and π → Permutation Function
M is the set outputted by Algorithm 1

M = {e1 , e2 , . . . , em }

|M | = m

Lemma 5.1. M is a uniquely restricted matching.

Proof. According to theorem 2.1, our algorithm detects the presence of an


alternating cycle at each iteration of algorithm. 1 The algorithm tests the
corollary 2.2.1 in every cycle to find a cut edge in the induced graph formed,
hence M is a Uniquely Restricted Matching.

Theorem 5.1. M is a maximum uniquely restricted matching.

Proof. By Lemma 5.1 M is a URM, so now we use the technique of mathe-


matical induction to prove M is maximum URM.
Let M = {e1 , e2 , . . . , em } and |M | = m. Let there exists another URM, M 0
such that |M 0 | > |M |.

6
Wlog. assume M 0 is of size m + 1 sequentially change edges in M and
add another edge em+1 to form M 0 . Let p denote the edges in M replaced
from the end by unmatched edges.
For p = 0: No edges of M will be changed and the edge em+1 , em+1 ∈ E
is inserted. M 0 contains edges {e1 , e2 , . . . em , em+1 }.

Similarly, for p = 1: One edge from the end is changed i.e. M 0 contains
edges {e1 , e2 , . . . e0m , em+1 } (edge em is replaced with e0m where e0m , em+1 ∈ E
).

We need to prove for p = 0 to p = n our claim that M is maximum and


hence M 0 can’t exist.
Base case:
p=0
For Edge em+1 ; if em+1 is to be added in the Matching M to form M 0 , the
following two conditions must hold:
Condition 1 : The vertices of em+1 are not covered by any of the edges
{e1 , e2 , . . . em }.
Proof. If any of the vertices of em+1 have been covered by the previous Match-
ing, then M 0 is not a Matching. So this implies that em+1 cannot be added
to the matching.
M = M 0 = {e1 , e2 , . . . em }
If both vertices are unmatched, then go to condition given below.
Condition 2 : The Induced subgraph after adding em+1 to the current
matching does not form an Alternating Cycle.
Proof. For induced subgraph, an alternating cycle should not be formed for
M 0 to be a URM. Since, M is given by our Algorithm, the Induced Subgraph
formed by (e1 , e2 , . . . em ) does not have any alternating cycle. Adding em+1
to M to form M 0 following two cases are possible:
Case 1:If the induced subgraph of M 0 contains an Alternating Cycle,
then it is not a URM.
Case 2:However, if it does not contain an Alternating Cycle, then it
contains at least one cut edge from the Matching M 0 .
The vertices of em+1 are not covered and the induced subgraph has at
least one cut edge. These are the conditions which are checked by Algorithm

7
1 to add an edge in the M, if both conditions are satisfied, by our Algorithm
the edge em+1 will be added to M and hence M = M 0 and size of M will be
m + 1. But M does not contain em+1 , so our assumption is wrong and M 0 is
not a maximum URM.
Hence, M is max URM for p = 0.
For p = 1
Now, M 0 = {e1 , e2 , . . . , e0m , em+1 }
e0m is not in M this leads to following cases:

1. If deg(e0m ) is minimum at some iteration, the vertices of e0m have already


been covered.

2. or if vertices are not covered then e0m forms an alternating cycle with
the rest of the matching set.

3. or deg(em ) ≤ deg(e0m ) i.e. the degree of e0m is not minimum for some
iteration.

In both case 1 and case 2 the resultant matching M 0 is not a URM.


For case 3: Provided that e0m doesn’t form an alternating cycle (i.e. a cut
edge exists), em can be replaced with e0m .
For em+1 , if em+1 = em then we can refer to the case where p = 0 and say
that M 0 is not a URM because the resultant set will be the same as in p = 0.
Otherwise, em+1 has a greater degree than every edge in M and its both
vertices are not covered. Having a greater degree implies that em+1 will not
be a cut edge. Thus, induced subgraph formed in M 0 must have a cut edge
among the rest of the edges in M 0 . Inserting e0m implies to have a cut edge.
After addition of one more edge, we will definitely not induce a cut edge be-
cause if that was the case, the degree of em+1 would have been lower and this
edge would have been selected by our algorithm in the earlier steps itself.
Also, the degree of e0m is higher and thus some more edges will be intro-
duced in subgraph of M 0 , finding a path between two vertices will become
relatively easier. Thus, M 0 so formed is not a URM. Hence, proved for p = 1.

The base cases p = 0, 1 are proved.


Inductive Hypothesis: For p = k, k < |M | our statement is true, i.e.
we can’t form a matching of size greater than |M | by replacing k edges from

8
the end and introducing a new edge em+1 . M 0 = {e1 , e2 , . . . , em−k , e0m−k+1 , . . . , e0m , em+1 }
is not a URM.
Inductive step:
For p = k + 1:
Now, the matching M 0 = {e1 , e2 , . . . , em−k−1 , e0m−k , e0m−k+1 , . . . , e0m , em+1 }.
We replace em−k with e0m−k . By induction step we see that for p = k, M 0
doesn’t form a URM, therefore no cut edges exist in the set. We know that
deg(e0m−k ) ≥ deg(em−k ). So all the edges e0m−k+1 . . . e0m have a greater degree
than e0m−k . If em−k is not a cut edge as well as doesn’t induce a cut edge
then e0m−k (similar to base case p = 1) will not induce any cut edges.
Therefore, by induction M 0 is not a URM.
We can extend this to p = m. Here, we are unable to grow it by one, there-
fore it’s not possible to grow further. Therefore, M is maximum uniquely
restricted matching for permutation graph G.

References
[GH83] Jerrold W Grossman and Roland Hggkvist. Alternating cycles in
edge-partitioned graphs. Journal of Combinatorial Theory, Series
B, 34(1):77 – 81, 1983.

[GHL01] Martin Charles Golumbic, Tirza Hirst, and Moshe Lewenstein.


Uniquely restricted matchings. Algorithmica, 31(2):139–154, 2001.

Das könnte Ihnen auch gefallen