An algorithm for finding the Independence Number of a graph
In this paper, we prove that for every connected graph G, there exists a split graph H 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. Fur…
Authors: Omar Kettani
1 An algorithm for f inding the Independe nce Number of a graph O.Kettani email :o_ket1 @yahoo.fr Abstract In this paper, we prove that for every connected graph G, there exi sts a split graph G’ with the same independence number and the same order . Then we propose a first a lgorithm 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 adja cency matrix of G. Introduction Let G=(V,E) be a connected graph on n= │ V │ vertices and m= │ E │ ed ges. A subset X of V is called independent if its vertices are mutually non-adjacent. The independence number α (G) is the largest cardinalit y 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 t o be NP- hard[1]. In this paper, we prove that for every connected graph G, there exi sts 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 adjacenc y 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- α ) t imes the degree (n-1) and α times the degree (n- α ). 2 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 : 3 For n=3, G 2,1 is the the following graph : And is G 1,2 is the triangle K 3 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 : 4 G 3,2 G 2,3 G 1,4 is K 5 For n=6, G 5,1 is G 4,2 is 5 G 3,3 is G 2,4 is And G 1,5 is K 6 and so on… Definition 1 : Given two degree sequence S = (d 1 ≥ d 2 ≥ ... ≥ d n ) and S’ = (d’ 1 ≥ d’ 2 ≥ ... ≥ d’ n ) We denote S’ ≥ S iff d’ i ≥ d i for all i. And if S’ ≥ S, we define S’-S= (d’ 1 –d 1 ,... ,d’ n –d n ) 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). 6 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 se quence S = (d 1 ≥ d 2 ≥ ... ≥ d n ), S is realizable if and only if the following equation holds : k n ∑ d i ≤ k(k − 1) + ∑ min(k, d i ) i=1 i=k+1 The Havel-Hakimi procedure tests the degree sequence S as follows. procedure HH(S) Input S =( d 1 ≥ d 2 ≥ ... ≥ d n ), 1 If there exists an integer d in S such that d > n−1 then halt and output fals e. 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 d 1 from S and subtract one from the next d 1 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. 7 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 │ vert ices and m edges with degree sequence S(G) = (d 1 ≥ d 2 ≥ ... ≥ d n ), then its independence number α could be computed by the following algorithm : Input : S(G) = (d 1 ≥ d 2 ≥ ... ≥ d n ). 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 8 Let n be an integer ≥ 3 . Let θ be the nxn null matrix . For k such 1 ≤ k ≤ n-1, we define the triangular matrices T k by : (T k + 1 ) i,j =1 if 1 ≤ i ≤ k and 2 ≤ j ≤ k + 1 and i0 for j=k + 1 and 1 ≤ i ≤ k (M) i,j =0 otherwise.. Then : For k such 2 ≤ k ≤ n-1, we have: T k + 1 = T k + C k + 1 (T k + 1 ) 2 =(T k ) 2 + T k C k + 1 + C k + 1 T k + (C k + 1 ) 2 10 since (C k + 1 ) 2 = θ and C k + 1 T k = θ and T k C k + 1 ∈ M (k-1) then (T k + 1 ) 2 =(T k ) 2 + T k C k + 1 and T k C k + 1 ∈ M (k-1) (T k + 1 ) 3 =(T k ) 3 + T k (T k C k + 1 ) since T k C k + 1 ∈ M (k-1) ⇒ T k (T k C k + 1 ) ∈ M (k-2) then : (T k + 1 ) 3 =(T k ) 3 + (T k ) 2 C k + 1 and (T k ) 2 C k + 1 ∈ M (k-2) Suppose by induction on pp ≥ 1 we have : (T k + 1 ) p + 1 =(T k ) p + 1 + (T k ) p C k + 1 and (T k ) p C k + 1 ∈ M (k-p) Then for p=k-1 we have : (T k + 1 ) k =(T k ) k + (T k ) k-1 C k + 1 and (T k ) k-1 C k + 1 ∈ M (1) since (T k ) k-1 C k + 1 ∈ M (1) ⇒ T k (T k ) k-1 C k + 1 = θ Then (T k + 1 ) k + 1 =(T k ) k + 1 + (T k ) k C k + 1 Then (T k + 1 ) k + 1 =(T k ) k + 1 (1) (T 2 ) 2 = θ 11 Suppose by induction on k that: (T k ) k = θ then by equation (1) we have: (T k + 1 ) k + 1 = θ On the other hand, for p such 1 ≤ p ≤ k: (T k + 1 ) p =(T k ) p + (T k ) p-1 C k + 1 and (T k ) p-1 C k + 1 ∈ M (k-p + 1) since 1 ≤ p ≤ k ⇒ k-p + 1 ≥ 1 ⇒ (T k ) p-1 C k + 1 ≠θ and (T k + 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 S k + 1 be the matrix : S k + 1 = T k + 1 + B k + 1 Proposition 5 : For k such 1 ≤ k ≤ n-1, we have (S k + 1 ) k + 1 = θ And (S k + 1 ) h ≠ θ if h is such 1 ≤ h ≤ k. Proof : (S k + 1 ) 2 = (T k + 1 ) 2 + (B k + 1 ) 2 + B k + 1 T k + 1 + T k + 1 B k + 1 since (B k + 1 ) 2 = θ and B k + 1 T k + 1 = θ and T k + 1 B k + 1 = θ then (S k + 1 ) 2 = (T k + 1 ) 2 12 Suppose by induction on p that : (S k + 1 ) p = (T k + 1 ) p then (S k + 1 ) p + 1 =(T k + 1 ) p (T k + 1 + B k + 1 )= (T k + 1 ) p + 1 + (T k + 1 ) p B k + 1 T k + 1 B k + 1 = θ ⇒ (T k + 1 ) p B k + 1 = θ then (S k + 1 ) p + 1 =(T k + 1 ) p + 1 By proposition 4, it implies for k such 1 ≤ k ≤ n-1, that : (S k + 1 ) k + 1 = θ and (S k + 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 U G denote the strictl y upper triangular matrix extracted from the adjacency matrix of G, then α (G)= n-min { h such (U G ) h+1 = θ} 0 ≤ h ≤ n 13 Proof : By proposition 1, there exi sts a split graph S such V(G)=V(S) and E(G) ⊂ E(S) and α (G)= α (S)=n-k. Then U G is congruent to a matrix S ’ k + 1 as defined in definition 4. Then there exists a permutation matrix P and P T its transpose matrix such : U G = P T S’ k + 1 P then (U G ) k + 1 = P T (S’ k + 1 ) k + 1 P Then : (U G ) k + 1 = P T θ P And (U G ) h = P T (S’ k + 1 ) h P ≠θ for h such 1 ≤ h ≤ k by proposition 6. Then k= min { h such (U G ) h+1 = θ} 0 ≤ h ≤ n And α (G)= α (S)=n-k=n- min { h such (U G ) h+1 = θ} 0 ≤ h ≤ n Proposition 8 : Given a graph G=(V,E) on n= │ V │ vertices and let U G denote the strictl y upper triangular matrix extracted from the adjacency matrix of G and I the nxn identit y matrix, then the independence number α (G) could be computed by the following algorithm : Input : U G 1 k ← 0 and T ← I 2 T ← TU G 3 if T= θ then output(n-k) else k ← k+1 goto step 2. Example 1 : n=5 and G is the complete graph K 5 14 (U G ) 5 = θ then α (G)=5-4=1. Example 2 : n=5 and G is the following graph : Then (U G ) 3 = θ then then α (G)=5-2=3. Example 3 : n=5 and G is the graph 5 K 1 (five isolated vertices) U G = θ Then then α (G)=5-0=5. 15 References : [1]. M. R. Garey, D. S. Johnson, "Computers and intractabilit y. A guide to the theor y 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 realizabilit y 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. M at., 80:496–50
Original Paper
Loading high-quality paper...
Comments & Academic Discussion
Loading comments...
Leave a Comment