0% found this document useful (0 votes)
87 views15 pages

An Algorithm For Finding The Independence Number of A Graph

This document proposes two algorithms for finding the independence number of a graph. The first algorithm finds a split graph with the same independence number and order as the input graph by constructing a graph from the input graph's degree sequence. The second algorithm finds the independence number directly from the input graph's adjacency matrix by finding the minimum value of h such that the strictly upper triangular matrix extracted from the adjacency matrix is null for h+1. The document proves several propositions about properties of triangular and split graphs that are used by the algorithms.

Uploaded by

abhay chaudhary
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
87 views15 pages

An Algorithm For Finding The Independence Number of A Graph

This document proposes two algorithms for finding the independence number of a graph. The first algorithm finds a split graph with the same independence number and order as the input graph by constructing a graph from the input graph's degree sequence. The second algorithm finds the independence number directly from the input graph's adjacency matrix by finding the minimum value of h such that the strictly upper triangular matrix extracted from the adjacency matrix is null for h+1. The document proves several propositions about properties of triangular and split graphs that are used by the algorithms.

Uploaded by

abhay chaudhary
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

An algorithm for finding the Independence Number of a graph

O.Kettani
email :[email protected]

Abstract

In this paper, we prove that for every connected graph G, there exists a split graph G’ with the
same independence number and the same order . Then we propose a first algorithm for finding
this graph, given the degree sequence of the input graph G. Further, we propose a second
algorithm for finding the independence number of G, given the adjacency matrix of G.

Introduction

Let G=(V,E) be a connected graph on n=│V│ vertices and m=│E│ edges.


A subset X of V is called independent if its vertices are mutually non-adjacent. The
independence number α(G) is the largest cardinality among all independent sets of G.
A split graph is a graph in which the vertices set can be partitioned into a clique and an
independent set.
The problem of finding the independence number α of a graph G is know to be NP- hard[1].
In this paper, we prove that for every connected graph G, there exists a split graph G’ with the
same independence number and the same order . Then we propose an algorithm for finding this
graph, given the degree sequence of the input graph G. Further, we propose a second algorithm
for finding the independence number of G, given the adjacency matrix of G.
First we will prove the following proposition :

Proposition 1 :
For every connected graph G, there exists a split graph G’ with the same independence
number α and the same order n. The degree sequence of G’ contains (n- α) times the degree
(n-1) and α times the degree (n-α).

1
Proof :
Let G=(V,E) be a connected graph on n=│V│ vertices and independence number α.
Then ∃I ⊂V, I independent set, with α =│I│and ∃VC ⊂V (VC a vertex cover) such
V=I∪VC and I∩VC= ∅.
Considere the graph G’ constructed from G by the following rules:
1) For every vertex v in I, and for every vertex w in VC non-adjacent to v create an edge
between v and w.
2) If │VC│≥2 then for every non-adjacent vertices v and w in VC, create an edge
between v and w.

Then clearly the resulting graph G’ is such that V=V’ and I =I’ and VC=VC’
and I’∩VC’= ∅.
Since the subgraph induced by VC’ is a clique then G’ is a split graph and ,
│VC│=n- α and v∈VC ⇒ d(v)= α+(n- α)-1=n-1
│I│= α and v∈I ⇒ d(v)= n- α
Thus, the degree sequence of G’ contains (n- α) times the degree (n-1) and α times the
degree (n-α).
Let G α,n- α denote the split graph G’

Example : n=6 and G is the following graph :

the resulting graph G’ is G 3,3:

2
For n=3, G 2,1 is the the following graph :

And is G 1,2 is the triangle K3


For n=4, G 3,1 is the the following graph :

G 2,2

G 1,4

For n=5, G 4,1 is the the following graph :

3
G 3,2

G 2,3

G 1,4 is K5

For n=6, G 5,1 is

G 4,2 is

4
G 3,3 is

G 2,4 is

And G 1,5 is K6
and so on…

Definition 1 :
Given two degree sequence S = (d1 ≥d2≥... ≥dn ) and S’ = (d’1 ≥d’2≥... ≥d’n)
We denote S’≥S iff d’i ≥di for all i.
And if S’≥S, we define S’-S= (d’1 –d1,... ,d’n –dn )
Definition 2 :
A degree sequence S is said realizable (or graphic) iff it represents a simple graph.
Definition 3 :
Let G=(V,E) be a connected graph and G’=(V,E’) be an other connected graph such
E⊂E’.
Then we define the difference graph G’’, by G’’=(V,E’-E).
Then S(G’’)= S(G’)- S(G).

5
Before establishing the main result of the present paper, we will use the following
deterministic procedure HH (S) due to Havel [3] and Hakimi [4], which can be used to decide
whether a degree sequence is or is not realizable (i.e.,represents a simple graph or not). It is
based on the Erd¨os-Gallai theorem [2] which states that given a degree sequence
S = (d1 ≥d2≥... ≥dn), S is realizable if and only if the following equation holds :
k n
∑ di ≤ k(k − 1) + ∑ min(k, di)
i=1 i=k+1
The Havel-Hakimi procedure tests the degree sequence S as follows.
procedure HH(S)
Input S =( d1 ≥d2≥... ≥dn),
1 If there exists an integer d in S such that d > n−1 then halt and output false. That is, we
cannot have a vertex that is adjacent to more than n − 1 other vertices.
2 If there are an odd number of odd numbers in S halt and and output false. That is, there must
be an even number of vertices of odd degree.
3 If the sequence contains a negative number then halt and and output false.
4 If the sequence is all zeros then halt and output True
5 Reorder S such that it is nonincreasing.
6 Delete the first term d1 from S and subtract one from the next d1 terms to form a new
sequence.
Go to step 3 .

Proposition 2 :
Let G=(V,E) be a connected graph, then there exists a unique split graph
G α,n- α such that S(G α,n- α)≥ S(G) and the degree sequence S(G α,n- α)- S(G) is realizable.

Proof :
The existence of the split graph G α,n- α is proved by proposition 1.
Since E(G)⊂ E(G α,n- α) then S(G α,n- α)≥ S(G) and S(G α,n- α)-S(G) is realizable because it
represents the difference graph G’’=(V, E(G α,n- α)- E(G )).
Suppose on the contrary that there exists another split graph Gα’,n- α’ such that
S(Gα’,n- α’)≥ S(G) and the degree sequence S(Gα’,n- α’)- S(G) is realizable.

6
Then by lemma 1, α = α(G)=α(Gα’,n- α’)= α’ :a contradiction. Consequently, there exists a
unique split graph G α,n- α such that S(G α,n- α)≥ S(G) and the degree sequence
S(G α,n- α)- S(G) is realizable.

Now, we will prove the first main result of this paper :


Proposition 3 :
Given a connected graph G=(V,E) on n=│V│ vertices and m edges with degree sequence
S(G) = (d1 ≥d2≥... ≥dn ), then its independence number α could be computed by the following
algorithm :
Input : S(G) = (d1 ≥d2≥... ≥dn ).
1α←1
2 Repeat
if S((G α,n- α))≥S(G) and HH(S(G α,n- α)- S(G)) then output(α) halt
Else α←α+1 goto step 2
End.

Proof :
By using proposition 1 and 2, the algorithm finds the unique « closest » split graph G α,n- α
and then its independence number α which is also the independence number of G .

Example : n=6 and G is the following graph :

S(G) = (2,2,2,2,1,1 ).
S((G 1,5)) = (5,5,5,5,5,5)
S((G 1,5)) ≥ S(G) but HH(S(G α,n- α)- S(G))=HH((3,3,3,3,4,4) is false.
S((G 2,4)) = (5,5,5,5,4,4) but HH(S(G α,n- α)- S(G))=HH((3,3,3,3,3,3) is false.
S((G 3,3)) = (5,5,5,3,3,3) and HH(S(G α,n- α)- S(G))=HH((3,3,3,1,2,2) is true.
Then the algorithm outputs α =3

7
Let n be an integer ≥3 . Let θ be the nxn null matrix.
For k such 1≤k≤n-1, we define the triangular matrices Tk by :
(Tk+1)i,j=1 if 1≤i≤k and 2≤j≤k+1 and i<j
(Tk+1)i,j=0 otherwise.

8
Proposition 4 :
For k such1≤k≤n-1, (Tk+1)k+1=θ
And (Tk+1)h ≠ θ if h is such 1≤h≤k.

Proof :

For k such 1≤k≤n-1, let Ck+1 denote the matrice defined by:
(Ck+1)i,j=1 if j=k+1 and 1≤i≤k
(Ck+1)i,j=0 otherwise.

For k such 1≤k≤n-1, we define the set of nxn matrices M(k) by :

M∈ M(k) iff:
(M)i,j integer>0 for j=k+1 and 1≤i≤k
(M)i,j=0 otherwise..

Then :
For k such 2≤k≤n-1, we have:
Tk+1= Tk +Ck+1

(Tk+1)2=(Tk)2+ TkCk+1 +Ck+1Tk +(Ck+1)2

9
since (Ck+1)2=θ and Ck+1Tk=θ and TkCk+1∈ M(k-1)

then
(Tk+1)2=(Tk)2+ TkCk+1 and TkCk+1∈ M(k-1)

(Tk+1)3=(Tk)3+ Tk(TkCk+1) since TkCk+1∈ M(k-1)⇒ Tk(TkCk+1) ∈ M(k-2)


then :
(Tk+1)3=(Tk)3+ (Tk)2Ck+1 and (Tk)2Ck+1∈ M(k-2)
Suppose by induction on p<k-1 that:
(Tk+1)p=(Tk)p+ (Tk)p-1Ck+1 and (Tk)p-1Ck+1∈ M(k-p+1)
then
(Tk+1)p+1=(Tk)p+1+ Tk(Tk)p-1 Ck+1 and Tk(Tk)p-1Ck+1∈ M(k-p)
Since the induction is true for p=1
Then for p such k>p≥1 we have :
(Tk+1)p+1=(Tk)p+1+(Tk)pCk+1 and (Tk)pCk+1∈ M(k-p)

Then for p=k-1 we have :


(Tk+1)k=(Tk)k+(Tk)k-1Ck+1 and (Tk)k-1Ck+1∈ M(1)

since (Tk)k-1Ck+1∈ M(1)⇒ Tk(Tk)k-1Ck+1=θ


Then
(Tk+1)k+1=(Tk)k+1+(Tk)kCk+1
Then
(Tk+1)k+1=(Tk)k+1 (1)
(T2)2=θ

10
Suppose by induction on k that: (Tk)k=θ then by equation (1) we have:
(Tk+1)k+1=θ
On the other hand, for p such 1≤p≤k:
(Tk+1)p=(Tk)p+(Tk)p-1Ck+1 and (Tk)p-1Ck+1∈ M(k-p+1)
since 1≤p≤k ⇒ k-p+1≥1 ⇒(Tk)p-1Ck+1≠θ and (Tk+1)p≠θ for p such 1≤p≤k.
Then the induction is proved.

For k such 1≤k≤n-2, we define the matrices B’k+1 by :


(B’k+1)i,j=1 if 1≤ i≤k and k+2≤j≤n
(B’k+1)i,j=0 otherwise.

Let Sk+1 be the matrix :


Sk+1= Tk+1+ Bk+1

Proposition 5 :
For k such 1≤k≤n-1, we have (Sk+1)k+1=θ
And (Sk+1)h ≠ θ if h is such 1≤h≤k.
Proof :
(Sk+1)2= (Tk+1)2+ (Bk+1)2+ Bk+1Tk+1 +Tk+1Bk+1
since (Bk+1)2=θ and Bk+1Tk+1=θ and Tk+1Bk+1=θ then (Sk+1)2= (Tk+1)2

11
Suppose by induction on p that :
(Sk+1)p= (Tk+1)p
then (Sk+1)p+1=(Tk+1)p(Tk+1+ Bk+1)= (Tk+1)p+1 + (Tk+1)p Bk+1
Tk+1Bk+1=θ⇒(Tk+1)p Bk+1=θ
then
(Sk+1)p+1=(Tk+1)p+1
By proposition 4, it implies for k such 1≤k≤n-1, that :
(Sk+1)k+1=θ and
(Sk+1)h ≠ θ if h is such 1≤h≤k.

Similarly, for k such 1≤k≤n-2, we define the matrices B’k+1 by :


(B’k+1)i,j ∈{0,1} if 1≤ i≤k and k+2≤j≤n
(B’k+1)i,j=0 otherwise.

And we define the matrices S’k+1 by:


Definition 4 :
S’k+1= T’k+1+ B’k+1

Proposition 6:
For k such 1≤k≤n-1, we have (S’k+1)k+1=θ
and (S’k+1)h ≠ θ if h is such1≤h≤k.

Proof :
Analogue to proposition 5’proof.

Proposition 7:
Let G be a graph of order n , and UG denote the strictly upper triangular matrix extracted from
the adjacency matrix of G, then
α(G)= n-min{h such (UG)h+1=θ}
0≤h≤n

12
Proof :
By proposition 1, there exists a split graph S such V(G)=V(S) and E(G)⊂E(S) and
α(G)= α(S)=n-k.
Then UG is congruent to a matrix S’k+1 as defined in definition 4.
Then there exists a permutation matrix P and PT its transpose matrix such :
UG = PTS’k+1P
then
(UG)k+1= PT(S’k+1)k+1P
Then :
(UG)k+1= PTθP
And
(UG)h= PT(S’k+1)h P≠θ for h such 1≤h≤k by proposition 6.
Then k= min{h such (UG)h+1=θ}
0≤h≤n
And
α(G)= α(S)=n-k=n- min{h such (UG)h+1=θ}
0≤h≤n

Proposition 8 :
Given a graph G=(V,E) on n=│V│ vertices and let UG denote the strictly upper triangular
matrix extracted from the adjacency matrix of G and I the nxn identity matrix, then the
independence number α(G) could be computed by the following algorithm :
Input : UG
1 k←0 and T←I
2 T←TUG
3 if T=θ then output(n-k) else k←k+1 goto step 2.

Example 1 :

n=5 and G is the complete graph K5

13
(UG)5=θ then α(G)=5-4=1.

Example 2 :

n=5 and G is the following graph :

Then

(UG)3=θ then then α(G)=5-2=3.

Example 3 :
n=5 and G is the graph 5 K1 (five isolated vertices)
UG=θ Then then α(G)=5-0=5.

14
References :

[1]. M. R. Garey, D. S. Johnson, "Computers and intractability. A guide to the theory of NP-
completness".1979
[2] P. Erdos and T. Gallai. Graphs with Prescribed Degrees of Vertices. Mat. Lapok, 11:264–
274, 1960.
[3] S. L. Hakimi. On the realizability of a set of integers as degrees of the vertices of a linear
graph.
SIAM Journal, 10(3):496–506, 1962.
[4] V. Havel. A remark on the existence of finite graphs. Caposis Pest. Mat., 80:496–50

15

You might also like