Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

Received August 29, 2020, accepted September 18, 2020, date of publication October 1, 2020, date of current version

October 13, 2020.


Digital Object Identifier 10.1109/ACCESS.2020.3028112

NK-MaxClique and MMCQ: Tow New Exact


Branch and Bound Algorithms for
the Maximum Clique Problem
NEDA MOHAMMADI AND MEHDI KADIVAR
Department of Computer Sciences, Shahrekord University, Shahrekord 8818634141, Iran
Corresponding author: Mehdi Kadivar (m_kadivar@aut.ac.ir)

ABSTRACT The maximum clique problem (MCP) is a fundamental problem in combinatorial optimization
which finds important applications in real-word. This paper describes two new efficient branch-and-bound
maximum clique algorithms NK-MaxClique and MMCQ, designed for solving MCP. We define some prun-
ing conditions based on core numbers and vertex ordering to efficiently remove many of the search space.
With respect to this ordering, the algorithms consider the vertices respectively to find the corresponding
maximum clique in subproblems. Simulation results demonstrate that the algorithms outperform the previous
well-known algorithms for many instances when applied to DIMACS benchmark and random graphs.

INDEX TERMS Branch and bound algorithms, complexity, core number, maximum clique.

I. INTRODUCTION determine the lower and upper bounds and their branching
Let G = (V , E) be a undirected graph, where V = strategies. To estimate the upper bound of the maximum
{v1 , v2 , · · · , vn } is the set of vertices and E ⊆ V × V is clique, graph coloring techniques are used. The reason is that
the set of its edges. Two vertices are said to be adjacent if a graph G can be colored with k colors, then the number
if they are connected by an edge. A clique of G is a set of vertices in a maximum clique in G is smaller or equal
of vertices, any two of which are adjacent. The maximum to k. However, coloring is an NP-hard problem and may
clique problem (MCP) is the problem of finding the clique be also time consuming, and therefore fast greedy coloring
with the largest number of vertices in G. The MCP has a heuristic algorithms must be used (e.g. DSATUR algorithm in
wide range of practical applications in numerous fields such [16]). An early classic B&B algorithm (denoted by BT) which
as, in computer vision [1], robotics [2], bioinformatics [3], employs DSATUR algorithm for finding maximum cliques
computational biology [4], coding theory [5], social network can be find in [15]. Tomita et al. in [17] presented the MCQ
analysis [6] and scheduling [7]. algorithm that used the coloring of the subgraph induced by
The MCP is an NP-hard problem [11] and also is hard to the candidate set to provide a bound on the number of vertices
approximate [12]. So the optimal solutions cannot be reached in a maximum clique and serve a branching strategy. The
within a reasonable time and therefore various heuristic MCR [18] improved MCQ with another sorting of vertices
and metaheuristic algorithms have been devised to provide of the input graph G. The coloring and sorting procedure of
approximate solutions as good as possible to large problems MCQ is further improved in the MaxCliqueDyn algorithm
within an acceptable time. In [8] a survey of these algorithms presented by Konc et al. in [19]. In MaxCliqueDyn, before
for MCP is presented. In [13] a polynomial-time algorithm coloring of the vertices, these vertices may be re-ordered non-
with an approximation guarantee of O(n(log log n)2 /(log n)3 ) increasingly with respect to their degrees. This process may
is presented. reduce the number of used colors. The ColorSort algorithm
The exact methods to solve MCP are designed based on was first described in [19] and used a pruning color threshold
the general branch-and-bound (B&B) technique. These meth- that vertices with color number less than that will be cut in the
ods differ from each other by their specific techniques to pruning step. The MCS [21] algorithm improved the greedy
coloring procedure of MCQ algorithm, by using a recolor-
The associate editor coordinating the review of this manuscript and ing strategy. Integrating this strategy in a bit string frame-
approving it for publication was Dongxiao Yu . work, lead us to an improved bit parallel exact algorithm

This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 License.


VOLUME 8, 2020 For more information, see https://creativecommons.org/licenses/by-nc-nd/4.0/ 180045
N. Mohammadi, M. Kadivar: NK-MaxClique and MMCQ: Tow New Exact Branch and Bound Algorithms

presented by Segundo et al. in [22]. Ostergard in [14] pro- The size of the maximum clique ω(G) of a given graph G is
posed an iterative algorithm, known as Cliquer algorithm, known as the clique number of the graph. Let 1(G) and χ(G)
which uses a basic idea similar to dynamic programming. denote the maximum degree and the chromatic number of G,
Li et al. in [29] computed tighter bounds for the number respectively. Obviously, ω(G) ≤ χ (G) ≤ 1(G) + 1.
of vertices in a maximum clique by reducing each colored Definition 1: Let G = (V , E) be a graph and W ⊆ V .
subproblem to maximum satisfiability problem(MaxSAT). A subgraph Hk = G[W ] is a k-core or a core of order k if and
Based on this idea Segundo et al. in [28] presented an effi- only if Hk is the maximal subgraph of G that all its vertices
cient way to compute related infra-chromatic upper bounds have degree at least k, i.e. ∀u ∈ W , degHk (u) ≥ k. The core
at each step of the search with no MaxSAT encoding. number of vertex u in G, denoted by core(u), is the highest
Segundo et al. in [20], proposed an exact bit-parallel algo- order of a core that contains u [10].
rithm, called BB-MaxClique, for the MCP. BB-MaxClique An O(|E|) time algorithm, which we call Core-algorithm,
uses an improved approximate coloring procedure which is presented in [9] to determine the core numbers of vertices
relies on a new implicit global degree branching rule to of G = (V , E). In this algorithm, the core number of a vertex
obtain tighter upper bounds to the candidate set. Moreover, u is degG (u) if it is a vertex with minimum degree in G.
BBMCL [23] improves BB-MaxClique using a selective Then all edges (u, v) which degG (u) < degG (v) are removed.
coloring scheme. PMC [24], [25] and FMC [26] use an This process is iteratively done on G until the core number
adjacency list representation of the network and unroll the of all the vertices are computed. We refer to K|V |×|V | as the
first level of the search tree to enforce early pruning. FMC core-matrix of G in which Kuv = 1 for u, v ∈ V , if v ∈
employs several pruning filters for branching and uses the N (u) and the core number of u is computed before the core
degree of the vertices to compute the bounds. PMC employs number of v by Core-algorithm. The Core-matrix algorithm
core numbers to estimate the bounds. Segundo et al. in compute the core number of vertices and core-matrix K (see
[27] designed BBMCSP for large and massive sparse graphs Algorithm 3 in the Appendix).
using a novel sparse encoding for the adjacency matrix. Like For each u ∈ V , we define NK (u) = {u} ∪ {v | Kuv = 1}.
PMC, in BBMCSP core numbers and coloring techniques are Clearly, for each v ∈ NK (u) we have core(v) ≥ core(u).
used to estimate the bounds. Verma et al. introduced scale Computation of NK (u) takes only O(1) time. Since K is
reduction algorithms for large and low-density graphs which computed at the same time with the core numbers in the
are based on clique relaxations such as k-community and Core-matrix algorithm, computation of it takes no additional
k-core to find the maximum cliques and vertex colorings [34]. times. Therefore NK (u) as a row of K is provided in a constant
Li et al. in [35] presented a branch and bound algorithm, time.
called IncMC2, which uses graph coloring and MaxSAT rea- Note: let u1 , u2 , · · · , un be any vertex-ordering of these
soning. Kanazawa et al. proposed an FPGA-based accelerator vertices and the set S(ui ) = N [ui ] ∩ {ui , ui+1 , · · · , un } where
to solve partial MaxSAT-encoded maximum clique problems 1 ≤ i ≤ n. The set S(ui ) are used as search area to
[32]. Belachew et al. introduced a continuous formulation find the maximum clique including ui in [36]–[38]. If the
of the MCP based on the symmetric rank-one non-negative vertices are sorted in the degeneracy ordering computed by
approximation of a given matrix and showed that stationary the Core-matrix algorithm, then NK (ui ) = S(ui ). Since S(ui )
points of the formulation are correspond to cliques of a given and NK (ui ) are computed in O(n + m) [36] and O(1) time
graph and vice versa [33]. Recently, Hungerford et al. devel- respectively, NK (ui ) is preferred to use as search area.
oped a general regularization-based continuous optimization Proposition 1: The core number of elements in NK (u) is
framework for the MCP [31]. at least core(u). Therefore the members in NK (u) have the
In this paper, we define a new order on the vertices of a necessary condition (i.e. the core number of each member
given graph and employ bounds, determined based on vertex must be at least core(u)) to construct a clique of size core(u)+
core number, during search which leads a faster pruning. 1 (if it exist(s)).
Moreover, instead of neighbor set of u ∈ V , a subset of this Definition 2: We refer to the core number of u in G[N [u]]
set is searched to find a clique including u. as the local core number of u which is denoted by LCN (u).
The remaining part of the paper is structured as fol- Similarly, we refer to the core number of u in G[NK (u)] as the
lows. Section II covers notations and preliminary con- local-NK core number of u which is denoted by LCNNK (u).
cepts. Section III describes the new algorithms and finally Note that since NK (u) ⊆ N (u) we have LCNNK (u) ≤
Section IV shows the simulation results. Section V concludes LCN (u).
the paper. Lemma 1: Let K be core-matrix for a given graph G and
Q = {v1 , · · · , vt } be an arbitrary clique in G. There exist
II. BASIC CONCEPTS vi ∈ Q such that Q ⊆ NK (vi ).
We now introduce the notations used in the remainder of this Proof: Let vi be the first vertex in Q that the core number
paper. We refer to N (u) as the neighbor set of u ∈ V , and of which is computed by the Core-matrix algorithm. Since vi
N [u] = N (u) ∪ {u}. The degree of a vertex u is denoted is the first vertex in Q considered by the algorithm, no vertices
by degG (v). We refer to G[W ] as the subgraph of G that is of Q have been deleted previously and therefore Kvi vj = 1 for
induced by W ⊆ V . every vj ∈ Q. Thus {v1 · · · , vt } ⊆ NK (vi ).

180046 VOLUME 8, 2020


N. Mohammadi, M. Kadivar: NK-MaxClique and MMCQ: Tow New Exact Branch and Bound Algorithms

Corollary 1: Let Qmax be a maximum clique in G. Then Algorithm 1 The MMCQ(V 0 , LCN , C) Algorithm
Qmax ⊆ NK (u) in which u is the first vertex among elements 1: Input: vertex set V 0 ⊆ V , Local Core number set LCN ,
in Qmax that its core number is computed by the Core-matrix Color set C.
algorithm. 2: Output: A maximum clique of G[V 0 ].
The existing algorithms for the maximum clique problem 3: while V 0 6 = ∅ do
are branch-and-bound solvers which search in G[N (u)] when 4: Choose a vertex v with maximum color C(v) from V 0 .
vertex u is selected for branching. Corollary 1 shows that 5: V 0 := V 0 \ {v};
there exist(s) a vertex u such that Qmax ⊆ NK (u). Therefore, 6: if LCN (v) + 1 > |Qmax | and |Q| + C(v) > |Qmax |
instead of N (u), our algorithm searches in NK (u) to find then
Qmax . Since NK (u) ⊆ N (u), the search area of our algorithm 7: Q := Q ∪ {v};
is smaller than the search area of the others. Moreover, instead 8: if V 0 ∩ N (v) 6 = ∅ and |V 0 ∩ N (v)| + |Q| > |Qmax |
of 1(G), the local core numbers are used as a smaller bound then
for pruning. 9: C 0 = ColorSort(G[V 0 ∩ N (v)]);
We define V̄ = {v1 , v2 , · · · , vn } as the ordered vertex 10: MMCQ(V 0 ∩ N (v), LCN , C 0 );
set of a given graph G in which the vertices G are sorted 11: else
non-increasingly with respect to their LCNNK . Our algorithm 12: if (|Q| > |Qmax |) then
searches in NK (vi ) where vi is selected from V̄ in the order to 13: Qmax := Q;
find maximum clique(s). 14: end if
Proposition 2: Let u ∈ V̄ and Qumax and QuNK −max are 15: end if
maximum cliques in G[N [u]] and G[NK (u)], respectively. 16: Q := Q \ {v};
By the definition of core number we can see that |Qumax | ≤ 17: else
LCN (u) + 1 ≤ core(u) + 1 and |QuNK −max | ≤ LCNNK (u) + 18: return;
1 ≤ LCN (u) + 1 ≤ core(u) + 1. Let LCNmax = 19: end if
max{LCNNK (u) | u ∈ V }. We have ω(G) ≤ LCNmax + 1. 20: end while

III. TOW NEW MAXIMUM CLIQUE ALGORITHMS


In this section we present MMCQ and NK-MaxClique
algorithms to find a maximum clique in a given graph that there exist(s) a vertex u such that Qmax ⊆ NK (u).
G = (V , E). Therefore, instead of N (u), we can search in NK (u) to find
First we describe the MMCQ algorithm which is presented maximum clique Qmax . Since NK (u) ⊆ N (u), the search
in Algorithm 1 and is a modified version of the MCQ + area of our algorithm is smaller than the search area of the
CS algorithm [19]. Let Q be the set of vertices of current others. Moreover, instead of 1(G), the local core numbers
maximum clique. Initially, the algorithm puts Q = {u} and are used as a smaller bound for pruning. The algorithm
V 0 = NK (u). Vertices are added to Q respectively until it can computes NK (u) for vertex u and finds a maximum clique
be verified that there are no larger clique. At each step, the in G[NK (u)], and then replaces it by the current founded
vertex v ∈ NK (u) is selected with the maximum color C(v). maximum clique if its size is larger than the size of current
|Q| + C(v) is an upper bound for the number of vertices in a maximum clique. Let Qmax be the set of vertices of the
maximum clique including u and v. Moreover, proposition 2 largest clique found until now. Initially, the NK-MaxClique
indicates that LCN (v) + 1 is an other upper bound for the algorithm puts Qmax = ∅. Then it finds a maximum clique in
maximum clique including v. Therefore, if |Qmax | < |Q| + G[NK (u)] by using the MMCQ algorithm. By proposition 2
C(v) and |Qmax | < LCN (v) + 1, Q is extended to Q ∪ {v}. we can see that LCNNK (u) + 1 is an upper bound for the
Then V 0 is replaced by V 0 ∩ N (v) and this process is done number of vertices in a maximum clique in G[NK (u)]. Hence
recursively until Q could not be extended (for more details if the inequality |Qmax | ≥ LCNNK (u) + 1 hols, it is implied
see [19]). The difference between the MCQ + CS algorithm that there is no clique larger than Qmax in G[NK (u)]). Oth-
and our modified version is that inequalities erwise, the algorithm finds a maximum clique in G[NK (u)].
In the NK-MaxClique algorithm, for every u ∈ V , the
LCN (v) + 1 > |Qmax | (III-.1)
vertices of G[NK (u)] are colored and sorted by the ColorSort
and algorithm presented in [19]. The number of colors used to
color a graph is an upper bound for the clique number of
|V 0 ∩ N (v)| + |Q| > |Qmax | (III-.2)
the graph. It is known from [17] and [30] that if the ver-
are added to the condition of extension of Q as pruning tices of a graph be sorted non-increasingly with respect to
conditions. their degree, then a tighter (smaller) bound for the clique
We now illstrate the NK-MaxClique algorithm. The exist- number is obtained. Hence, in Algorithm 2, before vertex
ing algorithms for the maximum clique problem are branch- coloring, the vertices in G[NK (u)] are sorted. The above
and-bound solvers which search in G[N (u)] when vertex u descriptions lead us to the algorithm which is introduced
is selected for branching. In Corollary 1 we have shown in Algorithm 2.

VOLUME 8, 2020 180047


N. Mohammadi, M. Kadivar: NK-MaxClique and MMCQ: Tow New Exact Branch and Bound Algorithms

TABLE 1. CPU times and number of steps (recursive procedure calls) for DIMACS benchmark graphs. ω is the clique number, 1G is the maximum degree
and LCNmax is maximum local-NK core number in G. The best times and minimum number of steps for each row are written in bold and underline style.
Bold values in columns 6, 7 and 8 indicate the best performance between MMCQ, MCQ + CS and NK-MaxClique and bold values in the last two columns
of Table 1 indicate the priority of the MaxCliqueDyn or NK- MaxCliqueDyn algorithms.

IV. SIMULATION RESULTS vs MaxCliqueDyn are compared. The parameter Tlimit in


This section reports experimental tests carried out to eval- MaxCliqueDyn algorithm presented in [19] is set to 0.025.
uate the performance of the new algorithms. The MMCQ, All algorithms are coded in the same programmatic style,
MCQ + CS, MaxCliqueDyn [19], NK-MaxClique and using the same graph representation and data structures,
NK-MaxCliqueDyn (see Algorithm 5 in the Appendix) so that there was no performance variation due to differences
algorithms are considered. In the previous section, in implementation details. We coded the algorithms in C++
NK-MaxClique algorithm is presented in which maximum and compiled it with gcc-5.4. We conducted the computa-
cliques are found in NK (u), u ∈ V̄ by MMCQ algorithm tional tests on a personal computer with a 2.67 GHz Intels
(see line 10 in Algorithm 2). In NK-MaxCliqueDyn algorithm Core i5 processor with 4.0 GB of memory.
MMCQ is replaced by Modified-MaxCliqueDyn algorithm Table 1 reports the output of the algorithms on DIMACS
(see Algorithm 4 in the Appendix). Similar to the MMCQ benchmark graphs and Table 3 includes the comparison of
algorithm, in the Modified-MaxCliqueDyn algorithm prun- these algorithms on random graphs.
ing conditions III-.1 and III-.2 are considered. In our sim- Table 1 compares the performance of the algorithms for
ulations, the performance of MMCQ and NK-MaxClique DIMACS graphs. With respect to the CPU time and num-
vs MCQ + CS and the performance of NK-MaxCliqueDyn ber of steps (i.e. recursive procedure calls), in most of

180048 VOLUME 8, 2020


N. Mohammadi, M. Kadivar: NK-MaxClique and MMCQ: Tow New Exact Branch and Bound Algorithms

TABLE 2. Comparing the effect of pruning condition, vertex ordering and search area reduction: S1 depicts the effect of vertex ordering and search area
reduction and S2 shows the effect of pruning condition.

these graphs (44 out of 56) NK-MaxClique outperforms NK-MaxCliqueDyn algorithms is about 36.61%, 40.59%
MCQ + CS and in 38 of 56 instances NK-MaxCliqueDyn and 33.76% smaller than MMCQ, MCQ + CS and Max-
outperforms MaxCliqueDyn. The results show that aver- CliqueDyn algorithms, respectively. The reason is that a
agely NK-MaxClique is 40.26% faster than MCQ + stronger pruning parameters is used by the NK-MaxClique
CS and it is about 36% faster than MMCQ. This and NK-MaxCliqueDyn algorithms. In the MCQ + CS and
value for NK-MaxCliqueDyn and MaxCliqueDyn is about MaxcliqueDyn algorithms 1(G) + 1 colors are used for
28.36%. The number of steps in NK-MaxClique and in coloring the input graph. Therefore, 1(G) + 1 is the upper

VOLUME 8, 2020 180049


N. Mohammadi, M. Kadivar: NK-MaxClique and MMCQ: Tow New Exact Branch and Bound Algorithms

TABLE 3. CPU times and number of steps (recursive procedure calls) for random graphs. The best times and minimum number of steps for each row are
written in bold and underline style. Bold values in columns 4 and 5 indicate the best performance between MCQ + CS and NK-MaxClique and bold values
in the last two columns of Table 3 indicate the priority of the MaxCliqueDyn or NK- MaxCliqueDyn algorithms.

bound for the maximum clique (pruning condition). Instead Algorithm 2 The NK-MaxClique(G) Algorithm
of 1(G) + 1 we use LCNNK (u) + 1, u ∈ V as the upper 1: Input: undirected graph G = (V , E).
bound for the maximum clique. Since LCNNK (u) ≤ 1(G) 2: Output: A maximum clique Qmax of G.
our pruning condition is stronger. In the c-fat family we 3: K := Core − matrix(G);
can see ω(G) = LCNmax + 1. Therefore, comparing to the 4: Qmax := ∅; Q := ∅; for every u ∈ V compute LCN (u)
other instances, the performance of the NK-MaxClique and and LCNNK (u) and order vertex set V̄ .
NK-MaxCliqueDyn algorithms is more valuable. 5: for every u ∈ V̄ in the order do
The results in Table 2 compare the effective of pruning 6: if |Qmax | < LCNNK (u) + 1 then
condition, vertex ordering and search area restriction process 7: Q := {u};
which used in the algorithms. Flag-vertex is the first vertex 8: calculate the degrees of vertices in G[NK (u)] and
that is proceed by a MCP algorithm and its corresponding sort vertices in NK (u) in a non-increasing order with
subproblem leads to a maximum clique. win − ite denotes respect to their degrees;
that a maximum clique is founded in win − iteth iteration of 9: C := ColorSort(G[NK (u)]);
the algorithms. We define S1 = |N (u)|−|NR (u)| 1
× 100 × win−ite 10: MMCQ(NK (u), LCN , C);
|N (u)|
11: Q := ∅;
in which the first term denotes the percent of normalized
12: end if
search area reduction and the second term denotes the inverse 13: end for
of win − ite. For the algorithms larger values of these two 14: retun Qmax ;
terms are preferred. NR (u) is the list of remaining neigh-
bors of vertex u in the current subproblem. Note that in
our algorithm NR (u) = NK (u). S2 denotes that how many size of maximum clique found so far. As earliest as Qmax
percent of the vertices (at the root node of the search tree) are is founded, more number of subproblems can be pruned
pruned by pruning condition used in line 6 of Algorithm 2. by the algorithms (see pruning conditions in line 6 Algo-
We consider the color number assigned by MCQ + CS and rithm 2, lines 6 and 8 in Algorithm 1). Hence smaller value of
MaxCliqueDyn algorithms to the vertices as initial coloring win − ite is preferred. Note that the value of the parameters
of the input graph (see [19]), and refer to S20 as the percent in the Table 2 are equal for MCQ + CS and MaxCliqueDyn
of the vertices that their color numbers are smaller than the and also for NK- MaxCliqueDyn and NK-MaxClique. The

180050 VOLUME 8, 2020


N. Mohammadi, M. Kadivar: NK-MaxClique and MMCQ: Tow New Exact Branch and Bound Algorithms

Algorithm 3 The Core-Matrix(G) Algorithm Algorithm 4 The Modified-MaxCliqueDyn (V 0 , LCN ,


1: Input: the graph G = (V , E). C, level) Algorithm
2: Output: the core-matrix K and the ordered vertices set V̄ . 1: Input: vertex set V 0 ⊆ V ,Local Core number set LCN ,
Order the set of vertices V in increasing order of Color set C.
their degrees; 2: Output: A maximum clique of G[V 0 ].
3: i := 1; 3: S[level] := S[level] + S[level − 1] − Sold [level];
4: V̄ = ∅; 4: Sold [level] := S[level − 1];
5: for u ∈ V in the order do 5: while V 0 6 = ∅ do
6: core(u) := deg(u); 6: Choose a vertex v with maximum color C(v) from V 0 .
7: order(u) := i; 7: V 0 := V 0 \ {v};
8: i := i + 1; 8: if LCN (v) + 1 > |Qmax | and |Q| + C(v) > |Qmax |
9: V̄ := V̄ ∪ {u}; then
10: for v ∈ N (u), where v ∈ / V̄ do 9: Q := Q ∪ {v};
11: Kuv := 1; 10: if V 0 ∩ N (v) 6 = ∅ and |V 0 ∩ N (v)| + |Q| > |Qmax |
12: if deg(v) > deg(u) then then
13: delete edge (u, v) from G; 11: if S[level]/ALL_STEPS < Tlimit then
14: reorder V accordingly; 12: calculate the degrees of vertices in G[V 0 ∩
15: end if N (v)];
16: end for 13: sort vertices in V 0 ∩ N (v) in a non-increasing
17: end for order with respect to their degrees;
14: end if
last column depicts the values of the parameters corresponded 15: C 0 = ColorSort(G[V 0 ∩ N (v)]);
to MCQ + CS and MaxCliqueDyn and the column before the 16: S[level] := S[level] + 1;
last column shows these values for NK- MaxCliqueDyn and 17: ALL_STEPS := ALL_STEPS + 1;
NK-MaxClique. 18: Modified-MaxCliqueDyn(V 0 ∩
The results show that in most cases (48 of 56 instances), the N (v), LCN , C 0 , level + 1);
algorithm with larger value of S1 has lower elapsed time. The 19: else
reason is that an algorithm with larger value of S1 whether can 20: if (|Q| > |Qmax |) then
reduce valuably the search area, or can determine the maxi- 21: Qmax := Q;
mum clique earlier than the other algorithms or both of them. 22: end if
In all instances reported in table 2, S2 > S20 which means that 23: end if
our pruning condition is stronger than this conditions used in 24: Q := Q \ {v};
the two other algorithms. 25: else
Table 3 reports average CPU times and number of steps of 26: return;
algorithms over 15 random graphs with fixed n and p, where 27: end if
28: end while
n and p denote the number of vertices and the probability
that an edge between a pair of vertices exists, respectively.
The results show that NK-MaxClique and NK- MaxClique- the new pruning parameter and search area restriction on the
Dyn are about 31.71% and 9.5% faster than MCQ + CS well-known existing algorithms.
and MaxCliqueDyn, respectively. The reason is that smaller
upper bounds for pruning is used in the NK-MaxClique and APPENDIX
NK- MaxCliqueDyn algorithms. THE CORE-MATRIX, NK-MaxCliqueDyn AND
MODIFIED-MaxCliqueDyn ALGORITHMS
V. CONCLUSION AND FUTURE WORKS In what follows we briefly describe the Core-matrix,
In this paper, we study the Maximum Clique Problem (MCP), NK-MaxCliqueDyn and Modified-MaxCliqueDyn algo-
an important problem in graph theory and real-world appli- rithms. The Core-matrix algorithm provides matrix K
cations. For MCP, we present two new Branch-and-Bound and orders the vertices of a given graph. The Modified-
exact algorithms, which employ a novel pruning bound (i.e. MaxCliqueDyn algorithm is a new version of the Max-
LCNNK ) to ignore the subproblems that can not contain larger CliqueDyn algorithm which is modified with respect to the
clique(s) than the current solution. The other advantage of the new pruning conditions III-.1 and III-.2. In the Modified-
algorithms is that they are designed to find a clique including MaxCliqueDyn algorithm, level denotes the number of
vertex u in NK (u)(⊆ N (u)), instead of N (u). The computa- branches from the root of the recursion tree to the current
tional results provided in the manuscript reveal that the new leaf. S[level] and Sold [level] denote the sum of steps which
bound and smaller search area help to improve the MCQ and the Modified-MaxCliqueDyn algorithm performs from the
MaxCliqueDyn algorithms. As a future works we will study root node up to and including the current level, and the sum

VOLUME 8, 2020 180051


N. Mohammadi, M. Kadivar: NK-MaxClique and MMCQ: Tow New Exact Branch and Bound Algorithms

Algorithm 5 The NK-MaxCliqueDyn(G) Algorithm [14] P. R. J. Östergárd, ‘‘A fast algorithm for the maximum clique
problem,’’ Discrete Appl. Math., vol. 120, nos. 1–3, pp. 197–207,
1: Input: undirected graph G = (V , E). Aug. 2002.
2: Output: A maximum clique Qmax of G. [15] L. Babel and G. Tinhofer, ‘‘A branch and bound algorithm for the
3: (K , V̄ ) := core − matrix(G);
maximum clique problem,’’ Methods Models Oper. Res., vol. 34, no. 3,
pp. 207–217, May 1990.
4: Qmax := ∅; for every u ∈ V̄ compute LCN (u) and [16] D. Brélaz, ‘‘New methods to color the vertices of a graph,’’ Commun. ACM,
LCNNK (u). vol. 22, no. 4, pp. 251–256, Apr. 1979.
[17] E. Tomita and T. Seki, ‘‘An efficient branch-and-bound algorithm for
5: for every u ∈ V̄ in the order do finding a maximum clique,’’ in Proc. Discrete Math. Theor. Comput. Sci.,
6: if |Qmax | < LCNNK (u) + 1 then vol. 2731, Jan. 2003, pp. 278–289.
[18] E. Tomita and T. Kameda, ‘‘An efficient Branch-and-bound algorithm for
7: calculate the degrees of vertices in G[NK (u)] and finding a maximum clique with computational experiments,’’ J. Global
sort vertices in NK (u) in a non-increasing order with Optim., vol. 37, no. 1, pp. 95–111, Dec. 2006.
respect to their degrees; [19] J. Konc and D. Janežič, ‘‘An improved branch and bound algorithm for
the maximum clique problem,’’ MATCH Commun. Math. Comput. Chem.,
8: C := ColorSort(G[NK (u)]); vol. 58, pp. 569–590, Jun. 2007.
9: Modified − MaxCliqueDyn(NK (u), LCN , C, 1); [20] P. San Segundo, D. Rodríguez-Losada, and A. Jiménez, ‘‘An exact
10: end if bit-parallel algorithm for the maximum clique problem,’’ Comput. Oper.
Res., vol. 38, no. 2, pp. 571–581, Feb. 2011.
11: end for [21] E. Tomita, Y. Sutani, T. Higashi, S. Takahashi, and M. Wakatsuki,
12: retun Qmax ; ‘‘A simple and faster branch-and bound algorithm for finding a maximum
clique,’’ Lect. Notes Comput. Sci., vol. 5942, pp. 191–203, Feb. 2010.
[22] P. San Segundo, F. Matia, D. Rodriguez-Losada, and M. Hernando, ‘‘An
of steps up to and including the previous level, respectively. improved bit parallel exact maximum clique algorithm,’’ Optim. Lett.,
vol. 7, no. 3, pp. 467–479, Mar. 2013.
T [level] = S[level]/ALL_STEPS where ALL_STEPS is a [23] P. San Segundo and C. Tapia, ‘‘Relaxed approximate coloring in exact max-
global counter of steps which is increased by 1 at each step imum clique search,’’ Comput. Oper. Res., vol. 44, pp. 185–192, Apr. 2014.
[24] R. A. Rossi, D. F. Gleich, A. H. Gebremedhin, and M. M. A. Patwary,
of the Modified-MaxCliqueDyn algorithm. While T [level] < ‘‘Fast maximum clique algorithms for large graphs,’’ in Proc. 23rd Int.
Tlimit , the algorithm performs the calculations of the degrees Conf. World Wide Web, 2014, pp. 365–366.
and sorting. For more details see [19]. The formal description [25] R. A. Rossi, D. F. Gleich, and A. H. Gebremedhin, ‘‘Parallel maximum
clique algorithms with applications to network analysis,’’ SIAM J. Sci.
of the Modified-MaxCliqueDyn algorithm is depicted in Comput., vol. 37, no. 5, pp. C589–C616, Jan. 2015.
Algorithm 4. The NK-MaxCliqueDyn algorithm is presented [26] B. Pattabiraman, M. M. A. Patwary, A. H. Gebremedhin, W. K. Liao,
in Algorithm 5 which uses Modified-MaxCliqueDyn as the and A. Choudhary, ‘‘Fast algorithms for the maximum clique problem on
massive sparse graphs,’’ in Proc. Int. Workshop Algorithms Models Web-
solver of its subproblems. Graph, vol. 8305, Dec. 2013, pp. 156–169.
[27] P. San Segundo, A. Lopez, and P. M. Pardalos, ‘‘A new exact maximum
REFERENCES clique algorithm for large and massive sparse graphs,’’ Comput. Oper. Res.,
vol. 66, pp. 81–94, Feb. 2016.
[1] P. San Segundo and J. Artieda, ‘‘A novel clique formulation for the [28] P. San Segundo, A. Nikolaev, and M. Batsyn, ‘‘Infra-chromatic bound for
visual feature matching problem,’’ Int. J. Speech Technol., vol. 43, no. 2, exact maximum clique search,’’ Comput. Oper. Res., vol. 64, pp. 293–303,
pp. 325–342, Sep. 2015. Dec. 2015.
[2] P. San Segundo, D. Rodríguez-Losada, F. Matía, and R. Galán, ‘‘Fast exact [29] C. M. Li and Z. Quan, ‘‘An efficient branch-and-bound algorithm based
feature based data correspondence search with an efficient bit-parallel on MaxSAT for the maximum clique problem,’’ in Proc. 24th AAAI Conf.
MCP solver,’’ Int. J. Speech Technol., vol. 32, no. 3, pp. 311–329, Artif. Intell., Jul. 2010, pp. 128–133.
Jun. 2010. [30] D. J. A. Welsh, ‘‘An upper bound for the chromatic number of a graph
[3] S. Butenko and W. E. Wilhelm, ‘‘Clique-detection models in computational and its application to timetabling problems,’’ Comput. J., vol. 10, no. 1,
biochemistry and genomics,’’ Eur. J. Oper. Res., vol. 173, no. 1, pp. 1–17, pp. 85–86, Jan. 1967.
Aug. 2006. [31] J. T. Hungerford and F. Rinaldi, ‘‘A General Regularized Continuous
[4] C. W. Art, and B. Sergiy, Clustering Challenges in Biological Networks. Formulation for the Maximum Clique Problem,’’ Math. Oper. Res., vol. 44,
Singapore: World Scientific, 2009, doi: 10.1142/6602. no. 4, pp. 1–13, Nov. 2019.
[5] T. Etzion and P. R. J. Ostergard, ‘‘Greedy and heuristic algorithms for
[32] K. Kanazawa and S. Cai, ‘‘FPGA acceleration to solve maximum
codes and colorings,’’ IEEE Trans. Inf. Theory, vol. 44, no. 1, pp. 382–388,
clique problems encoded into partial MaxSAT,’’ in Proc. IEEE 12th Int.
Jan. 1998.
Symp. Embedded Multicore/Many-Core Syst. Chip (MCSoC), Sep. 2018,
[6] T. Gschwind, S. Irnich, F. Furini, and R. W. Calvo, ‘‘Social net-
pp. 217–224.
work analysis and community detection by decomposing a graph into
[33] M. T. Belachew and N. Gillis, ‘‘Solving the maximum clique problem
relaxed cliques,’’ Univ. Mainz, Mainz, Germany, Tech. Rep. LM-2015-07,
with symmetric rank-one non-negative matrix approximation,’’ J. Optim.
Dec. 2015.
[7] O. Weide, D. Ryan, and M. Ehrgott, ‘‘An iterative approach to robust Theory Appl., vol. 173, no. 1, pp. 279–296, Apr. 2017.
[34] A. Verma, A. Buchanan, and S. Butenko, ‘‘Solving the maximum clique
and integrated aircraft routing and crew scheduling,’’ Comput. Oper. Res.,
and vertex coloring problems on very large sparse networks,’’ Informs
vol. 37, no. 5, pp. 833–844, May 2010.
[8] Q. Wu and J.-K. Hao, ‘‘A review on algorithms for maximum clique J. Comput., vol. 27, no. 1, pp. 164–177, Feb. 2015.
[35] C. M. Li, Z. Fang, H. Jiang, and K. Xu, ‘‘Incremental upper bound for
problems,’’ Eur. J. Oper. Res., vol. 242, no. 3, pp. 693–709, 2015.
[9] V. Batagelj and M. Zaversnik, ‘‘An O(m) algorithm for cores decompo- the maximum clique problem,’’ INFORMS J. Comput., vol. 30, no. 1,
sition of networks,’’ Oct. 2003, arXiv:cs/0310049. [Online]. Available: pp. 137–153, Nov. 2017.
https://arxiv.org/abs/cs/0310049 [36] A. Buchanan, J. L. Walteros, S. Butenko, and P. M. Pardalos, ‘‘Solv-
[10] S. B. Seidman, ‘‘Network structure and minimum degree,’’ Social Netw., ing maximum clique in sparse graphs: An O(nm + n2d/4 ) algorithm
vol. 5, no. 3, pp. 269–287, Sep. 1983. for d-degenerate graphs,’’ Optim. Lett., vol. 8, no. 5, pp. 1611–1617,
[11] M. R. Garey and D. S. Johnson, Computers and Intractability: A Guide Dec. 2013.
to the Theory of NP-Completeness. New York, NY, USA: W. H. Freeman, [37] G. Manoussakis, ‘‘A new decomposition technique for maximal clique
1979. enumeration for sparse graphs,’’ Theor. Comput. Sci., vol. 770, pp. 25–33,
[12] J. Hastad, ‘‘Clique is hard to approximate within,’’ Acta Math., vol. 182, May 2019.
pp. 105–142, Jan. 1999. [38] L. Chang, ‘‘Efficient maximum clique computation and enumeration over
[13] U. Feige, ‘‘Approximating maximum clique by removing subgraphs,’’ large sparse graphs,’’ VLDB J., vol. 29, no. 5, pp. 999–1022, Feb. 2020,
SIAM J. Discrete Math., vol. 18, no. 2, pp. 219–225, Jan. 2004. doi: 10.1007/s00778-020-00602-z.

180052 VOLUME 8, 2020


N. Mohammadi, M. Kadivar: NK-MaxClique and MMCQ: Tow New Exact Branch and Bound Algorithms

NEDA MOHAMMADI received the B.S. and MEHDI KADIVAR received the B.S. degree in
M.S. degrees in applied mathematics and oper- computer sciences from Yazd University, Iran,
ation research from Shahrekord University, in 2001, and the M.S. and Ph.D. degrees in com-
Shahrekord, Iran, in 2009 and 2012, respectively, puter sciences from the Amirkabir University of
where she is currently pursuing the Ph.D. degree Technology, Tehran, in 2008 and 2012, respec-
in computer science. Her research interests include tively.
modeling, algorithm design, and analysis of prob- Since 2009, he has been an Assistant Pro-
lems related to computationally hard problems fessor with the Computer Sciences Department,
in combinatorics and graph theory and wireless Shahrekord University, Shahrekord, Iran. He has
networks, such as wireless scheduling. published several conference and journal articles.
His research interests include computer networks, wireless networks, algo-
rithms, scheduling, and distributed algorithms.

VOLUME 8, 2020 180053

You might also like