Exact Polynomial-Time Algorithm for the Clique Problem and P = NP for Clique Problem

Exact Polynomial-Time Algorithm for the Clique Problem and P = NP for Clique Problem

International Journal of Computer Applications (0975 – 8887) Volume 73– No.8, July 2013 Exact Polynomial-time Algorithm for the Clique Problem and P = NP for Clique Problem Kanak Chandra Bora Bichitra Kalita Department of Computer Science & Engineering Department of Computer Application (M.C.A.), Royal School of Engineering & Technology, Assam Engineering College, Betkuchi, Guwahati-781035, Assam, India. Jalukbari, Guwahati-781013, Assam, India. ABSTRACT K. Makino and T. Uno discussed the enumeration of In this paper, the Minimum Nil Sweeper Algorithm, maximal bipartite cliques in a bipartite graph [8]. E. Tomita et applicable to Clique problem has been considered. It has been al discussed the worst-case time complexity for generating found that the Minimum Nil Sweeper Algorithm is not maximal cliques of an undirected graph [9]. Takeaki UNO applicable to Clique problem for all undirected graphs which explained techniques for obtaining efficient clique was previously claimed. A new algorithm has been developed enumeration implementations [10]. to study the all clique problems for arbitrary undirected graph Zohreh O. Akbari studied the clique problem and and its complexity is analysed. An experimental result is presented “The Minimum Nil Sweeper Algorithm”, a cited. Finally, the P = NP has been proved for Clique problem. deterministic polynomial time algorithm for the problem of A theorem related to intersection graph is developed. finding the maximum clique in an arbitrary undirected graph [11]. The Minimum Nil sweeper algorithm was made General Terms considering all zeroes on the inaccessibility matrix. The basic P=NP for Clique idea behind the algorithm was that the problem of omitting the minimum number of vertices from the graph so that no zero Keywords would remain except the main diagonal in the adjacency Exact Polynomial-time Algorithm, Clique, Euler-diagram, matrix resulting sub graph. Complexity. P=NP Further, it has been proposed that, considering an arbitrary undirected graph, maximum clique size of the graph 1. INTRODUCTION can be found using the “The Minimum Nil Sweeper Based on solving time, problems are divided into three Algorithm”.[11] categories [1]. The class P consists of those problems that are It is known that heuristic algorithms can determine a solvable in polynomial time. Intractable problems are those problem quickly but they are not guaranteed to give a definite which are unsolvable by polynomial-time algorithms. NP solution to all problems. Exact algorithms can determine a problems are those problems that have no polynomial-time problem and they are guaranteed to give a definite solution to algorithm. It has not yet been found [2], even though many all problems. attempts have made. The paper is organized in three sections. Section 1 The concept of NP-complete problem had been presents introduction part containing previous works of other introduced by S. A. Cook in 1971 [3]. A problem C is NP- researchers including the Minimum Nil Sweeper Algorithm. complete [4] if it satisfies the following conditions Section 2 presents a new general algorithm to solve the Clique (a). C Є NP, and problem for an arbitrary undirected graph. Complexity of the (b). A ≤ pC for any problem A Є NP. general algorithm has been analysed and finally P=NP for The most important open problem in theoretical Clique problem is proved. In section 3, some examples graphs computer science is whether P ≠ NP or P=NP? This question cited and are tested by both the algorithms. And finally a has been one of the deepest, most perplexing open research theorem related to the intersection graph is stated. problems in theoretical computer science since it was first posed in 1971 [3]. It is sufficient to present a polynomial time algorithm for any NP-complete problems [4][5]. Here Clique problem is considered and this is one of Richard Karp‟s 21 2. GENERAL ALGORITHM & IT’S problems [6]. COMPLEXITY A clique in an undirected graph G = (V, E) is a 2.1 General Algorithm: One general algorithm is presented complete sub graph of the graph G. The size of a clique is the here for finding the maximum clique size in an arbitrary number of vertices it contains. The clique problem is one of undirected graph. In the adjacency matrix of an undirected the optimization problems of finding a clique of maximum graph, the elements which are 1, are only considered. In size in a graph. addition to this, row wise clique size is considered and finally The clique problem is NP-complete since we can maximum clique size is found. If the given graph is a check in polynomial time whether some vertices of a graph complete graph with n vertices then the maximum clique size form a clique and 3-CNF-SAT ≤ CLIQUE. Clique problem p of the graph is n-1. If there is only one vertex in the graph has many applications like in social network, bioinformatics then clique size is 1 and if there are two vertices in the graph and in computational chemistry [7]. 19 International Journal of Computer Applications (0975 – 8887) Volume 73– No.8, July 2013 which are connected then the clique size is 2 and for these two Clcount[w]++; cases our algorithm is not required to apply. CL[++R] = B[p +1] ; } Algorithm: we construct an adjacency matrix A for the given ij } graph whose total number of vertices are n. T, i, j, p, w, x, y, IF(Clcount[w] == 0) K, R, Big are integer variables. B[], Clcount[], CL[], { BClique[], B , Clique[] are array of type integer. ij BClique[w] = 0; If( w == T-2) // make the adjacency matrix { Goto LavelBig; Aij = 1 if there is an edge from Vi to Vj } For (i =1; i<= n; i++) Goto LevelB; } { IF ( Clcount [w]> 0) { For(j=1 ; j ≤ n; j++) If (Clcount[w] == 1) { { BClique[w] = 3 ; If( w == T-2) Aij = 0 or 1; { } Goto LevelBig; } } Else Goto LevelB; For (i =1; i ≤ n; i++ ) } { Else for (j= 1; j ≤ n; j++ ) { { LevelA: For (x = 1 ; x ≤ Clcount[w] +1 ; x ++ ) While (i ≠ j) { { R = x; If (Aij != 1) CL[0]=0; Goto Lavelst; Z = CL[x-1] ; } For (y =x + 1 ; y ≤ Clcount[w] + 2; y ++ ) { } If (x = 1 and y ≠ 1 ) } { Printf( “ Maximum clique size is = n-1 “); K=CL[R]; Goto Last; Bxy = AiK ; Levelst: For (i=1; i ≤ n; i++) R++; { If(Bxy == 0 ) T = 1; { For (j = 1; j ≤ n; j++) BClique [w]= 0; { If( w == T-2) If (Aij == 0 ) { Continue; Goto LevelBig; B[T] = j; } T= T + 1; Else } { K = 0; Goto LevelB; LevelB: For (w = 1; w ≤ T – 2; w ++) } { } Clcount[w] = 0; } R = 1 ; If (x ≠ 1 and y ≠ 1 ) CL[R] = B[w]; { For (p = w; p ≤ T-2; p++) K= CL[R]; { Bxy = AZK ; If (AB[w]B[p+1] == 1) R++ ; { If(Bxy == 0) 20 International Journal of Computer Applications (0975 – 8887) Volume 73– No.8, July 2013 { 3. TESTING OF ALGORITHM FOR BClique[w] = 0; GRAPH If( w == T-2) 3.1 Case-1: { Goto LevelBig; Let us verify the algorithms for the graph of figure-1 } Else 1 0 { Goto LevelB; 6 } 2 } } } 5 3 } BClique[w] = Clcount [w] + 2 ; 4 } LevelBig:Big = BClique[1]; Figure 1 W = T-2 For (u = 1; u <= W; u ++) Minimum Nil Sweeper Algorithm gives the out put for the { graph figure 1, which shows that the vertices 5, 6,forms a If (Big < = BClique[u]) clique, which is not a maximum clique. After application of Big = BClique[u]; the General Algorithm [2.1] , the maximum clique size = 3, is } found for the graph of figure 1,which is the correct result. Clique[i] = Big ; } 3.2 Case-2: Big = Clique[1]; Let us consider the graph of figure-2. For (i = 1; i < n; i++ ) { 1 2 If(Big < Clique[i]) Big = Clique[i]; } If (Big==0) 0 3 Big=2; Printf(“Maximum clique size = Big “); Figure 2 Last: STOP END. Again when the Minimum Nil Sweeper Algorithm is used, 2.2 Complexity Analysis of the Algorithm: then the vertices1, 2, 3 forms a maximum clique of size 3. The same result is obtained after application of the General Suppose number of vertices in the undirected graph is „n‟, Algorithm[2.1] . then complexity of the algorithm will be as follows = n2 + n2 + 1 + n[n + (T -2){(T-2) + (count + 1)2 } + n ] + n = 2n2 +1 + n2 + n(T-2)2 + n(T-2)2 + n(T-2)(count + 1)2 + n2 +n 3.3 Case-3: Here “T” and “count” can be considered as (n- something) , Let us consider the graph of figure-3. something < n, and by which complexity of the algorithm will 4 be = O(n ) 6 1 Since Clique problem is an NP-complete problem and from 2 the above General Algorithm[2.1], it is proved that Clique problem can be solved in polynomial time, hence P = NP for 7 Clique problem. 8 5 3 4 Figure 3 21 International Journal of Computer Applications (0975 – 8887) Volume 73– No.8, July 2013 For the graph of figure 3, the maximum clique of size 4 is obtained after application of the Ggeneral Algorithm [2.1] . 3.4 Case-4: Let us consider the graph of figure-4. This graph is considered from a paper of reference number [12], which is known as intersection graph. 1 6 2 4 5 3 12 11 10 13 9 14 8 15 16 7 17 Figure 4 Now applying the General Algorithm, it is found that This process definitely increases the number of curves maximum clique size = 2. Hence the following theoretical horizontally and the intersection graph is obtained as result has been established.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    5 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us