Neighbourhood Evaluation Criteria for Vertex Cover Problem
NNeighbourhood Evaluation Criteria for Vertex CoverProblem
Kaustubh K JoshiE-mail: [email protected]
Abstract
The Vertex Cover Problem is a well-known graph-oriented NP-complete problem. This paper attempts to con-struct an approximate polynomial time algorithm using the Neighbourhood Evaluation Criteria (NEC) for findingnear-optimal solutions. A degree count is kept in check for each vertex and the highest count based vertex isincluded in our cover set. In the case of multiple equivalent vertices, the one with the lowest neighbourhood influ-ence is selected. In the case of still existing multiple equivalent vertices, the one with the lowest remaining activevertex count (the highest Independent Set enabling count) is selected as a tie-breaker. Algorithm specificationsand results have been stated ahead.
KEYWORDS
Vertex Cover Problem, Approximation Algorithm, NP-Complete Problem, Heuristic Technique1
INTRODUCTION
The Vertex Cover Problem is a topic of graph theory and combinatorics and is classified under the NP-completecategory. This problem often attracts a lot of research and practitioners due to its vast application in the realworld (telecommunication [1] , electrical engineer,etc.) and for it’s ability of being a complement to the Indepen-dent Set Problem which can help in solving SAT problems. This in term helps to solve various other NP problems(Circuit SAT, Max Clique selection [10],etc.) which can be reduced to a SAT problem.As stated by Richard Karp [2] the selection of optimal nodes for a Vertex Cover in a graph is an NP-completeproblem. Hence a pure Polynomial run time algorithm with always exact solution is currently improbable. Thesimplest algorithm takes into account insertion of vertices via random edge selection, however this leads to a vertexcover size (worst case) of two times the optimal value (1 + (cid:15) = 2). Most heuristic/approximate algorithms have anoptimal selection ratio ( approximate vertex cover : optimal vertex cover) of 1 + (cid:15) where (cid:15) ∈ [0 ,
1] .Modern approaches[3][4] to solving the Vertex Cover Problem utilizes Machine Learning techniques or meta heuris-tic algorithms[11] to obtain approximate results, these techniques attempt to search for patterns and try to gener-alize them to other sets.This approach often fails as some graphs are designed in a counter-intuitive to break suchgeneralizations. Approximate algorithm based approaches utilize a greedy method (using a support count/degreecount/weighted distribution) to drive the selection criteria. While this works for basic cases it also leads to higherselection ratio in nuanced cases. As stated by Dinur and Safra[5],it is an NP-Hard task to get 1 + (cid:15) < . a r X i v : . [ c s . OH ] M a y PROBLEM DESCRIPTION
Given an undirected graph G(V,E) let C = { u : ∀ e ( e ∈ E ), ∃ u ( u ∈ V ) incident to e } . This set C is known asa vertex cover. Our problem is to find the smallest vertex cover size —C— satisfying the above statement.As with most methods of approach to NP problems[6], there exist two types of solving methods. The verificationmethod checks whether our candidate solution is in fact a valid solution and then continue to tighten the con-straints iteratively. The optimization method finds the exact solution by optimizing a given function. For verifi-cation cases the problem can be expressed as follows : (cid:86) ( v i ,v j ) ∈ E ( v i ∨ v j )This translates into a 2-SAT type of problems that can be solved using implications graphs and verified quicklydue to the property of it being a subclass of SAT problems. For optimization cases the problem can be expressedas follows : minimize v ∈ C ∗ ( λ ) e ( E · C − E · C (cid:63) ) + ( β ) | C − C (cid:63) | (where E = Z { , } m × n ; C, C (cid:63) = Z { , } n × )Here E acts as an Adjacency Matrix and C,C* acts as selection vectors. C is our optimal solution and C* is ourcandidate solution. We can alter the value of λ parameter to ensure that C* doesn’t try to undercut C. Similarlywe can alter the β parameter to ensure that C* does not overshoot the desired selection.3 EXAMPLES
Bipartite Graphs
Consider a Bipartite Graph of type K(m,n) . In such a case the NEC algorithm will pick up nodes from the smallerset since these nodes will have higher degree count compared to the larger set.In this example we can see the graph as being the a join operation between set { A,B,C,D,E } and { F,G,H } . Since asmaller set will have a larger degree value; this leads to our minimum vertex cover to be composed of { F,G,H } . Figure 1.
Bipartite Graph of type K(5,3)
Complete Graphs
Consider a Complete Graph of size-k. In such a case the NEC algorithm will pick up any node since all of themare equivalent and do not have any tiebreaker for providing a benefit for selection. This leads our graph to nowbecome of type k-1. Inductively our graph will finally become a complete graph of size 2 (which leads to a singlenode selection and causes only one node to be left unselected). Hence our optimal cover set will be of size k-1.In this example we are provided with a K-5 graph. As stated above we will eventually end up with a single non-selected node and our minimum vertex cover will be comprised of { B,C,D,E } igure 2. A Complete Graph of type K5
Random Graphs
Consider a Random Graph of type G(V,E). In such a case there exist multiple selection choices. Since the initialselection of NEC is greedy, we will choose a candidate node with highest degree. In case of multiple nodes withhighest degree, we will use our tie breaker rule of minimum neighbourhood degree and lowest facet selection tochoose our optimal candidate node.In the give example we are provided with a G(14,16) random graph. Utilizing the algorithm, we will first end upselecting H since it has the highest degree. After that we will select C, then B and so an and so forth until we endup with our minimum vertex cover of { B,C,G,H,K,M } Figure 3.
A Random Graph
NEIGHBOURHOOD EVALUATION CRITERIA (NEC)
The idea behind NEC is that the nodes with highest degree counts are of interest to use while doing selection sincethey are connected to a variety of other nodes.However a straightforward approach won’t work for clashes. In thecase of multiple clashing nodes, we would like to select a node which has the lowest neighbourhood degree countsince this would indirectly imply that it’s connected to nodes in a lower facet hence removing it’s need for inclu-sion in our optimal candidate selection set. In the case of further existing ties, we utilize a tie breaker that checksthe strength of the selected node vs the competitor node by selecting the node which will lead to the exclusion ofthe most single degree nodes.
Algorithm 1
Neighbourhood Evaluation Criteria V ← Set of all vertices in the graph E ← Set of all edges in the graph A [ V ] := Adjacency List Array N [ V ] := Degree count Array C ∗ := Empty set for selected vertices E ∗ := Empty set for covered edges isActive [ V ] := Boolean array assigned to true while | E ∗ | < | E | do candidateN ode ← φ for u ∈ V doif isActive[u] is true and N[u] ¿ N[candidateNode] then candidateN ode ← u end ifend forfor u ∈ V and u (cid:54) = candidateN ode doif (cid:80) j ∈ A [ u ] ( isActive [ j ] ∗ N [ j ]) ¡ (cid:80) k ∈ A [ candidateNode ] ( isActive [ k ] ∗ N [ k ]) then candidateN ode ← u else if (cid:80) j ∈ A [ u ] ( isActive [ j ] ∗ N [ j ]) == (cid:80) k ∈ A [ candidateNode ] ( isActive [ k ] ∗ N [ k ]) thenif (cid:80) j ∈ A [ u ] ( isActive [ j ] ∗ { N [ j ] == 1 } ) ¿ (cid:80) k ∈ A [ candidateNode ] ( isActive [ k ] ∗ { N [ k ] == 1 } ) then candidateN ode ← u end ifend ifend forfor u ∈ A [ candidateN ode ] doif isActive[u] is true then E ∗ ← E ∗ ∪ (candidateNode,u) N [ candidateN ode ] ← N [ candidateN ode ] − if N [ u ] == 0 then isActive [ u ] ← false end ifend ifend for C ∗ ← C ∗ ∪ candidateNode isActive [ candidateN ode ] ← false end while .1 Computational Complexity
Big O time complexity has been calculated as follows: The maximum number of times edge loop will take placewill be k where k is the number of candidate vertices which cover all the edges. For each loop the following tasksare done: Selecting an optimal node and updating the values for said optimal node. Optimal node selection is anO( V ) time complexity task and value update is an O(V) time complexity task. Our overall complexity comes outto be O( kV ). A complete algorithm design will have a time complexity of O( kn + 1 . k k ) as stated by Rolfand Peter[12]. This leads us to have an approximate result algorithm which produces optimal or near optimal se-lection while ensuring fast asymptotic time complexity.4.2 Selection criteria
Degree Count - Initial Selection : This is the greedy part of the algorithm which selects a candidate node based ondegree count. Higher degree counts are selected over lower greedy count for the initial candidate node. This helpsensure that lower facet based nodes are not being given priority for selection (hence avoiding potential pitfalls)Lower Neighbourhood score - Tiebreaker : After the initial candidate node has been selected, there might still ex-ist multiple nodes with the same degree count. To tackle this case we select the node which has the lower degreesummation of its surrounding neighbours. This helps ensure that the potential node that we are taking into ac-count doesn’t end up disrupting future candidate nodesHighest deactivation score - Tiebreaker : In case of equal Neighbourhood scores a preference is taken for choosinga node which tends to cover the lowest faceted nodes. Hence a higher deactivation score is preferred as the finaltiebreaker.5
EXPERIMENTATION RESULTS
The proposed algorithm has been designed to run in C++11. Hardware specifications are as follows : intel Corei5-8300H 2.3Ghz CPU and 8 GBs of RAM. Experiments were carried out on the DIMACS dataset[8] for accuracyand verification. Stress testing of NEC was doing using complete graphs since these graphs have n-1 optimal nodesfor satisfying vertex cover and requires complete search since tie breakers will not work in such graphs.5.1
Complete Graph Performance
The NEC algorithm is able to calculate the exact optimal count in O( kV ) time. This was verified by using poly-fit(x,y,n) in OCTAVE. For n ≥ ≥ Figure 4.
Resultant plot for performance vs vertices raph Type Vertices Optimal Vertices Candidate Vertices (cid:15)
Time(milli-sec)K-10
10 9 9 1 2
K-30
30 29 29 1 3
K-50
50 49 49 1 4
K-100
100 99 99 1 7
K-300
300 299 299 1 185
K-500
500 499 499 1 1268
K-700
700 699 699 1 5620
K-800
800 799 799 1 10965
K-1000
K-1300
K-1800
K-2000
K-2500
Table 1.
Results of NEC on Complete graph types
DIMACS performance
While the algorithm displays an (cid:15) value of 0 for many graphs, in other cases the algorithm the algorithm is off bya few extra vertices (for e.g.: in case of Sanr400-0.5 NEC selects 3 extra vertices) and in worst case utilizes an (cid:15) value of 0.5 (meaning 50% extra vertices can be picked up). The strength of the algorithm lies in the fact that itcan produce near optimal minimum vertex cover sets while using an O( kV ) computation time and just O(E+V)memory space.When compared to COVER (a probabilistic Minimum Vertex Cover algorithm that selects an optimal solution viamultiple iterations[9]) NEC achieves comparable results on a lot of graphs, however due to it’s uniform randomapproach of selecting criteria satisfying nodes COVER can probabilistically achieve better results given multipletries. NEC on the other hand is deterministic by nature and hence achieves consistent and faster results. For e.g.- For the graph Johnson32-2-4, COVER calculates the solution in 920 milliseconds whereas NEC calculates the so-lution in 56 milliseconds, hence having a 16 times faster performing speed. In another graph called Keller5, NECincludes 11 additional vertices while computing these results 50 times faster than COVER. Results have been tab-ulated in Table 2. raph Type —V— —C— —C*— (cid:15) Time(milli-sec) COVER —C*— COVER Time(avg)Brock800 1
800 777 782 1.006 43 782 40512
Brock800 2
800 776 784 1.103 48 780 NA
Brock800 3
800 775 782 1.009 52 780 NA
Brock800 4
800 774 786 1.015 79 778 NA
C-fat200-1
200 188 188 1 4 188 10
C-fat200-2
200 176 176 1 7 176 10
C-fat200-5
200 142 142 1 6 142 10
C-fat500-1
500 486 486 1 91 486 NA
C-fat500-10
500 374 374 1 153 374 NA
C1000.9
C2000.9
Frb30-15-1
450 420 429 1.021 7 420 80
Frb30-15-2
450 420 431 1.026 6 420 100
Frb30-15-3
450 420 429 1.021 5 420 400
Frb30-15-4
450 420 430 1.023 6 420 80
Frb30-15-5
450 420 428 1.019 4 420 170
Gen200-p0.9-44
200 156 169 1.083 1 156 100
Graph50-01
50 30 30 1 1 NA NA
Graph50-09
50 30 40 1.333 1 NA NA
Graph50-10
50 30 35 1.166 1 NA NA
Hamming6-2
64 32 32 1 1 32 10
Hamming8-2
256 128 128 1 1 128 10
Hamming10-2
Johnson8-2-4
28 24 24 1 3 24 24
Johnson8-4-4
70 56 56 1 5 56 NA
Johnson16-2-4
120 112 112 1 5 112 297
Johnson32-2-4
496 480 480 1 56 480 920
Keller4
171 160 162 1.012 2 160 NA
Keller5
776 749 760 1.014 106 749 5127
MANN a81
San200-0.7-1
200 170 185 1.088 3 170 10
San200-0.7-2
200 182 188 1.032 3 182 10
San400-0.9-1400
400 300 350 1.166 8 NA NA
San1000
Sanr200-0.7
200 183 184 1.005 1 183 10
Sanr200-0.9
200 158 162 1.025 1 158 10
Sanr400-0.5
400 387 390 1.007 8 287 60
Sanr400-0.7
400 379 384 1.013 9 379 30
Table 2.
Obtained results of NEC on a certain set of graph dataset
DIMACS CONCLUSIONS
NEC proves to be extremely efficient by calculating optimal or near optimal vertex cover on known benchmarkgraphs. Its worst case has a selection ratio of 1.5[7]. It is experimentally observed to be fast (as compared to cur-rent algorithms such as COVER) while the candidate node selection makes sure that it selects high valued candi-dates. One area left to explore is the impact of graph density and selection ratio and should be taken up in futuretudies.
REFERENCES1.
Maytham Safar, Mohammad Taha, Sami Habib : Modeling the Communication Problem in Wireless SensorNetworks as a Vertex Cover R. M. Karp : Reducibility among combinatorial problems,PlenumPress,New York, (1972), pp 85 103. Sinem C., Sema B. : A new hybrid approach based on genetic algorithm for minimum vertex cover Xinshun Xu, Jun Ma : An efficient simulated annealing algorithm for the minimum vertex cover problem.(Neurocomputing 2006) I. Dinur and S. Safra. The importance of being biased. Technical Report TR01-104, ECCC, Dec. 2001. Refael Hassin, Asaf Levin: The minimum generalized vertex cover problem, ACM Transactions on Algorithms(TALG), January 2006 George Karakostas : A better approximation ratio for the vertex cover problem, ACM Transactions on Algo-rithms (TALG), November 2009, Article No.: 41 Vertex Cover Benchmark Instances (DIMACS) https://turing.cs.hbg.psu.edu/txn131/vertex cover.html Richter, Silvia and Helmert, Malte and Gretton, Charles: A Stochastic Local Search Approach to VertexCover
Wayne J. Pullan and Holger H. Hoos: Dynamic Local Search for the Maximum Clique Problem
Shyong Jian, Peng-Yeng, Bertrand M.T.: An Ant Colony Optimization Algorithm for the Minimum WeightVertex Cover Problem12.