1 Introduction

Thanks to the advancement of technologies such as the Internet and database management systems, datasets have been growing tremendously over the past decade. Many of the resulting datasets can be modeled as graphs, such as social networks, brain networks, and street networks. Therefore, it is essential to develop algorithms to solve classical combinatorial problems on giant graphs (with no less than 100,000 vertices).

A vertex cover (VC) on an undirected graph \(G=\langle V, E \rangle \) is defined as a set of vertices \(S \subseteq V\) such that every edge in E has at least one of its endpoint vertices in S. A minimum VC (MVC) is a VC on \(G\) of minimum size (cardinality), i.e., there exists no VC whose size is smaller than that of an MVC. The MVC problem is to find an MVC on a given graph \(G\). Its decision version is known to be NP-complete [18]. An independent set (IS) on \(G\) is a set of vertices \(T \subseteq V\) such that no two vertices in \(T\) are adjacent to each other. The complement of a (maximum) IS is a (minimum) VC and vice versa, i.e., for any (maximum) IS \(T\), \(V\setminus T\) is always a (minimum) VC.

The MVC problem has been widely used to study various real-world and theoretical problems. For example, in practice, it has been used in computer network security [11], in crew scheduling [24], and in the construction of phylogenetic trees [1]. In theoretical research, it has been used to prove the NP-completeness of various other well-known problems, such as the set cover problem and the dominating set problem [19]. It is also a fundamental problem studied in the theory of fixed-parameter tractability [13].

Various researchers have developed exact solvers [10, 21, 27, 29] for the MVC problem and its equivalents. However, none of these solvers work well for large problem instances of the MVC problem due to its NP-hardness. Furthermore, solving the MVC problem within any approximation factor smaller than 1.3606 is also NP-hard [8].

To overcome the poor efficiency of exact algorithms and the high approximation factor of polynomial-time approximation algorithms, researchers have focused on developing non-exact local search algorithms [2, 5, 6, 22] for solving the MVC problem and its equivalents. These algorithms often require a preprocessing step to construct a VC (usually the smaller the better) before starting the local search. While polynomial-time procedures work well for the preprocessing step on regular-sized graphs, they are prohibitively expensive on giant graphs. On giant graphs, this preprocessing step needs to terminate fast and should use only a moderate amount of memory. Therefore, it is important to develop a linear-time-and-space algorithm to find a small VC.

In addition, many real-world applications on giant graphs require the identification of small VCs but not necessarily MVCs. One example of such applications is the influence-maximization problem in social networks [14]. Here, too, linear-time-and-space algorithms for finding small VCs are important.

In this paper, we develop a new linear-time-and-space algorithm, called MVC-WP, for solving the MVC problem on giant graphs based on the idea of warning propagation, which has so far only been used as a theoretical tool for studying properties of MVCs on infinite random graphs. We then empirically show that MVC-WP has several advantages over other linear-time-and-space algorithms. We also experiment with variants of MVC-WP to empirically demonstrate the usefulness of various steps in it.

2 Background

In this section, we introduce relevant background on random graph models, warning propagation, and existing linear-time-and-space MVC algorithms known to the authors.

2.1 Random Graph Models

The Erdős-Rényi Model. An Erdős-Rényi model (ER model) [9] is characterized by two parameters \(n\) and \(p\). It generates random graphs with \(n\) vertices and connects every pair of vertices with probability \(p\). We call a graph generated by an ER model an ER graph. The degrees of the vertices of an ER graph follow a Poisson distribution. The average degree of vertices is \(c= np\).

The Scale-Free Model. A scale-free model (SF model) [4] is characterized by two parameters \(n\) and \(\lambda >2\). It generates random graphs whose vertex degree distribution follows a power law, i.e., \(P(d)\sim d^{-\lambda }\). The average degree of vertices is therefore

$$\begin{aligned} c=\sum _{d=1}^{+\infty } P(d)d=\frac{\zeta (\lambda -1)}{\zeta (\lambda )}, \end{aligned}$$
(1)

where \(\zeta (x) = \sum _{k=1}^{\infty }\frac{1}{k^x}\) is the Riemann zeta function. For notational convenience, we define \(Z(\lambda )=\frac{\zeta (\lambda -1)}{\zeta (\lambda )}\). We call a graph generated by an SF model an SF graph.

Fig. 1.
figure 1

Illustrates the update of a message from \(u \in V\) to \(v \in V\) in the warning propagation algorithm for the MVC problem on graph \(G=\langle V, E\rangle \). Only relevant parts of \(G\) are shown, i.e., \(u\), \(v\), and all edges incident to \(u\).

2.2 Warning Propagation

The warning propagation algorithm is a specialized message passing algorithm where information is processed locally and exchanged between relevant variables [20]. In the warning propagation algorithm, messages can only take one of two values, namely \(0\) or \(1\). To analyze properties of MVCs on infinite random graphs, [26] proposed an algorithm that uses warning propagation for solving the MVC problem to help with their theoretical analysis. In their algorithm, messages are passed between adjacent vertices. A message of \(1\) from \(u \in V\) to \(v \in V\) indicates that \(u\) is not in the MVC and thus it “warns” \(v\) to be included in the MVC. Otherwise, if \(u\) is in the MVC, this message would be \(0\). Based on this intuition, the warning propagation algorithm updates messages according to the following rules: A message from \(u\) to \(v\) is updated to \(1\) iff all incoming messages to \(u\) from its other neighbors equal \(0\), i.e., no other adjacent vertices of \(u\) require \(u\) to be in the VC. Otherwise, this message would be \(0\). Figure 1 illustrates these rules. Upon convergence, vertices with at least one incoming messages equal to 1 are included in the VC, and other vertices are excluded from the VC. The theoretical analysis in [26] mainly focuses on ER graphs. It shows that, on an infinitely large ER graph, a message is 1 with probability \(W(c)/c\), where \(W(\cdot )\) is the Lambert-W function, i.e., the inverse function of \(f(x)=xe^x\).

2.3 Known Linear-Time-and-Space MVC Algorithms

MVC-2. This well-known linear-time-and-space factor-2 approximation algorithm for the MVC problem works as follows [25]: In each iteration, MVC-2 first arbitrarily selects an uncovered edge, then marks it as well as the edges incident to its two endpoint vertices as being covered, and finally adds its endpoint vertices to the VC. It terminates when all edges are marked as covered.

ConstructVC. Serving as a preprocessing step, this algorithm is a greedy linear-time-and-space subroutine in the FastVC solver [5], that constructs a minimal VCFootnote 1. It works as follows: In each iteration, ConstructVC first arbitrarily selects an uncovered edge, then adds its endpoint vertex \(v\) with the larger degree to the VC, and finally marks all edges incident to \(v\) as being covered. When all edges are marked as covered, it removes all redundant vertices in the VC to construct a minimal VC.

R. This algorithm is used as the preprocessing step to produce a maximal IS (complement of a minimal VC) in the local search algorithm for solving the maximum IS problem developed by [2]. R can be easily adjusted to produce a minimal VC, and the adapted algorithm works as follows: R first adds all vertices into the VC. In each iteration, R randomly removes a vertex \(v\) from the VC if it continues to be a VC after the removal. It terminates when the VC is minimal.

MVC-MPL and MVC-L. MVC-MPL is a linear-time-and-space MVC algorithm based on some theoretical results of warning propagation on ER graphs. It works as follows [28]: In each iteration, MVC-MPL first arbitrarily selects a vertex \(v\), then adds it to the IS with probability \({(1-W(c)/c)}^{\kappa (v)}\), where \(\kappa (v)\) is the degree of \(v\), and otherwise to the VC. It terminates when every vertex has been added to either the VC or the IS. MVC-L is a variant of MVC-MPL with the probability of adding a vertex \(v\) to the IS replaced by \(1/(\kappa (v)+1)\) [28].

3 Warning Propagation on Scale-Free Graphs

Assuming that the warning propagation algorithm is applied on an SF graph, we derive the approximate message distribution upon convergence by following a method similar to that in [26, Sect. IV.B]. We use \(p_0\) and \(p_1\) to denote the fractions of all messages with values 0 and 1 upon convergence, respectively. Clearly, we have

$$\begin{aligned} p_0 + p_1 =1. \end{aligned}$$
(2)

A message \(m_{u\rightarrow v}\) from vertex \(u\) to vertex \(v\) is equal to 1 iff all incoming messages to \(u\) from its other neighbors are equal to 0, i.e., \(\forall w \in \partial u \setminus v: m_{w\rightarrow u}=0\), where \(\partial u\) is the set of vertices adjacent to \(u\). Assuming that all messages incoming to \(u\) are independent and using the fact that the probability distribution of the number of such messages follows a power law on an SF graph, we have

(3)

where is the polylogarithm function. After making the approximation , we solve Eq. (3) for \(p_0\) and have

$$\begin{aligned} p_0=\frac{\zeta (\lambda )-1}{\zeta (\lambda )+\frac{1}{2^{\lambda }}}, \end{aligned}$$
(4)

where \(\forall \lambda > 2: 0\le p_0\le 1\). Therefore, for any \(\lambda >2\), Eq. (4) is always a valid solution for \(p_0\).

4 The Algorithm

Our algorithm MVC-WP (Algorithm 1) is based on the analytical results that govern the warning propagation algorithm for the MVC problem [26]. MVC-WP first uses Algorithm 2, an algorithm that prunes leaves, to identify those vertices that are necessarily in some MVC and modifies the input graph accordingly. It then treats this modified graph as if it were an ER or SF graph and computes \(p_0\) using Algorithm 3. (Although MVC-WP treats the graph as if it were an ER or SF graph, it does not impose any restrictions on the graph.) MVC-WP then assigns each message from vertex \(u\) to vertex \(v\) to be 1 with probability \(p_0^{\kappa (u)-1}\), where \(\kappa (u)\) denotes the degree of \(u\). This is done under the assumption that all incoming messages of \(u\) have independent probabilities to be 0 or 1. Then, MVC-WP performs warning propagation for \(M\) iterations, where \(M\) is a given parameter. After \(M\) iterations, \(v\) is marked as being included in \(VC\) if it receives at least one message of 1; otherwise, \(v\) is marked as being excluded in \(VC\). If \(v\) is excluded, MVC-WP marks all its adjacent vertices as being included in \(VC\). Finally, MVC-WP uses Algorithm 4 to remove redundant vertices from \(VC\) to make it a minimal VC. This step is adapted from Lines 6 to 14 of Algorithm 2 in [5].

figure a
figure b
figure c

We note that, a warning propagation iteration in the warning propagation algorithm proposed in [26] is not linear-time due to the requirement of traversing incoming messages of vertex \(u\) when updating the message from vertex \(u\) to vertex \(v\). To avoid this traversal and thus make each warning propagation iteration linear-time, for each vertex \(v\), MVC-WP keeps track the number of messages incoming to \(v\) that are equal to 1 in an array \(counter\). This and the value of the message from \(u\) to \(v\) provide enough information for updating the message.

We also note that, while MVC-WP is based on the analytical results from [26], it differs significantly from the warning propagation algorithm proposed in [26]. MVC-WP introduces preprocessing and postprocessing steps before and after warning propagation iterations. It also initializes messages intelligently. In addition, MVC-WP reduces the time complexity of a warning propagation iteration to linear by using a \(counter\) array. Most importantly, MVC-WP is specifically designed for being practically run, while the warning propagation algorithm proposed in [26] lacks many algorithmic details, since [26] only uses it as a theoretical tool to study properties of MVCs on ER graphs.

We now formally prove the correctness and time and space complexities of MVC-WP.

Theorem 1

MVC-WP produces a minimal VC.

Proof

Since [5] has proved that produces a minimal VC provided that variable \(VC\) in Algorithm 1 is a VC, it is sufficient to prove that, right before Line 34 in Algorithm 1, variable \(IS\) is an IS, \(VC\cup IS=V\), and \(VC\cap IS=\emptyset \).

In Algorithm 2, Lines 12 and 14 are the only steps that remove edges. However, these edges are covered by \(VC\) as shown on Line 9. In addition, \(VC\cup IS\) is the set of all removed vertices and \(VC\cap IS=\emptyset \), since each removed vertex is added to either \(VC\) or \(IS\). Therefore, \(IS\) is an independent set.

In Algorithm 1, message initialization and the \(M\) iterations of warning propagation do not change the values of \(IS\) and \(VC\).

In Lines 27 and 33 in Algorithm 1, since Line 31 guarantees that no two adjacent vertices are added to \(IS\), \(IS\) must be an IS of \(G\). In addition, Line 28 guarantees \(IS \cup VC = V\) and Lines 28, 31 and 33 guarantee \(IS\cap VC=\emptyset \).

Therefore, this theorem is true.

Theorem 2

The time complexity of MVC-WP is \(\mathcal O(|V|+|E|)\).

Proof

We first prove that terminates in \(\mathcal O(|V|+|E|)\) time by counting the number of times that is called, since the only loop in makes only one recursive call in each iteration. Line 4 in Algorithm 2 calls at most \(|V|\) times. Line 15 calls iff edge \((u,w)\) is removed from \(G\). Therefore, Line 15 calls at most \(|E|\) times.

Obviously, terminates in constant time.

In Algorithm 1, Lines 8 to 15 iterate over each edge in \(G'\) exactly once, and therefore terminate in \(\mathcal O(|E|)\) time; Lines 16 to 26 iterate over each edge in \(G'\) exactly \(M\) times, and therefore terminate in \(\mathcal O(|E|)\) time; Lines 27 to 33 consider each vertex \(v\) in \(G'\) at least once and at most \(\kappa (v)\) times, and therefore terminate in \(\mathcal O(|V|+|E|)\) time.

[5] has proved that terminates in \(\mathcal O(|V|+|E|)\) time.

Combining the results above, MVC-WP terminates in \(\mathcal O(|V|+|E|)\) time.

Theorem 3

The space complexity of MVC-WP is \(\mathcal O(|V|+|E|)\).

Proof

[5] has proved that uses \(\mathcal O(|V|+|E|)\) space. The recursive calls of initiated in use \(\mathcal O(|E|)\) stack space. The remaining steps in MVC-WP require \(\mathcal O(|E|)\) space to store messages and \(\mathcal O(|V|)\) space to store \(counter\) as well as the status of each vertex \(v\), i.e., whether \(v\) is in \(VC\), \(IS\) or undetermined yet. Therefore, MVC-MP uses \(\mathcal O(|V|+|E|)\) space.

figure d

4.1 Computing Special Functions

In Algorithm 3, we are required to compute a few special functions, namely the Lambert-W function \(W(\cdot )\), the Riemann zeta function \(\zeta (\cdot )\) and the inverse function of \(Z(\cdot )\). For some of these functions, researchers in the mathematics community have already developed various numerical methods [7, 16]. However, they are too slow for MVC-WP, which does not critically need this high accuracy. We now present a few new approaches to quickly compute them sufficiently accurately.

Table 1. Shows the values of \(\zeta (k)\) and \(Z(k)=\frac{\zeta (k-1)}{\zeta (k)}\) for \(k\in \{1,2,\ldots ,9\}\). The values of \(\zeta (k)\) are taken from [15, Table 23.3], and the values of \(Z(k)\) are computed from the values of \(\zeta (k)\).

4.2 The Lambert-W Function \(W(\cdot )\)

We approximate \(W(\cdot )\) via the first 3 terms of Eq. (4.19) in [7], i.e.,

$$\begin{aligned} W(c)= L_1-L_2+L_2/L_1+\mathcal O\left( {(L_2/L_1)}^2\right) , \end{aligned}$$
(5)

where \(L_1=\log c\) and \(L_2=\log L_1\).

4.3 The Riemann Zeta Function \(\zeta (\cdot )\)

For the SF model, we need to compute \(\zeta (\lambda )\) in Eq. 4 for a given \(\lambda \). To compute \(\zeta (\lambda )\), we approximate \(\zeta (\lambda )\) via its first 20 terms, i.e., \(\zeta (\lambda )=\sum _{k=1}^{20}\frac{1}{k^{\lambda }} \mathcal + O(\frac{1}{21^{\lambda }})\). This is sufficient, because \(\lambda > 2\) always holds in MVC-WP due to Line 6 in Algorithm 3 since \(\forall c \ge 1: Z^{-1}(c) > 2\). In this case, the sum of the remaining terms is sufficiently small and can thus be neglected, because

$$\begin{aligned} \frac{\sum _{k=21}^{\infty }\frac{1}{k^{\lambda }}}{\sum _{k=1}^{\infty }\frac{1}{k^{\lambda }}} \le \frac{\sum _{k=21}^{\infty }\frac{1}{k^{\lambda }}}{\sum _{k=1}^{\infty }\frac{1}{k^2}}\approx 0.030. \end{aligned}$$
(6)

4.4 The Inverse Function of \(Z(\cdot )\)

  • For any \(x < 1.002\), we approximate \(Z^{-1}(x)\) to be equal to \(+\infty \) (and thus approximate \(p_0\) to be equal to \(0\) in Algorithm 3).

  • For any \(1.002\le x \le 1.369\), we approximate \(Z^{-1}(x)\) via linear interpolation according to Table 1, i.e., we assume \(Z^{-1}(x)\) changes linearly between two consecutive entries given in Table 1.

  • For any \(x> 1.369\), we have \(2< k = Z^{-1}(x) < 3\). In this case, we approximate \(\zeta (k)\) via linear interpolation, i.e.,

    $$\begin{aligned} \zeta (k)\approx 1.645 - 0.443 \cdot (k-2). \end{aligned}$$
    (7)

    We approximate \(\zeta (k-1)\) via the first three terms of the Laurent series of \(\zeta (k-1)\) at \(k=2\), i.e.,

    $$\begin{aligned} \zeta (k-1)=\frac{1}{k-2}+\gamma -\gamma _1(k-2)+\mathcal O\left( {(k-2)}^2 \right) , \end{aligned}$$
    (8)

    where \(\gamma \approx 0.577\) is the Euler-Mascheroni constant and \(\gamma _1 \approx -0.0728\) is the first Stieltjes constant [12, p. 166]. By plugging these two equations into the definition of \(Z(k)\) (i.e., \(Z(k)=\frac{\zeta (k-1)}{\zeta (k)}=x\)) and solving for \(k\), we have the approximation

    $$\begin{aligned} Z^{-1}(x)\approx \frac{1.645 x - \gamma - \sqrt{{(1.645 x - \gamma )}^2 - 4 (0.443x - \gamma _1)}}{2 \cdot (0.443 x - \gamma _1)}+2. \end{aligned}$$
    (9)
Table 2. Compares sizes of VCs produced by MVC-WP-ER and MVC-WP-SF, respectively, with those of alternative algorithms. The three numbers in the 3rd to 6th columns represent the numbers of benchmark instances on which MVC-WP-ER and MVC-WP-SF produce smaller/equal/larger VC sizes, respectively. The numbers in parentheses indicate the number of benchmark instances in each benchmark instance set.
Fig. 2.
figure 2

Compares sizes of VCs produced by MVC-WP-ER, MVC-WP-SF, and alternative algorithms on the misc networks benchmark instance set. The x-axes show the relative suboptimality of MVC-WP-ER and MVC-WP-SF, respectively, compared with alternative algorithms. The y-axes show the number of benchmark instances for a range of relative suboptimality divided into bins of 1% (ranges beyond −10% and 10% are treated as single bins). Bars of different colors indicate different algorithms. Higher bars in the left half indicate that MVC-WP-ER and MVC-WP-SF, respectively, produce VCs of sizes smaller than the alternative algorithms. (Color figure online)

Table 3. Shows the number of vertices and edges of benchmark instances in the web networks, street networks, and brain networks benchmark instance sets.
Fig. 3.
figure 3

Compares sizes of VCs produced by MVC-WP-ER and MVC-WP-SF with those produced by MVC-WP-1. The x-axis shows the relative suboptimality of MVC-WP compared with MVC-WP-1. The y-axis shows the number of benchmark instances. In the left half, for each point on the curve, its y coordinate shows the number of benchmark instances with relative suboptimality smaller than its x coordinate. In the right half, for each point on the curve, its y coordinate shows the number of benchmark instances with relative suboptimality larger than its x coordinate. Larger areas under the curves in the left half and smaller areas under the curves in the right half indicate that MVC-WP-ER and MVC-WP-SF, respectively, produce VCs of sizes smaller than MVC-WP-1.

Table 4. Compares sizes of VCs produced by MVC-WP-ER, MVC-WP-SF, and alternative algorithms on the web networks, street networks, and brain networks benchmark instance sets. The numbers of vertex and edge of each benchmark instance are shown in Table 3. The smallest sizes of VCs produced for each benchmark instance are highlighted.
Fig. 4.
figure 4

Compares sizes of VCs produced by MVC-WP-ER and MVC-WP-SF for different values of \(M\) on the misc networks benchmark instance set.

5 Experimental Evaluation

In this section, we experimentally evaluate MVC-WP. In our experiments, all algorithms were implemented in C++, compiled by GCC 6.3.0 with the “-O3” option, and run on a GNU/Linux workstation with an Intel Xeon Processor E3-1240 v3 (8 MB Cache, 3.4 GHz) and 16 GB RAM. Throughout this section, we refer to MVC-WP using an ER model and an SF model as MVC-WP-ER and MVC-WP-SF, respectively.

We used 4 sets of benchmark instancesFootnote 2. The first 3 sets of benchmark instances were selected from the “misc networks”, “web networks”, and “brain networks” categories in Network RepositoryFootnote 3 [23]. All instances with no less than 100,000 vertices as of July 8, 2017 were used. The fourth set of benchmark instances consists of the benchmark instances in the “street networks” category in the 10th DIMACS Implementation ChallengeFootnote 4 [3], in which 7 out of 8 benchmark instances have more than 1 million vertices. To obviate the influence of the orders in which the edges are specified in the input files, we shuffled the edges for each benchmark instance before applying the algorithms.

To evaluate those algorithms that use random number generators, i.e., MVC-WP-ER, MVC-WP-SF, R, MVC-L and MVC-MPL, we ran them 10 times on each benchmark instance using different seeds. We recorded the average of the VC sizes produced by these 10 runs. For all algorithms compared in this section, we applied and as preprocessing and postprocessing steps, respectively, since they are universally useful.

We evaluated MVC-WP-ER and MVC-WP-SF by comparing them with various other algorithms, namely ConstructVC, MVC-2, R, MVC-MPL, and MVC-L. We set \(M=3\) for both MVC-WP-ER and MVC-WP-SF, noting that \(M=3\) is a very small number of iterations of warning propagation.

Tables 2 and 4 and Fig. 2 compare these algorithms. In the misc networks and web networks benchmark instance sets, both MVC-WP-ER and MVC-WP-SF outperformed all other algorithms in terms of sizes of produced VCs. In the brain networks benchmark instance set, both MVC-WP-ER and MVC-WP-SF outperformed all other algorithms except ConstructVC. In the street networks benchmark instance set, both MVC-WP-ER and MVC-WP-SF outperformed all other algorithms except for MVC-MPL. The reason may be that street networks are always planar and thus in general cannot be well modeled as ER or SF graphs. Overall, MVC-WP-ER and MVC-WP-SF conclusively outperformed their competitors. We also conducted further experiments to demonstrate the usefulness of various individual steps of MVC-WP-ER and MVC-WP-SF.

To demonstrate the effectiveness of the message initialization step in MVC-WP-ER and MVC-WP-SF, i.e., assigning messages to be zero with probability \(p_0\) computed from random graph models, we compared MVC-WP-ER and MVC-WP-SF with variants thereof in which \(p_0\) is always set to 1 in order to mimic the message initialization in the standard warning propagation algorithm [20]. We refer to this variant as MVC-WP-1.

Figure 3 compares MVC-WP-ER and MVC-WP-SF with MVC-WP-1 on the misc networks benchmark instance set. Both MVC-WP-ER and MVC-WP-SF significantly outperformed MVC-WP-1 in terms of sizes of produced VCs. These results demonstrate the importance of our message initialization step.

To study the effect of \(M\) on MVC-WP-ER and MVC-WP-SF, we ran them for different values of \(M\). For both MVC-WP-ER and MVC-WP-SF with \(M\in \{0,1,\ldots ,5\}\), Fig. 4 shows the sizes of the VC averaged over all benchmark instances in the misc networks benchmark instance set. The average VC size decreases with increasing \(M\). The results demonstrate the usefulness of warning propagation iterations in MVC-WP-ER and MVC-WP-SF.

To demonstrate the effectiveness of Algorithm 2, we compared MVC-WP-ER and MVC-WP-SF with and without the use of it on the web networks benchmark instance set. MVC-WP-ER and MVC-WP-SF produced VCs of sizes that are on average 0.51% and 1.0% smaller than their counterparts without the use of Algorithm 2. These results demonstrate the importance of Algorithm 2.

Due to the fact that all algorithms are linear-time, all of them terminated very quickly. Despite that MVC-WP-ER and MWVC-WP-SF are slower than alternative algorithms, over 80% of their runs terminated within 300ms, which makes it difficult to measure the algorithms’ running times on a single benchmark instance. In addition, it took much longer time (a few hundred times longer) to read input files from the hard disk than running these algorithms, which makes it difficult to reliably count the numbers of benchmark instances solved within a certain amount of time. For these reasons, it is difficult to have reliable comparisons of running times of all algorithms. Therefore, we skip the detailed comparison here, while this may be an interesting future work.

Table 5. Compares sizes of MVCs and produced VCs by ConstructVC, MVC-2, MVC-R, MVC-L, MVC-MPL, MVC-WP-ER, and MVC-WP-SF, respectively, on benchmark instances with solutions from the Second DIMACS Implementation Challenge.

It is also interesting to compare the VCs produced by these linear-time-and-space algorithms with the sizes of MVCs. Since the MVC problem is NP-hard, it is elusive to find MVCs on the giant graphs in our previous used benchmark instances. Therefore, we ran all algorithms on the benchmark instances with provided solutions from the Second DIMACS Implementation ChallengeFootnote 5 [17]. Since the given solutions are for the maximum clique problem, we ran all algorithms on the complements of the graphs in these benchmark instances, since the maximum clique problem on a graph is equivalent to the MVC problem on the complement of the graph. The solutions are shown in Table 5. From the table, we see that all linear-time-and-space algorithms produced VCs of similar results. We also see that, the produced VCs have sizes very close to the sizes of MVCs on all benchmark instances except hamming6-2 and hamming10-2.

6 Conclusions and Future Work

We developed MVC-WP, a warning propagation-based linear-time-and-space algorithm that finds small minimal VCs for giant graphs. We empirically showed that MVC-WP outperforms several other linear-time-and-space algorithms in terms of sizes of produced VCs. We also empirically showed that the theoretical underpinnings of MVC-WP significantly contribute to its success. These include both the way in which MVC-WP performs message initialization by computing \(p_0\) and the iterations of warning propagation. We also made secondary contributions in computing various special functions efficiently with numerical accuracy sufficient for many AI applications. Future directions include applying similar techniques to solving other fundamental combinatorial problems on giant graphs.