A Smart Approximation Algorithm for Minimum Vertex Cover Problem based on Min-to-Min (MtM) Strategy

In this paper, we have proposed an algorithm based on min-to-min approach. In the proposed algorithm first the degree of each vertex of the graph is calculated. Next the vertex with minimum degree is selected, after which all the neighbors of the minimum degree are located. In the neighbors of the minimum degree vertex, again the vertex with the minimum degree is found and put into the set minimum vertex cover and deleted from the graph. Again, the degree of each vertex of the updated graph is calculated and again the same process is repeated until the graph becomes empty. In case of tie, all the neighbors of the minimum degree vertices are computed and then the minimum degree vertex in all of them is added to minimum vertex degree set. The same process is repeated until the graph becomes empty. The proposed algorithm is a very simple, efficient, and easy to understand and implement. The proposed min-to-min algorithm is evaluated on small as well as on large benchmark instances and the results indicate that the performance of the min-to-min algorithm is far better as compared to the other state-of-art algorithms in term of accuracy and computation complexity. We have also used the proposed method to solve the maximum independent set problem. Keywords—Minimum vertex cover; approximation algorithms; maximum independent set; benchmark instances; graph theory


I. INTRODUCTION
A graph in field of computer science is the set of vertices, and collection of edges each of which connects a pair of vertices [1]. Edges are the links between the vertices. Mathematically, a graph is represented as G (V, E), where V denotes the set of vertices and E the collection of edges [2] .In graph theory a vertex cover is defined as the subset Vc ⸦ V, such that the vertices in the subset Vc covers all the edges E in the graph G(V, E). Minimum vertex cover(MVC) is the minimum number of elements in the subset Vc which covers all the edges in the graph [3]. The minimum vertex cover problem is well known in graph theory because of its real-life applications in diverse fields. For example, MVC has application in civil and electrical engineering, map labeling, sensor networks as well as in very-large scale integration (VLSI) design, bioinformatics and biochemistry, protein sequencing and gene regulatory network [4][5][6][7]. A real-life example to better explain the application of MVC is the positions of guards in a museum. Where each edge of the graph represents the corridors of the museum and each vertex denotes the position of the guards. To station minimum guards while still covering all the corridors of the museum is minimum vertex cover problem [8].
Minimum vertex cover problem comes in two versionsoptimization version and decision version. The decision version is a Boolean type problem. Where the question is to find, if there exists a solution of desired size k? k is the minimum number of vertices that should be used. And the result is either true or false (Yes or No). The optimization version is all about finding the optimal solution [5]. Our concern in this paper will be with second version i.e optimization version of MVC.
In 1979 S.Cook put two conditions for NP problems to be called as NP-complete. 1) It should be NP-hard and 2) it should be reducible to any NP-complete problem in deterministic polynomial time [9]. Cook put the Boolean Satisfiability (SAT) problem as the basic problem in the set of NP-complete problems. As clique can be converted into SAT problem in polynomial time, so clique belongs to SAT problems. Moreover, maximum independent set (MIS) problem can be converted to clique problem as well, similarly minimum vertex cover can be converted into MIS problem in polynomial time, hence the above problems are interchangeable and are considered as NP-complete problems [10]. To conclude, minimum vertex cover (MVC) problem is NP-complete problem. MIS, MC and MVC are all complimentary concepts and NP-complete problems.
Maximum independent set is also a great problem, where the optimizing task is to find a set containing maximum number of such vertices of the graph where no pair of the vertices share an edge or are adjacent to each other [11]. Its application can be found in map labelling problems where the names of adjacent cities should be placed nearest to the city without any overlap [7]. MIS is also used in high level synthesis and physical design automation, while computing the MIS in a graph can be used to determine the maximum number of processors required for parallel execution and also used in channel routing problems of physical design automation, for instance k-layer routing for Printed Circuit Boards and Multi-Chip Modules [12]. Moreover, MIS have application in information retrieval, classification theory, scheduling, economics, computer vision and experimental design [13]. www.ijacsa.thesai.org There are two types of algorithms to solve any NPcomplete problems. These are the approximation algorithms and exact algorithms [14,15]. The exact algorithms will always provide a solution that is optimal, but the computation time increases exponentially with the size of the problem. Therefore, the exact algorithms are best option for small size problems where an optimal solution is needed without any time constraints. Brute force algorithm, branch and bound algorithm and divide and conquer algorithms come under this type, where all the possible solutions are evaluated and the optimal one is selected [16,17]. On the other hand, the approximation algorithms come as the best option after the exact algorithms for solving NP-complete problems. Greedy algorithms, simple heuristic algorithms and memetic algorithms are example of approximation algorithms. As stated earlier, the execution time increases exponentially with the size for NP-complete problems using exact algorithms, even for an ordinary size NP-complete problem it takes thousands or billions of execution time years to compute the solution using the currently available computational power. While the approximation algorithms provide an approximate result in polynomial runtime. Therefore, the approximation algorithms are preferably the better option for researcher to come up with a solution to NP-complete problems [18,19]. The proposed algorithm -min-to-min is also an approximation algorithm to solve MVC problem. We used Approximation ratio -the tool to evaluate the performance of any approximation algorithms. This paper is extended version of our paper published [1]. In this paper we have proposed a new algorithm using the min-to-min (MtM) approach. The purpose of the proposed algorithm is to enhance the optimality and decrease the computational time. The developed approach is very simple and is based on simple heuristic method. Due to simplicity and intelligent selection of vertices in vertex cover set it save the time and improve the performance in term of optimality of the proposed algorithm. This paper is structured as such: first the related work is discussed in detail in Section II and then the proposed algorithm is elaborated in Section III. While Section IV presents the implementation, alone with our experimental results, and discussion. Finally, Section V presents the conclusion of the paper in detail. The abbreviations with their corresponding descriptions are presented in detail in Table I. II. RELATED WORK Several approximation algorithms were proposed by various authors to deal with the problem of minimum vertex cover. Based on their performance in terms of their run time complexity, optimality, and performance on small benchmarks, a brief literature review of these popular algorithms proposed for MVC are discussed here.
The first algorithm is maximum degree greedy algorithm (MDG). The approach adopted in this algorithm is greedy. It introduces few changes in the previously existing greedy heuristic algorithm for set-cover problem by Chavatal in 1979 [20]. It uses the idea of subtracting the weight of covered vertex from all its neighbor vertices into the greedy algorithm for finding the vertex cover. Therefore, it adds all the vertices having the maximum degree to MVC. Its run time complexity for the worst case is ( 2 ). This algorithm fails even on small benchmarks as shown in Fig. 1(b).
On the other hand, different approaches were also used to create more efficient algorithm. Vertex Support Algorithm (VSA) is one of them.
VSA is also an approximation algorithm. The basic version of this algorithm is that it uses an adjacency matrix with binary variables 1,0; to indicate the existence of edge between two vertices with 1, and absence with 0. Its output shows if any vertex is included in vertex cover or not included. A new data structuresupport of a vertex-is implemented in the algorithm. It is defined as the sum of the degree of the adjacent vertices to a given vertex of the graph. It calculates the degree and support of all the vertices, then select those vertices which have maximum support and put into vertex cover. If there are vertices with same support, then it selects the maximum degree vertex, and includes that vertex to vertex cover set [5]. The VSA has the run time complexity of ( 2 ) in the worst-case scenario. (IJACSA) International Journal of Advanced Computer Science and Applications, Vol. 11, No. 12, 2020 252 | P a g e www.ijacsa.thesai.org Furthermore, there is an improved and modified version of VSA named as modified vertex support algorithm (MVSA). It was proposed by Imran et al. in 2013[21]. The modification introduced by Imran et al. is in the criteria of selecting the vertex for considering it as candidate for minimum vertex cover, which, as seen above in MDG is selecting the maximum degree vertex, while in VSA the vertex which has maximum support value was selected. MVSA works in three stages. First is the analysis step, where the values of degrees and support of the vertices is calculated. Then comes the filtering process where the values are categorized as 'min_support'vertices which have the minimum value for support and 'adj_nodes'all the adjacent vertices to the vertices having minimum support values. And then in the last step selection is done by choosing the vertex with minimum support value, as candidate vertex for MVC. Again, the run time complexity for this algorithm is ( 2 log ).
Another modified version of vertex support algorithm proposed by Ahmad et al. [22] is known as advanced vertex support algorithm (AVSA). Ahmad et al introduced a tiny change in MVSA. Keeping the same data structure of support of vertex, while instead of selecting the maximum or minimum support of vertex as seen above in VSA and MVSA respectively, an alternate way was adopted by just finding all the adjacent vertex to those vertices which have minimum support. Then from all the found adjacent vertices, again selecting the one with minimum support. The computational complexity for AVSA is same as MVSA i.e. ( 2 log ).
Other than the above algorithms, Gujrat et al [23] have also contributed to the problem of minimum vertex cover by proposing the near optimal vertex cover algorithm (NOVCA). It works by successively appending the adjacent vertices to the minimum degree vertex in each step. It deals with a tie situation by choosing the neighbors of a vertex having the maximum degree instead of using neighbor of minimum degree vertex. This algorithm also has the polynomial run time complexity of ( 2 log ). Using NOVCA on small benchmark instances yielded failure.
In 2012, Gujral et al [24] further improved their algorithm and came up with a modified version of NOVCA i.e NOVCA-II. NOVCA-II is simply the incorporation of idea that a vertex cover should be built by adding the vertex in decreasing order of their degree and in the situation of tie, it uses the converse of NOVCA i.e. it chooses the vertices which have the minimum sum of degrees of their neighbor vertex, instead of selecting the neighbors of vertex having maximum degree as in NOVCA. By using few graph instances, it became evident that both algorithms of Gujral et al also fail on small benchmarks.
More investigation has been done and Li et al in 2011 [25] came up with a new idea of max-share of degree heuristic algorithm (Max-I). This algorithm works based on the concept that, only those vertices should be added to minimum vertex cover, which helps to reduce the degree of its neighboring vertices as much as possible, or ultimately if zero. It follows random selection in cases of tie. Max-I has the worst run time complexity of ( 3 ).
However, in 2014, Imran et al [26] again came up with his second method for MVC called Degree Contribution Algorithm (DCA). A new data structure -Degree contributionwas introduce. Degree contribution is used for graph processing parameters. It helps in taking the complete graph to determine the values for each vertex. Degree contribution of a vertex is the total number of degrees of the vertex and sum of all the vertices with same degree in the whole graph. The degree contribution for each vertex determines either it is efficient to choose that vertex for MVC or not. So, DCA works by calculating the degree of every vertex along with its degree contribution value. Then only those vertices are added to minimum vertex cover whose degree contribution value is higher than others. After adding a vertex with higher degree contribution value, all its neighbor edges are removed and the same steps are repeated for the remaining vertices, until no edge was left in the graph. The execution time of DCA is ( ). A memetic algorithm was also proposed by Jovanovic et al in 2011 [27].
Based on heuristic nature of real ants searching for food, ant colony algorithm was proposed for minimum weight vertex cover problem (MWVC). As memetic framework of ant colony, bee colony and bat colony were mostly used for optimization problems. However, the ant colony algorithm was initially applied to the traveling salesman problems (TSP), where a fully connected graph with weighted edges were considered. While in case of MVC it is not necessary for the graph to be fully connected and un-weighted. So, Jovanovic et al. used arbitrary edges to make the given graph a connected graph and gave weight to each vertex to make it complacent for the algorithm. Hence, converting the graph from MVC to TSP and applying the ant colony algorithm was the main aim. For un-weighted graphs, this algorithm is much harder to apply. Lastly an unusual attempt in proposing a unique algorithm for MVC was undertaken by Halldórsson et al in [28]. Based on the greedy strategy the greed is good (GGA) algorithm was proposed. This algorithm tackled the maximum independent set (MIS) problem. The "Network Bench Model" was used in this algorithm. The degree for every vertex is found then only the minimum degree vertex is included in MIS. Once, MIS is found then MVC can be easily fond by taking complement of MIS from the set of all vertices.
Li et al. [29] proposed a new local search technique to solve the minimum vertex cover problem called NuMVC. NuMVC comprised of three main stages. In the first stage the introduction of four rules is carried out. In the second stage a technique is introduced called configuration checking in order to reduce cycling in local search. In the third phase a method is introduced to reduce the searching time in order to improve the optimality and reduce the computation time. In [30] two new extensions of the conventional vertex cover problem are introduced. The detail presentation of the two new methods is carried out in detail.
In the literature review section different algorithms are discussed in detail from different aspects with the aim to find the weakness and strengths of the existing algorithms for minimum vertex cover problem. These algorithms have weakness in one way or another way, some are fast but fail to provide optimal results on many cases, some algorithms www.ijacsa.thesai.org provide good optimality results but are very slow. The proposed method is introduced to tackle all these issues.

III. PROPOSED ALGORITHM
The algorithm put forth here, has a different and unique approach than any algorithms found in the literature review. The min-to-min (MtM) consists of three basic steps of working through an undirected and unweighted graph with any number of vertices. The initial step in the algorithm is to find the degree of every vertices in the provided graph, then comes the next step of finding the minimum degree vertex and getting its adjacent vertices. If there are more vertices with same minimum degree than we will choose the first vertex with minimum degree. After getting the minimum degree vertex and all of its adjacent vertices. The last step is to again find the minimum degree vertex from the adjacent vertices of already found minimum degree vertex, and this vertex is considered as a candidate for MVC. Once the candidate vertex is selected from the adjacent vertices, all its edges are deleted, and the vertex is appended to MVC. This process is repeated till no edge is left in the provided graph.

A. Data Structure
In our work, we implemented the edge list data structure for representing graphs in computer memory leveraging the properties of saving computation time for sparse graphs using list indexing to access any edge and also fully exploiting the advantages of saving space as well instead of using adjacency list for the graph representation. In case of the space usage the performance of edge list is O( + ) for the representation of the graph having x edges and y vertices. And in case of the run time, edge list performs well in counting the number of vertices or edges and looping an iteration over the edges or vertices [31]. The iterations over the edge list in our case using the method find () has a runs time of O(1). While the method min(array) iterates through the required array in run time of O( ), y being the total vertices. Furthermore, removing any edges associated with a vertex has the complexity of run time O( ), which reduces exponentially as by each iteration our graph gets smaller with few vertices and associated edges. On the other hand, adjacency matrix-which is mostly used as data structure for graph representation-has both performance drawbacks of run time as well as space storage problems for our purpose. For instance, the O( 2 ) space usage is the worse than the O( + ) space usage by edge list, moreover most real-world graphs are sparse which makes it more disadvantageous to implement adjacency matrix as depicted in Fig. 2(a) and (b) the adjacency matrix and edge list representation respectively of the graph from Fig. 1(a).

B. Terminologies
Following are some terminologies that we have used in the proposed pseudo code as illustrated in Fig. 3 deg (): used for degree calculation, | |: used for absolute values, min(): for minimum degree calculation in the graph, adj (): to calculate the neighbors/adjacent vertices of a node/vertex and C is used for cover.

Pseudo code for Clever Steady Strategy Algorithm
Start:

C. Flow Chart of the Algorithm
The flow chart of the proposed algorithm is provided in Fig. 4. In the flow diagram we have used the same terminologies as given in the pseudo code of the proposed MtM algorithm. (IJACSA) International Journal of Advanced Computer Science and Applications, Vol. 11, No. 12, 2020 254 | P a g e www.ijacsa.thesai.org

A. Implementation Setup
Here, the section deals with the empirical results gained through implementation of MtM on various benchmark instances of up-to-date popular libraries. By cross evaluating the results of MtM to different well-known proposed algorithms, as discussed in literature review also, the tables were created. And by the run time complexity and optimality the result of MtM were compare with VSA, MDG and MVSA in the tabular form. The coding of the MtM algorithm has been done in MATLAB R2014a version 7.10.0.499 on an Intel core i5 system having windows 7 operating system.

B. Results on Small Instances
Implementing the proposed algorithm on small benchmark revealed an interesting result and optimal performance of MtM as compare to performance of other algorithms discussed in the literature review. As shown in Fig. 5(a) the MVC by MtM for the given graph is 4 vertices which is optimal and the approximation ratio i = 1. Which is also optimal. While in Fig. 5(b) the same graph is covered by 5 vertices according to MDG and i = 1.250. while the given graph in Fig. 5(c) is covered using just 2 vertices by MtM, which is optimal solution and i = 1, while it can be seen in Fig. 5(d) the same graph is covered by VSA using 3 vertices with i of 1.5. Moreover, most astonishing performance of MtM appears in Fig. 5(e) which is covered by just 1 vertex-which is the optimal solution. But the same graph shown in Fig. 5(f) is covered using 4 vertices by MVSA with i = 4. As the solution by MtM for the small benchmark instances is optimal and it outperformed all other existing algorithms, hence the MtM is much efficient as well as fast in relation to the already proposed algorithms in literature.
Mathematically Absolute Error is defined as, the magnitude of the difference between the measured/ obtained or approximated value of a quantity . and the actual or optimal value In our case, absolute error ∆ served as the best indicator of the performance of the algorithm. Like the value ∆ shows how close the result of the algorithm is to the actual solution. The smaller the value of absolute error ∆ , the better the solution can be considered. Large value of ∆ indicate worst performance and a poor solution. Table III shows the approximation ratio, along with Absolute error values, which are calculated for the measurement of performance with respect to the optimal output of each algorithm.
Approximation ratio is the ratio of number of vertices in MCV found by an algorithm to the optimal solution of the MVC. Mathematically, approximation ratio is defined-as in Eq. (2). = (2) In the above equation, A denotes the approximate result and i represents the number of instances, OPTi represents the optimal result. For MVC i = 1 is the optimal solution while for the existing algorithms i ≥ 1 always. A ratio very close to 1 means the result found is better and almost near to optimal solution while the more the ratio deviates from 1, the solution gets poor and worst. On the other hand, for MIS i = 1 also means the result provided by the algorithm is optimal but all existing algorithms will always have i ≤ 1, as for MVC for MIS if the deviation from 1 is very small then the solution is considered as the near to optimal, but a deviation of 0.1 means the solution is not better one while high values of the deviation indicates the solution is the worst. Thus, for MIS approximation ratio ≤1 and for MVC approximation ratio ≥ 1. V. CONCLUSION AND FUTURE WORK This paper proposes a new algorithm -Min to Min (MtM) to tackle the NP-hard optimization problems of MVC as well as MIS problems of graph theory. The algorithm was well tested first on small benchmark instances as well as then it was investigated on benchmarks instance of libraries like DIMACS and BHOSLIB. The obtained experimental results were cross compared with other extant algorithms of literature. After the obtained results it was proved that MtM outperformed algorithms like MDG, VSA and MVSA on the parameters of runtime performance as well as approximation ratio and absolute error. The results are well demonstrated using tables and visual graph diagrams. Hence, the proposed algorithm is an efficient way to solve real world problems of MVC and MIS in different areas of application. It is simple and fast to implement, and it gives near to optimal solutions on the grounds of run time, storage and parameter of approximation ratio, and the absolute error. While it outperforms other existing algorithms in worst and average cases.
In the future we would like to add some more tweaks to the proposed algorithm to improve it in term of optimality and apply on other NP-complete problems as such as graph coloring, maximum clique etc.