Efficient k-Clique Listing: An Edge-Oriented Branching Strategy

k-clique listing is a vital graph mining operator with diverse applications in various networks. The state-of-the-art algorithms all adopt a branch-and-bound (BB) framework with a vertex-oriented branching strategy (called VBBkC), which forms a sub-branch by expanding a partial k-clique with a vertex. These algorithms have the time complexity of O(k · m · (δ/2)k-2 ), where m is the number of edges in the graph and δ is the degeneracy of the graph. In this paper, we propose a BB framework with a new edge-oriented branching (called EBBkC), which forms a sub-branch by expanding a partial k-clique with two vertices that connect each other (which correspond to an edge ). We explore various edge orderings for EBBkC such that it achieves a time complexity of O( m · δ + k · m · (τ/2)k-2 ), where τ is an integer related to the maximum truss number of the graph and we have τ < δ. The time complexity of EBBkC is better than that of VBBkC algorithms for k>3 since both O(m · δ) and O(k · m · (τ/2)k-2 ) are bounded by O(k · m · (δ/2)k-2 ). Furthermore, we develop specialized algorithms for sub-branches on dense graphs so that we can early-terminate them and apply the specialized algorithms. We conduct extensive experiments on 19 real graphs, and the results show that our newly developed EBBkC based algorithms with the early termination technique consistently and largely outperform the state-of-the-art (VBBkC based) algorithms.


INTRODUCTION
Given a graph , a -clique is subgraph of  with  vertices such that each pair of vertices inside are connected [10].-clique listing, which is to list all -cliques in a graph, is a fundamental graph mining operator that plays a crucial role in various data mining applications across different networks, including social networks, mobile networks, Web networks, and biological networks.Some significant applications include the detection of overlapping communities in social networks [30], identifying -clique communities in mobile networks [17,19,31], detecting link spams in Web networks [20,34], and discovering groups of functionally related proteins (known as modules) in gene association networks [2].Moreover, -clique listing serves as a key component for several other tasks, such as finding large near cliques [39], uncovering the hierarchical structure of dense subgraphs [35], exploring -clique densest subgraphs [15,40], identifying stories in social media [3], and detecting latent higher-order organization in real-world networks [5].For more detailed information on how -clique listing is applied in these contexts, please refer to references [24] and [46].
Quite a few algorithms have been proposed for listing cliques [10,12,24,46].The majority of these approaches adopt a branch-and-bound (BB) framework, which involves recursively dividing the problem of listing all -cliques in graph  into smaller sub-problems of listing smaller cliques in  through branching operations [12,24,46].This process continues until each sub-problem can be trivially solved.The underlying principle behind these methods is the observation that a -clique can be constructed by merging two smaller cliques: a clique  and an -clique, where | | +  = .A branch  is represented as a triplet (, , ), where  denotes a previously found clique with | | < ,  represents a subgraph induced by vertices that connect each vertex in , and  corresponds to  − | |.Essentially, branch  encompasses all -cliques, each comprising of  and an -clique in .To enumerate all -cliques within branch , a set of sub-branches is created through branching operations.Each sub-branch expands the set  by adding one vertex from , updates the graph  accordingly (by removing vertices that are disconnected from the newly added vertex from ), and decrements  by 1.This recursive process continues until  for a branch reduces to 2, at which point the -cliques (corresponding to edges) can be trivially listed within .The original -clique listing problem on graph  can be solved by initiating the branch (, , ) with  = ∅,  = , and  = .The branching step employed in these existing methods is referred to as vertex-oriented branching since each sub-branch is formed by adding a vertex to the set .We term the vertex-oriented branching BB framework for -clique listing as VBBkC.
Existing research has focused on leveraging vertex information within the graph  to enhance performance by generating subbranches with smaller graphs and pruning sub-branches more effectively.Specifically, when a new vertex   is added, the resulting sub-branch   can reduce the graph  to a smaller size by considering only the neighbors of   (e.g., removing vertices that are not adjacent to   ).Consequently, branch   can be pruned if   has fewer than ( − 1) neighbors in .Furthermore, by carefully specifying the ordering of vertices in  during the branching process, it becomes possible to generate a group of sub-branches with compact graphs.The state-of-the-art VBBkC algorithms [24,46] achieve a time complexity of  ((/2)  −2 ), where  represents the number of edges in the graph, and  denotes the degeneracy1 of the graph.
In this paper, we propose to construct a branch by simultaneously including two vertices that connect to each other (i.e., an edge) from  into .Note that these two vertices must be connected, as only then they can form a larger partial -clique together with .This strategy allows for the consideration of additional information (i.e., an edge or two vertices instead of a single vertex) to facilitate the formation of sub-branches with smaller graphs and pruning.When a new edge is added, the resulting branch can reduce the graph to one induced by the common neighbors of the two vertices, which is smaller compared to the graph generated by vertex-oriented branching.To achieve this, we explore an edge ordering technique based on truss decomposition [41], which we refer to as the truss-based edge ordering.This ordering aids in creating sub-branches with smaller graphs than those by vertex-oriented branching.Additionally, more branches can be pruned based on the information derived from the added edge.For instance, a branch can be pruned if the vertices within the newly added edge have fewer than ( − 2) common neighbors in .We term this branching strategy as edge-oriented branching.Consequently, the edge-oriented branching-based BB framework for -clique listing is denoted as EBBkC.Our EBBkC algorithm, combined with the proposed edge ordering, exhibits a time complexity of  ( +(/2)  −2 ), where  represents the truss number 2 of the graph.We formally prove that  < , signifying that our EBBkC algorithm possesses a time complexity that is better than that of VBBkC algorithms [24,46] since both  () and  ((/2)  −2 ) are bounded by  ((/2)  −2 ) when  > 3.
It is important to note that although a single branching step in our edge-oriented branching (i.e., including an edge) can be seen as two branching steps in the existing vertex-oriented branching (i.e., including two vertices of an edge via two steps), there exists a significant distinction between our EBBkC and VBBkC frameworks.In EBBkC, we have the flexibility to explore arbitrary edge orderings for each branching step, whereas VBBkC is inherently constrained by the chosen vertex ordering.For instance, once a vertex ordering is established for vertex-oriented branching, with vertex   appearing before   , the edges incident to   would precede those incident to   in the corresponding edge-oriented branching.Consequently, the existing VBBkC framework is encompassed by our EBBkC framework.In other words, for any instance of VBBkC with a given vertex ordering, there exists an edge ordering such that the corresponding EBBkC instance is equivalent to the VBBkC instance, but not vice versa.This elucidates why EBBkC, when based on certain edge orderings, achieves a superior time complexity compared to VBBkC.
To further enhance the efficiency of BB frameworks, we develop an early termination technique, which is based on two key observations.Firstly, if the graph  within a branch (, , ) is either a clique or a 2-plex 3 , we can efficiently list -cliques in  using a combinatorial approach.For instance, in the case of a clique, we can directly enumerate all possible sets of  vertices in .Secondly, if the graph  is a -plex (with  ≥ 3), the branching process based on  can be converted to a procedure on its inverse graph, denoted as   4 .Since  is dense,   would be sparse, and the converted procedure operates more rapidly.Therefore, during the recursive branching process, we can employ early termination at a branch (, , ) if  transforms into a -plex, utilizing efficient algorithms to list -cliques within .We note that the early termination technique is applicable to all BB frameworks, including our EBBkC framework, without impacting the worst-case time complexity of the BB frameworks.Contributions.We summarize our contributions as follows.The rest of the paper is organized as follows.Section 2 reviews the problem and presents some preliminaries.Section 3 summarizes the existing vertex-oriented branching-based BB framework.Section 7 reviews the related work and Section 8 concludes the paper.

PROBLEM AND PRELIMINARIES
We consider an unweighted and undirected simple graph  = ( , ), where  is the set of vertices and  is the set of edges.We denote by  = | | and  = || the cardinalities of  and , respectively.Given ,  ∈  , both (, ) and (, ) denote the undirected edge between  and .Given  ∈  , we denote by  (, ) the set of neighbors of  in , i.Let  be a subgraph of  induced by either a vertex subset of  or an edge subset of .We denote by  () and  () its set of vertices and its set of edges, respectively.
In this paper, we focus on a widely-used cohesive graph structure, namely -clique [14], which is defined formally as below.Definition 2.1 (-cliqe [14]).Given a positive integer , a subgraph  is said to be a -clique if and only if it has  vertices and has an edge between every pair of vertices, i.e., | ()| =  and  () = {(, ) | ,  ∈  (),  ≠  }.
We note that 1-clique ( = 1) and 2-clique ( = 2) correspond to single vertex and single edge, respectively, which are basic elements of a graph.Therefore, we focus on those -cliques with  at least 3 (note that 3-clique is widely known as triangle and has found many applications [23,28]).We now formulate the problem studied in this paper as follows.
Hardness.The -clique listing problem is a hard problem since the decision problem of determining whether a graph contains a -clique is NP-hard [22] and this problem can be solved by listing all -cliques and returning true if any -clique is listed.Remark.The problem of listing all 3-cliques (i.e.,  = 3), known as triangle listing problem, has been widely studied [23,28].There are many efficient algorithms proposed for triangle listing, which run in polynomial time.We remark that these algorithms cannot be used to solve the general -clique listing problem.

THE BRANCH-AND-BOUND FRAMEWORK OF EXISTING ALGORITHMS: VBBKC
Many algorithms have been proposed for listing -cliques in the literature [10,12,24,46].Most of them adopt a branch-and-bound (BB) framework, which recursively partitions the problem instance (of listing all -cliques in ) into several sub-problem instances (of listing smaller cliques in ) via branching until each of them can be solved trivially [12,24,46].The rationale behind these methods is that a -clique can be constructed by merging two smaller cliques, namely a clique  and an -clique with | | +  = .Specifically, a branch  can be represented as a triplet (, , ), where • set  induces a clique found so far with | | < , • subgraph  is one induced by vertices that connect each vertex in , and Essentially, branch  covers all -cliques, each consisting of  and an -clique in .To list all -cliques under branch , it creates a group of sub-branches via a branching step such that for each subbranch, the set  is expanded with one vertex from , the graph  is updated accordingly (by removing those vertices that are not adjacent to the vertex included in ), and  is decremented by 1.The recursive process continues until when the  for a branch reduces to 2, for which the -cliques (which correspond to edges) can be listed trivially in .The original -clique listing problem on graph  can be solved by starting with the branch (, , ) with  = ∅,  =  and  = .We call the branching step involved in these existing methods vertex-oriented branching since each sub-branch is formed by including a vertex to the set .
where We call the vertex-oriented branching-based BB framework for -clique listing VBBkC.We present its pseudo-code in Algorithm 1.In particular, when  = 2, a branch (, , ) can be terminated by listing each of edges in  together with  (lines 4-6).We remark that Algorithm 1 presents the algorithmic idea only while the detailed implementations (e.g., the data structures used for representing a branch) often vary in existing algorithms [12,24,46].Different variants of VBBkC have different time complexities.The state-of-theart algorithms, including DDegCol [24], DDegree [24], BitCol [46] and SDegree [46], all share the time complexity of  ((/2)  −2 ), where  is the degeneracy of the graph.Some more details of variants of VBBkC will be provided in the related work (Section 7).

𝐵 = (𝑆, 𝑔, 𝑙)
(a) Branching in VBBkC framework.The notation "+" means to include a vertex by adding it  and "−" means to exclude a vertex by removing it from the graph . = (, , ) Branching in EBBkC framework.The notation "+" means to include two vertices incident to an edge by adding them to  and "−" means to exclude an edge by removing it from the graph .

A NEW BRANCH-AND-BOUND FRAMEWORK: EBBKC 4.1 Motivation and Overview of EBBkC
Recall that for a branch  = (, , ), the vertex-oriented branching forms a sub-branch by moving one vertex   from  to .To improve the performance, existing studies consider the information of each vertex in  towards pruning more sub-branches and/or forming sub-branches with smaller graph instances.Specifically, with the newly added vertex   , the produced sub-branch   can shrink the graph instance  as a smaller one induced by the neighbors of   (e.g., removing those vertices that are not adjacent to   ).As a result, one can prune the branch   if   has less than ( − 1) neighbors in .In addition, one can produce a group of sub-branches with small graph instances by specifying the ordering of vertices in  for branching.
In this paper, we propose to form a branch by moving two vertices that connect with each other (correspondingly, an edge) from  to  at the same time.Note that the two vertices are required to be connected since otherwise they will not form a larger partial clique with .The intuition is that it would allow us to consider more information (i.e., an edge or two vertices instead of a single vertex) towards pruning more sub-branches and/or forming subbranches with smaller graph instances.Specifically, with the newly added edge, the produced branch can shrink the graph instance as the one induced by the common neighbors of two vertices of the edge, which is smaller than that produced by the vertex-oriented branching (details can be found in Section 4.2).In addition, we can prune more branches based on the information of the added edge, e.g., a produced branch can be pruned if the vertices in the newly added edge have less than ( − 2) common neighbors in  (details can be found in Section 4.3).We call the above branching strategy edge-oriented branching, which we introduce as follows.
Consider the branching step at a branch  = (, , ).Let ⟨ 1 , where   is a subgraph of  induced by the set of edges {  ,  +1 The edge-oriented branching also corresponds to a recursive binary partition process, as illustrated in Figure 1(b).Specifically, it first divides branch  into two sub-branches based on  1 : one moves  1 from  to  (this is the branch  1 which will list those -cliques in  that include edge  1 ), and the other removes  1 from  (so that it will list others that exclude  1 ).For branch  1 , it also removes from  those vertices that are not adjacent to the vertices in  ( 1 ) (i.e.,  1 =  1 [ ( ( 1 ),  1 )]) since they cannot form any -clique with  1 .Then, it recursively divides the latter into two new sub-branches: one moves  2 from  2 to  (this the branch  2 which will list those -cliques in  that exclude  1 and include  2 ), and the other removes  2 from  2 (so that it will list others that exclude { 1 ,  2 }).It continues the process, until the last branch  | () | is formed.
We call the edge-oriented branching-based BB framework for clique listing EBBkC.We present in Algorithm 2 the pseudo-code of EBBkC, which differs with VBBkC mainly in the branching step (lines 10-11).We note that while a branching step in our edge-oriented branching (i.e., including an edge) can be treated as two branching steps in the existing vertex-oriented branching (i.e., including two vertices of an edge via two steps), our EBBkC has a major difference from VBBkC as follows.For the former, we can explore arbitrary edge orderings for each branching step while for the latter, the underlying edge orderings are constrained by the adopted vertex ordering.For example, once a vertex ordering is decided for vertexoriented branching with vertex   appearing before   , then the edges that are incident to   would appear before those that are incident to   for the corresponding edge-oriented branching.For this reason, the existing VBBkC framework is covered by our EBBkC framework, i.e., for any instance of VBBkC with a vertex ordering, there exists an edge ordering such that the corresponding EBBkC instance is equivalent to the VBBkC instance, but not vice versa.This explains why the time complexity of EBBkC based on some edge ordering is better than that of VBBkC (details can be found in Section 4.2).
In the sequel, we explore different orderings of edges in EBBkC.Specifically, with the proposed truss-based edge ordering, EBBkC would have the worst-case time complexity of  ( +(/2)  −2 ) with  < .We note that the time complexity is better than that of the state-of-the-art VBBkC algorithms (which is  ((/2)  −2 )) when  > 3 (Section 4.2).With the proposed color-based edge ordering, EBBkC can apply some pruning rules to improve the efficiency in practice (Section 4.3).Then, with the proposed hybrid edge ordering, EBBkC would inherit both the above theoretical result and practical performance (Section 4.4).Finally, we discuss other potential applications of EBBkC (Section 4.5).

EBBkC-T: EBBkC with the Truss-based Edge Ordering
Consider the edge-oriented branching at  = (, , ) based on an ordering of edges produced from , we observe that the size of graph instance   (i.e., the number of vertices in   ) is equal to the number of common neighbors of vertices in  (  ) in   , which depends on the ordering of edges.Formally, we have Recall that the smaller a graph instance is, the faster the corresponding branch can be solved.Therefore, to reduce the time costs, we aim to minimize the sizes of graph instances by determining the ordering of edges via the following greedy procedure.
Truss-based edge ordering.We determine the ordering of edges by an iterative process.Specifically, it iteratively removes from  the edge whose vertices have the smallest number of common neighbors (correspondingly, the smallest size of a graph instance), and then adds it to the end of the ordering.Consequently, for the -th edge   in the produced ordering (1 ≤  ≤ | ()|), we have We call the above ordering truss-based edge ordering of  and denote it by   () since the corresponding iterative process is the same to the truss decomposition [9,11,41], which can be done in  () time, where  is the degeneracy of the graph [9].
The EBBkC-T algorithm.When the truss-based edge ordering is adopted in EBBkC, we call the resulting algorithm EBBkC-T.The pseudo-code of EBBkC-T is presented in Algorithm 3. In particular, it only computes the truss-based edge ordering of  (i.e.,   ()) for the branching at the initial branch (∅, , ) (lines 2-5).Then, for any other branching step at a following branch (, , ), edges in ⟨ 1 ,  The idea is that for an edge , all edges in  () are ordered behind  in   and the vertices incident to these edges are both connected with those incident to .Therefore, the branching steps (with the introduced edge ordering) can be efficiently conducted via set intersections (line 9) for those branches following (∅, , ).
The correctness of this implementation can be easily verified.
Complexity.Given a branch  = (, , ), let  () be the largest size of a produced graph instance, i.e., We have the following observation.
Proof.We prove by contradiction.Suppose that  ≥ .Since  is defined as the largest value of  such that the -core of  is non-empty, there must not have a ( +1)-core in , i.e.,  ( +1 ) = ∅.
Proof.We give a sketch of the proof and put the details in the technical report [42].The running time of EBBkC-T consists of the time of generating the truss-based edge ordering, which is  () [9], and the time of the recursive listing procedure (lines 6-10 of Algorithm 3).Consider the latter one.Given a branch  = (, , ), we denote by  (, ) the upper bound of time cost of listing -cliques under such a branch.When  ≥ 3, with different values of , we have the following recurrences.
The reason is as follows.When given a branch  = (, , ) with  = 3, for each edge, we just need to compute  ( ′ ) for the subbranch (since the termination when  = 1 only cares about the vertices in  ′ ), which can be done in  ().When given a branch  = (, , ) with  > 3, for each edge, we need to construct both  ( ′ ) and  ( ′ ), which can be done in  ( 2 ) since there are at most  ( − 1)/2 edges in .Besides, we show that given a branch  = (, , ) and the sub-branches  ′ = ( ′ ,  ′ ,  ′ ) produced at , we have ∑︁ This inequality is proven in the technical report [42].With above inequalities, we can prove the theorem by induction on .□ VBBkC v.s.EBBkC-T (Time Complexity).The time complexity of EBBkC-T (i.e.,  ( + (/2)  −2 )) is better than that of state-ofthe-art VBBkC algorithms (i.e.,  ((/2)  −2 )) for  > 3.This is because both (1)  () and ( 2)  ((/2)  −2 ) are bounded by  ((/2)  −2 ).For (1), it is because we have  < 2 (/2)  −2 when  > 3; and for (2), it is because  < .We note that for  = 3, the time complexity of EBBkC-T is dominated by  () since  < , which is the same as that of state-of-the-art VBBkC algorithms (i.e.,  ()) and is also the same as that of algorithms for listing triangles [23,28] in the worst case (i.e.,  ( 1.5 )) since  < √ .Discussion on .By definition,  of a graph , i.e.,  (), corresponds to the largest integer such that there exists a non-empty subgraph where the two vertices of each edge have at least  common neighbors.Similar to the degeneracy  of the graph,  also measures the density of a graph, say, the larger the value of , the denser the graph.However,  is always smaller than  as it imposes stricter constraint on connections (i.e., the two vertices of every edge have at least  common neighbors v.s.every vertex has at least  neighbors).Theoretically, for a graph with  vertices, the gap between  and  can be as large as /2.To see this, consider a complete bipartite graph with  vertices on each side, where  is a positive integer.For this graph, we have  =  since each vertex has exactly  neighbors and  = 0 since the two vertices of each edge have no common neighbors.Practically, the ratio / is below 0.8 for many real-world graphs.For example, we have collected the statistics of / on 139 more real-world graphs [1] and found that the ratio is below 0.8 for the majority of the graphs (105 out of 139).Remark.(1) We note that another option of designing EBBkC-T is to compute the truss-based edge ordering for each individual branch and use it for branching at the branch.However, it would introduce additional time cost without achieving better theoretical time complexity.Thus, we choose not to adopt this option.(2) It is worthy noting that for a truss-based edge ordering, there does not always exist a vertex ordering such that the instance of VBBkC with the vertex ordering is equivalent to the instance of EBBkC-T.We include a counter-example in the technical report [42] for illustration.

EBBkC-C: EBBkC with the Color-based Edge Ordering
While the truss-based edge ordering helps to form sub-branches with small sizes at a branch, it does not offer much power to prune the formed sub-branches -all we can leverage for pruning are some size constraints (line 3 of Algorithm 2).On the other hand, some existing studies of VBBkC have successfully adopted color-based vertex ordering for effective pruning [18,45].Specifically, consider a branch  = (, , ).Recall that in Section 4.1, for an instance of VBBkC with a vertex ordering, there would exist an edge ordering such that the corresponding EBBkC instance based on the edge ordering is equivalent to the VBBkC instance.Motivated by this, we propose to adopt the edge ordering that corresponds to the color-based vertex ordering, which we call color-based edge ordering, for our EBBkC.One immediate benefit is that it would naturally inherit the pruning power of  the color-based vertex ordering, which has been demonstrated for VBBkC [18,45].Furthermore, it would introduce new opportunities for pruning, compared with existing VBBkC with the color-based vertex ordering, since it can leverage the two vertices incident to an edge collectively (instead of a single vertex twice as in VBBkC) for designing new pruning rules, which we explain next.
We note that Rule (1) is equivalent to the pruning that VBBkC with the color-based vertex ordering conducts at two branching steps of including  and  [24].Rule ( 2) is a new one, which applies only in our EBBkC framework with the color-based edge ordering.In addition, Rule (2) is more powerful than Rule (1) in the sense that if Rule (2) applies, then Rule (1) applies, but not vice versa.The reason is that the color values of  and  are sometimes much larger than the number of distinct color values in the sub-branch since both color values consider the information of their own neighbors instead of their common neighbors.For illustration, consider the example in Figure 2 and assume that we aim to list 4-cliques (i.e.,  = 4).We focus on the edge  .It is easy to check that Rule (1) does not apply, but Rule (2) applies since the vertices in the produced sub-branch, i.e.,  and , have only one color value.Given that it takes  (1) time to check if Rule (1) applies and  (| (  )|) time to check if Rule (2) applies, our strategy is to check Rule (1) first, and if it does not apply, we further check Rule (2).We remark that Rule (2) can be adapted to some VBBkC based algorithms including DDegCol [24] and BitCol [46], that is, we prune sub-branch   , if the vertices inside have less than  − 1 distinct color values.The EBBkC-C algorithm.When the color-based edge ordering is adopted in EBBkC, we call the resulting algorithm EBBkC-C.The pseudo-code of EBBkC-C is presented in Algorithm 4. With the color-based edge ordering, a directed acyclic graph (DAG), denoted by − →  , is built for efficiently conducting the branching steps [24,46].Specifically, − →  is built upon  by orienting each edge (, ) in  with  () <  () from  to  (line 2).For illustration, consider Figure 2. Given   ⊆  , let  + (  , − →  ) be the common out-neighbours of the vertices in   in − →  .Then, given a branch  = (, − →  , ) 6 , the edge-oriented branching at a branch with the color-based ordering can be easily conducted by calculating the common out-neighbors of the vertices incident to an edge in − →  (line 7).Then, we will prune the produced branch if either of the above two rules applies (line 8).
Complexity.The time cost of EBBkC-C is  ((Δ/2)  −2 ), which we show in the following theorem.In practice, EBBkC-C runs faster than EBBkC-T.
Proof.The proof is similar to that of Theorem 4.2.The difference is that the largest size of the produced graph instance in EBBkC-C can only be bounded by Δ and the time of generating the color-based edge ordering is  (), which is dominated by the cost of the recursive procedure.□

EBBkC-H: EBBkC with Hybrid Edge Ordering
Among EBBkC-T and EBBkC-C, the former has a better theoretical time complexity and the latter enables effective pruning in practice.
Inspired by the hybrid vertex ordering used for DDegCol [24] and BitCol [46], we aim to achieve the merits of both algorithms by adopting both the truss-based edge ordering (used by EBBkC-T) and the color-based edge ordering (used by EBBkC-C) in the EBBkC framework.Specifically, we first apply the truss-based edge ordering for the branching step at the initial branch (∅, , ).Then, for the following branches, we adopt the color-based ordering for their branching steps.We call this algorithm based on the hybrid edge ordering EBBkC-H.The pseudo-code of EBBkC-H is presented in Algorithm 5 and the implementations of branching steps are similar to those in EBBkC-T and EBBkC-C.The size of a produced problem instance for EBBkC-H is bounded by  (due to the branching at the initial branch based on the truss-based edge ordering), and thus EBBkC-H achieves the same time complexity as EBBkC-T.In addition, EBBkC-H enables effective pruning for all branches except for the initial branch (since color-based edge coloring is adopted at these branches), and thus it runs fast in practice as EBBkC-C does.
Complexity.The time complexity of EBBkC-H is  ( + (/2)  −2 ), which is the same as that of EBBkC-T.
Proof.The proof is similar to that of Theorem 4.2.Since the largest size of the produced graph instance in EBBkC-H can also be bounded by , it has the same worst-case time complexity as that of EBBkC-T.□

Other Potential Applications of EBBkC
Our EBBkC framework can potentially be applied to other problems than the -clique listing problem, which we discuss as follows.First, our framework can be easily adapted to solve other clique mining tasks, including maximal clique enumeration (MCE) [13,21,27,38], maximum clique search (MCS) [7,8] and diversified top- clique search (DCS) [43,44].The rationale is that our framework can explore all possible cliques in an input graph and thus can output only the desired cliques that satisfy some properties (e.g., maximality and diversity) by filtering out others.Second, our framework can be potentially extended to mining other types of connected dense subgraphs, e.g., connected -plex.This is because our framework can be used to explore all possible subsets of edges by recursively including an edge, and thus the induced subgraphs will cover all possible connected dense subgraphs.Third, there are some potential benefits when adapting our framework to the above tasks.As discussed in Section 4.1, the edge-oriented branching can provide more information (i.e., an edge involving two vertices instead of one vertex) towards designing more effective pivot techniques and/or pruning rules than the existing vertex-oriented branching.

EARLY TERMINATION TECHNIQUE
Suppose that we are at a branch  = (, , ), where graph  is dense (e.g.,  is a clique or nearly a clique), and the goal is to list -cliques in  (and merge them with ).Based on the EBBkC framework, we would conduct branching at branch  and form sub-branches.Nevertheless, since  is dense, there would be many sub-branches to be formed (recall that we form | ()| sub-branches), which would be costly.Fortunately, for such a branch, we can list the -cliques efficiently without continuing the recursive branching process of EBBkC, i.e., we can early terminate the branching process.Specifically, we have the following two observations.
• If  is a clique or a 2-plex (recall that a -plex is a graph where each vertex inside has at most  non-neighbors including itself, we can list -cliques in  efficiently in a combinatorial manner. For the former case, we can directly enumerate all possible sets of  vertices in .For the latter case, we can do similarly, but in a bit more complex manner (details will be discussed in Section 5.1).• If  a -plex (with  ≥ 3), the branching procedure based on  can be converted to that on its inverse graph   (recall that   has the same set of vertices as , with an edge between two vertices in   if and only if they are disconnected from each other in ), which is sparse, and the converted procedure would run faster (details will be discussed in Section 5.2).We determine whether  is a -plex for some  by checking the minimum degree of a vertex in  -if it is no less than | ()| − ,  is a -plex; otherwise,  is not a -plex.This can be done while constructing the corresponding branch  = (, , ) in  ( ()) time.

Listing 𝑘-Cliques from 2-Plex in Nearly
Optimal Time Consider a branch  = (, , ) with  as a 2-plex.The procedure for listing -cliques inside, called kC2Plex, utilizes the combinatorial technique.The rationale behind is that listing -cliques from a large clique can be solved in the optimal time by directly enumerating all possible combinations of  vertices.Specifically, we first partition  () into three disjoint sets, namely  ,  and , each of which induces a clique.This can be done in two steps.First, it partitions  () into two disjoint parts: one containing those vertices that are adjacent to all other vertices in  () (this is  ) and the other containing the remaining vertices that are not adjacent to two vertices including itself (this is  ∪ ).Note that  ∪  always involves an even number of vertices and can be regarded as a collection of pairs of vertices {,  } such that  is disconnected from .Second, it further partitions  ∪  into two parts by breaking each pair in  ∪ , that is,  and  contain the first and the second vertex in each pair, respectively.As a result, every vertex in one set connects all others within the same set and is disconnected from one vertex from the We present the pseudo-code of kC2Plex in Algorithm 6.In particular, the integers  1 ,  2 and  3 are used to ensure the satisfaction of |  | + |  | + |  | = .Specifically, it first finds a  1 -clique   from  and a  2 -clique   from .Recall that every vertex in  is disconnected from one vertex in  and vice versa.Hence, it removes from  those vertices that is disconnected from one vertex in   , which we denote by  (  , ), and this can be done efficiently in Θ(|  |) (as verified by Theorem 5.1), and then finds a  3 -clique from  \  (  , ).Besides, when | | + || < , it terminates the procedure since no -clique will be found in  (line 2).Time complexity.We analyze the time complexity of kC2Plex as follows.Proof.Algorithm 6 takes  (| ()|) for partitioning  () by obtaining the degree of each vertex inside (line 1).For each round of lines 3-6, the algorithm can guarantee exactly one -clique to be outputted at line 6 based on the settings of  1 ,  2 and  3 .Besides, the operation  \  (  , ) only takes Θ(|  |) time.Specifically, we (1) maintain two arrays 5.2 Listing -Cliques from -Plex with  ≥ 3 Consider a branch  = (, , ) with  as a -plex with  ≥ 3. The procedure for listing -clique inside, called kCtPlex, differs in the way of branching (i.e., forming new branches).Specifically, it branches based on the inverse graph   instead of .The rationale is that since  is a -plex and tends to be dense, its inverse graph   would be sparse.As a result, branching on   would run empirically faster.Below, we give the details.Specifically, it maintains the inverse graph   of  and represents a branch (, , ) by the new form of (, , ) where  is the set of vertices in , i.e.,  =  ().We note that the new form omits the information of edges in , which is instead stored in   .Consider the branching step of kCtPlex at a branch (, , ).Let ⟨ 1 ,  2 , • • • ,  | | ⟩ be an arbitrary ordering of vertices in .Then, the branching step would produce | | new sub-branches.The -th branch, denoted by   = (  ,   ,   ), includes   to  and excludes { 1 ,  2 , ..,   } from .Formally, for 1 ≤  ≤ | |, we have Note that we need to remove from  those vertices that are not adjacent to   in  (since they cannot form any -clique with   ) and they connect to   in   .Clearly, all -cliques in (, , ) will be listed exactly once after branching.We note that the branching strategy we used in kCtPlex differs from that for EBBkC (and that for VBBkC).Specifically, the former (resp.the latter) is based on a sparse inverse graph   (resp.a dense -plex ) and maintains a vertex set   (resp.a graph instance   ) for the produced branches.We remark that the former (correspondingly, the early stop strategy with  at least 3) runs faster than the latter in practice, as verified in our experiments.We summarize the procedure kCtPlex in Algorithm 7. In particular, it also utilizes the combinatorial technique for boosting the performance (lines 8-10).Specifically, it figures out the set of vertices, denoted by  , in   , which are disconnected from all others (line 2).Consider a -clique in .It may involve  vertices in  where  ∈ [0, min{| |,  }].Hence, we remove from  (  ) those vertices in  for branching at line 3 while adding them back to a -clique at lines 8-10.It is not difficult to verify the correctness.Due to the page limit, we include the time complexity analysis of kCtPlex in the technical report [42].
Remark.(1) With the early termination strategy, the BB algorithms retain the same time complexity provided before but run practically faster as verified in the experiments.(2) The early termination strategy is supposed to set a small threshold of  so as to apply the alternative procedures only on dense graph instances (i.e., -plexes).We test different choices of  in the experiments; the results suggest that EBBkC with  being set from 2 to 5 runs comparably faster than other choices while the best one among them varies for different settings of .

EXPERIMENTS 6.1 Experimental Setup
Datasets.We use 19 real datasets in our experiments, which can be obtained from an open-source network repository [33].For each graph, we ignore the directions, weights and self-loops (if any) at the very beginning.Following the existing study [24], we divide the real datasets into two groups based on the size of a maximum clique : small- graphs and large- graphs.For small- graphs, we list all -cliques for all , while for large- graphs, we only list -cliques for small  values and large  values which are near .We collect the graph statistics and report the maximum degree Δ, the degeneracy number , the truss related number  and the maximum clique size , which are shown in Table 1.We select four datasets, namely WK, PO, ST and OR, which are bold in the table, as default ones since they cover different size of graphs.
Baselines and Metrics.We choose EBBkC-H as the default edgeoriented branching-based BB framework for comparison, and denote it by EBBkC for brevity in the experimental results.We compare our algorithm EBBkC+ET with four existing algorithms, namely DDegCol [24], DDegree [24], SDegree [46] and BitCol [46] in terms of running time.Specifically, EBBkC+ET employs the edge-oriented branching-based BB framework with hybrid edge ordering, and applies the early-termination technique.The running times of all algorithms reported in our paper include the time costs of (1) conducting the pre-processing techniques (if any) and (2) generating orderings of vertices.For our early termination technique, we set the parameter  = 2 when  ≤ /2 and  = 3 when /2 <  ≤  for early-termination.All baselines are the state-of-the-art algorithms for -cliques listing with vertex-oriented branching-based BB framework.Following the existing study [24], we vary  from 4 since -clique listing problem reduces to triangle listing problem when  = 3 and there are efficient algorithms [23,28] for triangle listing which run in polynomial time.Settings.The source codes of all algorithms are written in C++ and the experiments are conducted on a Linux machine with a 2.10GHz Intel CPU and 128GB memory.We note that we have not utilized SIMD instructions for data-level parallelism in our implementation, despite the potential to further enhance the acceleration of our algorithm.We set the time limit as 24 hours (i.e., 86,400 seconds) and the running time of any algorithm that exceeds the time limit is recorded with "INF".Implementation codes and datasets can be found via this link https://github.com/wangkaixin219/EBBkC.

Experimental Results
(1) Comparison among algorithms (on small- graphs).Figure 4 shows the results of listing -cliques on small- graphs.We observe that EBBkC+ET (indicated with red lines) runs faster than all baselines on all datasets.This is consistent with our theoretical analysis that the time complexity of EBBkC+ET is better than those of the baseline algorithms.Besides, on PO, CN and BA, we observe that the running time of EBBkC+ET first decreases when  is small.There are two possible reasons: (1) on some dataset, the number of -cliques decreases as  increases when  is small.On BA, for example, the number of 4-cliques ( = 4) is nearly 28M while the number of 7-cliques ( = 7) is 21M; (2) as  increases, a larger number of branches can be pruned by the size constraint with the truss-based edge ordering, which provides the opportunity to run faster.To see this, we collect the number of promising branches after the branching step with the truss-based edge ordering.On PO, there are 11M branches left when enumerating 4-cliques ( = 4) while there are only less than 1M branches left when enumerating 10-cliques ( = 10).
(2) Comparison among algorithms (on large- graphs).Figure 5 shows the results of listing -cliques on large- graphs.We omit the results for some values of  since the time costs are beyond 24 hours due to the large number of -cliques.We find that EBBkC+ET still runs the fastest.It is worthy noting that EBBkC+ET can greatly improve the efficiency by 1-2 orders of magnitude over the baselines when  is near the size of a maximum clique , e.g., EBBkC+ET runs 9.2x and 97.7x faster than BitCol on DB (when  = 109) and on DE (when  = 40), respectively.The reasons are     two-fold: (1) when  is near , a large number of branches can be pruned by the size constraint with the truss-based edge ordering, and as a result, the remaining branches are relatively dense; (2) EBBkC+ET can quickly enumerate cliques within a dense structure, e.g., -plex, without making branches for the search space, which dramatically reduces the running time.
(3) Ablation studies.We compare two variants of our method, namely EBBkC+ET (the full version) and EBBkC (the full version without the early termination), with two VBBkC algorithms, namely DDegCol+ (the DDegCol algorithm with Rule (2) proposed in this paper) and BitCol+ (the BitCol algorithm with Rule (2) and without SIMD-based implementations).We note that DDegCol+ and BitCol+ correspond to the SOTA VBBkC algorithms without SIMDbased implementations.We report the results in Figure 6 and have the following observations.First, DDegCol+ and BitCol+ have very similar running times, which shows that pre-processing techniques in the BitCol paper are not effective.Second, EBBkC runs clearly faster than DDegCol+ and BitCol+, which demonstrates the clear contribution of our edge-oriented BB framework (note that EBBkC and DDegCol+ differ only in their frameworks).We note that it is not fair to compare EBBkC with BitCol directly since the latter is based on SIMD-based implementations while the former is not.Third, EBBkC+ET runs clearly faster than EBBkC, which demonstrates the clear contribution of the early termination technique.For example, on dataset WK, the edge-oriented BB framework and early-termination contribute 28.5% and 71.5% to the efficiency improvements over BitCol+ when  = 13, respectively.We also show the time costs of generating the truss-based ordering for edges in EBBkC and those of generating the degeneracy ordering for vertices in VBBkC in Table 2.We note that while the former are slightly larger than the latter, the overall time cost of EBBkC is smaller than that of VBBkC (as shown in Figure 6).(4) Effects of the edge ordering (comparison among EBBkC-T, EBBkC-C and EBBkC-H).For the sake of fairness, we employ all color-based pruning rules for EBBkC-C and EBBkC-H frameworks and employ the early-termination technique for all frameworks.The results are shown in Figure 7. Consider EBBkC-H and EBBkC-T.Although both frameworks have the same time complexity, EBBkC-H runs much faster since it can prune more unpromising search paths by color-based pruning rules than EBBkC-T.Consider EBBkC-H and EBBkC-C.EBBkC-H outperforms EBBkC-C since the largest subproblem instances produced by EBBKC-H is smaller than that of EBBkC-C, which also conforms our theoretical analysis.
(5) Effect of the color-based pruning rules.Recall that in Section 4.3, we introduce two color-based pruning rules, where the first rule is adapted from the existing studies [24] and the second rule is newly proposed in this paper.Therefore, we study the effect of the second pruning rule by making comparison between the running time of the algorithms with and without this rule, respectively.We   denote the algorithm without this rule by EBBkC(stc)+ET.The results are shown in Figure 8, indicated by red lines and yellow lines.We observe that the second pruning rule brings more advantages as  increases.A possible reason is that when  is small, the graph instance  usually has more than  colors ( ≤ ), which cannot be pruned by the second rule while as  increases, sparse graph instances can easily violate the rule and they can be safely pruned.(6) Effects of early-termination technique (varying ).We study the effects of choosing different parameter  (in -plex) for early-termination.We vary  in the range {1, 2, 3, 4, 5} and report the corresponding running time of EBBkC+ET under different values of .The results are shown in Figure 9.We have the following observations.First, for all values of , EBBkC+ET with  = 2 always runs faster than that with  = 1, since we can list all -cliques inside a -plex in optimal time when  = 1 and  = 2 but we can early-terminate the recursion EBBkC_Rec in an earlier phase when  = 2 than that when  = 1 (Section 5.1).Second, when the value of  is small, EBBkC+ET with smaller  runs faster while when the  This phenomenon conforms our theoretical analysis in Section 5 that when the value of  increases, listing -cliques with early-termination on sparser plexes, i.e., -plex with larger , can also be efficient.
(7) Parallelization.We compare different algorithms in a parallel computing setting.Specifically, for EBBkC framework, since each produced sub-branch produced from  = (∅, , ) can be solved independently (see line 6 of Algorithm 5), we process all of such sub-branches in parallel.For existing studies under VBBkC framework [12,24,46], there are two parallel schemes.One is called NodeParallel (NP for short).This strategy processes each produced sub-branch at  = (∅, , ) in parallel since they are independent (see line 9 of Algorithm 1).The other is called EdgeParallel (EP for short).This strategy first aggregates the first two consecutive branching steps at  = (∅, , ) as a unit, and as a result, it would produce | ()| sub-branches, then it processes each sub-branch in parallel since they are independent [12,24,46].The results of the comparison are shown in Figure 10.Consider the comparison between VBBkC+ET(NP) and VBBkC+ET(EP), indicated by blue lines and magenta lines.The algorithm with edge-level parallelization strategy achieves a higher degree of parallelism since it would produce a number of problem instances with smaller and similar scales, which balances the computational loads across the threads.Then, we consider the comparison between EBBkC+ET and VBBkC+ET(EP), indicated by red lines and blue lines.Both algorithms can be regarded as adopting edge-level parallelization strategy but differ in the ordering of the edges.We observe that EBBkC+ET runs faster than VBBkC+ET(EP).The reason is that EBBkC uses truss-based edge ordering, which would produce even smaller problem instances than those of VBBkC+ET(EP).
(8) Space costs.We report the space costs of different algorithms in Figure 11.We have the following observations.First, the space costs of all algorithms are comparable and a few times larger than the graph size, which is aligned with the space complexity of  ( + ).
Second, EBBkC+ET has the space cost slightly larger than those of others since it employs extra data structures for maintaining edge ordering and conducting early-termination.
(9) Scalability test.We test the scalability of the algorithms on three large graphs under the parallel setting with 48 threads and report the results in Figure 12.All algorithms use the EP parallel scheme.EBBkC+ET outperforms other baselines consistently.In particular, on the largest graph WP, EBBkC+ET is up to about 100× faster than BitCol (when  = 425).

RELATED WORK
Listing -cliques for arbitrary  values.Existing exact -clique listing algorithms for arbitrary  values can be classified into two categories: backtracking based algorithms [10] and branch-andbound based algorithms [24,45,46].Specifically, the algorithm Arbo [10] is the first practical algorithm for listing all -cliques, whose time complexity (we focus on the worst-case time complexies in this paper) is  (  −2 ), where  and  are the number of edges and the arboricity of the graph, respectively.However, it is difficult to paralleize Arbo since it involves a depth-first backtracking procedure.To solve this issue, several (vertex-oriented branching-based) branch-and-bound (BB) based algorithms are proposed, including Degree [16,28], Degen [12], DegenCol [24], DegCol [24], DDegCol [24], DDegree [24], SDegree [46] and BitCol [46].As introduced in Section 3, these algorithms follow the same framework but differ in how the vertex orderings are adopted and some implementation details.Specifically, Degree uses a global degree ordering, with which the size of the largest problem instance produced can be bounded by  (i.e., the ℎ-index of the graph).Degree has a time complexity of  ((/2)  −2 ).Degen uses a global degeneracy ordering, with which the size of the largest problem instance produced can be bounded by  (i.e., the degeneracy of the graph).
Degen has a time complexity of  ((/2)  −2 ).Since it has been proven that  ≤ 2 − 1 [47], Degen is the first algorithm that outperforms Arbo theoretically and practically.However, Degen suffers from the issue that it cannot efficiently list the clique whose size is near  (i.e., the size of a maximum clique).To solve this issue, the authors in [24] propose several algorithms, which are based on color-based vertex orderings.DegCol and DegenCol first color the graph with some graph coloring algorithms (e.g., inverse degree based [45] and inverse degeneracy based [18]) and generate the an ordering of vertices based on the color values of the vertices.While the color values of the vertices can significantly prune the unpromising search paths and make the algorithm efficient to list near- cliques, DegCol and DegenCol both have the time complexity of  ((Δ/2)  −2 ), where Δ is the maximum degree of a vertex in the graph since the color-based ordering cannot guarantee a tighter size bound for the produced problem instance.
To overcome this limitation, DDegCol adopts a hybrid ordering, where it first uses degeneracy ordering to branch the universal search space such that the size of each produced problem instance is bounded by , then it uses color-based orderings to branch each produced sub-branch.Following a similar procedure, DDegree also combines degeneracy ordering and degree ordering to branch the universal search space and the sub-spaces, respectively.In this way, DDegCol and DDegree have the time complexity of  ((/2)  −2 ).BitCol and SDegree implement DDegCol and DDegree in a more efficient way with SIMD instructions, respectively, and retain the same time complexity as that of DDegCol and DDegree.In contrast, our EBBkC algorithm is an edge-oriented branching-based BB algorithm based on edge orderings and has its time complexity (i.e.,  ( + (/2)  −2 )) better than that of the state-of-the-art algorithms including DDegCol, DDegree, BitCol and SDegree (i.e.,  ((/2)  −2 )), where  is strictly smaller than .Some other algorithms, e.g., MACE [26], which are originally designed for the maximal clique enumeration problem, can also be adapted to listing -cliques problem [26,36,37].These adapted algorithms are mainly based on the well-known Bron-Kerbosch (BK) algorithm [6] with some size constraints to ensure that each clique to be outputted has exactly  vertices.However, these adapted algorithm are even less efficient than Arbo theoretically and practically, e.g., MACE has a time complexity of  (  −2 ) [24,36], and cannot handle large real graphs.
Listing -cliques for special  values.There are two special cases for -clique listing problem: when  = 3 and when  = .When  = 3, the problem reduces to triangle listing problem [10,23,28].
The state-of-the-art algorithm for triangle listing problem follows a vertex ordering based framework [28], whose time complexity is  (), where  is the arboricity of the graph.When  = , the problem reduces to maximum clique search problem [7,25,29,32].The state-of-the-art algorithm for maximum clique search problem first transforms the maximum clique problem to a set of clique finding sub-problems, then it conducts a branch-and-bound framework to iteratively check whether a clique of a certain size can be found in the sub-problem [7], whose time complexity is  (2  ).We note that these existing algorithms cannot solve the -clique listing problem for arbitrary 's.

CONCLUSION
In this paper, we study the -clique listing problem, a fundamental graph mining operator with diverse applications in various networks.We propose a new branch-and-bound framework, named EBBkC, which incorporates an edge-oriented branching strategy.This strategy expands a partial -clique using two connected vertices (an edge), offering new opportunities for optimization.Furthermore, to handle dense graph sub-branches more efficiently, we develop specialized algorithms that enable early termination, contributing to improved performance.We conduct extensive experiments on 19 real graphs, and the results consistently demonstrate EBBkC's superior performance compared to state-of-the-art VBBkCbased algorithms.In the future, we plan to explore the potential applications of our EBBkC technique to other cohesive subgraph mining tasks including clique and connected dense subgraph mining.In addition, we will explore the possibility of adopting our algorithms to list -cliques' counterparts in other types of graphs such as bipartite graphs.(17) where  is positive constant.Since the integer  decreases by 2 when branching, then when  is odd (resp.even),  would always be odd (resp.even) in all branches.Thus, we need to consider both cases.Base Case ( = 2 and  = 3).When  = 2, it is easy to verify that there exists  such that  (, 2) ≤  •  • | ()| satisfies Eq. (17).When  = 3, we put Eq. ( 16) into Eq.(10), and it is easy to verify that  (, 3) ≤  •  • | ()| • , which also satisfies Eq. (17).

Induction
Step.We first consider the case when 3 <  < .Assume the induction hypothesis, i.e., Eq. ( 17 The first inequality derives from recurrence.The second inequality derives from Eq. ( 16) and the induction hypothesis.The third inequality derives from Lemma A.1 (case  < ).The fourth inequality derives from the fact that The first inequality derives from recurrence.The second inequality derives from Eq. ( 16) and the induction hypothesis.The third inequality derives from Lemma A.1 (case  = ).The fourth inequality derives from the fact that  We note that these produced branches cannot be generated with any vertex orderings.To see this, consider the branch  1 and  3 in Figure 13(d).If there exists a vertex ordering   that can generate  1 , then vertex  3 must be ordered behind  4 in   .Similarly, for branch  3 , vertex  4 must be ordered behind  3 in   .This derives a contradiction.
According to Eq. ( 9), for each 1 ≤  ≤ | |, the size of the produced   is at most | | − .Thus, we have the following recurrence.Remark.Recall that in Eq. ( 9), we need to filter out the vertices that are connected with   in   to create the sub-branch.There are two possible ways to implement this procedure.One way is to use a shared array to store  () \  , denoted by .Every time we execute line 11 and 12, the pointer in  moves forward and marks those vertices in  (  ,   ) as invalid, respectively.The benefit is that the procedure can be done in  () in each round, as we show in Eq. ( 21), but will be hard to be parallelized.Another way is to use additional  (  ) to ensure that each sub-branch has its own copy of   , which makes the procedure easy to be parallelized.In our experiments, we implement the algorithm in the former way.

D ADDITIONAL EXPERIMENTAL RESULTS
The experimental results on ablation studies and the effects of the color-based pruning rules (comparison between the algorithms with and without the Rule (2)) on datasets ST and OR are shown in Figure 14 and Figure 15, respectively.

Figure 2 :
Figure 2: Color-based edge ordering and pruning rules.

Figure 3 :
Figure 3: Examples of a 2-plex and its inverse graph.

Figure 4 :
Figure 4: Comparison with baselines on the small- graphs, varying  from 4 to .

Figure 5 :
Figure 5: with baselines on the large- graphs, varying  from 4 to 9 and from  − 5 to .

Figure 7 :
Figure 7: Effects of the edge ordering.

Figure 8 :Figure 9 :
Figure 8: Effects of the pruning rules (comparison between the algorithms w/ and w/o the Rule (2)).

Figure 10 :
Figure 10: Comparison among different parallel schemes, varying the number of threads.

Figure 12 :
Figure 12: Results on scalability test.value of  is large, EBBkC+ET with larger  runs faster.On WK, for example, when  = 8, EBBkC+ET with  = 2 runs the fastest; when  = 12 and  = 16, EBBkC+ET with  = 4 runs the fastest; and when  = 20, EBBkC+ET with  = 5 runs the fastest.This phenomenon conforms our theoretical analysis in Section 5 that when the value of  increases, listing -cliques with early-termination on sparser plexes, i.e., -plex with larger , can also be efficient.

Figure 15 :
Figure 15: Effects of the color-based pruning rules (comparison between the algorithms w/ and w/o the Rule (2)).

•
We propose a new BB framework for -clique listing problem, namely EBBkC, which is based on an edge-oriented branching strategy.We further explore different edge orderings for EBBkC such that it achieves a better time complexity than that of the state-of-the-art VBBkC for  > 3, i.e., the former is  ( + (/2)  −2 ) and the latter is  ((/2)  −2 ), where  is a number related to the maximum truss number of the graph and  is the degeneracy of the graph and we have  < .(Section4)• We further develop an early termination technique for boosting the efficiency of branch-and-bound frameworks including EBBkC, i.e., for branches of listing -cliques in a dense graph (e.g., a -plex), we develop more efficient algorithms based on combinatorial approaches (for a clique and a 2-plex) and conduct the branching process on its inverse graph (for a -plex with  ≥ 3), which would be faster.(Section5)• We conduct extensive experiments on 19 real graphs, and the results show that our EBBkC based algorithms with the early termination technique consistently and largely outperform the state-of-the-art (VBBkC based) algorithms.(Section 6) Algorithm 1: The vertex-oriented branching-based BB framework: VBBkC Input: A graph  = ( ,  ) and an integer  ≥ 3 Output: All -cliques within  1 VBBkC_Rec(∅, , ); Create branch   = (  ,   ,   ) based on Eq. (1); 5 for each edge (, ) in  do Output a -clique  ∪ {,  } ; 7 for each vertex   ∈  () based on a given vertex ordering do 8 9 VBBkC_Rec(  ,   ,   );Consider the branching step at a branch  = (, , ).Let ⟨ 1 , 2 , • • • ,  | () | ⟩ be an arbitrary ordering of vertices in .The branching step would produce | ()| new sub-branches from branch .The -th sub-branch, denoted by   = (  ,   ,   ), includes   to  and excludes { 1 , 2 is a subgraph of  induced by the set of vertices {  ,  +1 , • • • ,  | () | }, i.e.,   = [  , • • • ,  | () | ].The branching can be explained by a recursive binary partition process, as shown in Figure1(a).Specifically, it first divides the current branch  into two sub-branches based on  1 : one branch moves  1 from  to  (this is the branch  1 which will list those -cliques in  that include  1 ), and the other removes  1 from  (so that it will list others in  that exclude  1 ).For branch  1 , it also removes from  those vertices that are not adjacent to  1 since they cannot form any -clique with  1 .In summary, we have  1 =  1 [ ( 1 ,  1 )].Then, it recursively divides the latter into two new sub-branches: one branch moves  2 from  2 to  (this is the branch  2 which will list those -cliques in  that exclude  1 and include  2 ), and the other removes  2 from  2 (so that it will list others in  that exclude { 1 ,  2 }).It continues the process, until the last branch  | () | is formed.In summary, branch   will list those -cliques in  that include   and exclude { 1 , • • • ,   −1 }.Consequently, all -cliques in  will be listed exactly once after branching. 2 , • • • ,  | () | ⟩ be an arbitrary ordering of edges in .Then, the branching step would produce | ()| new sub-branches from .Create branch   = (  ,   ,   ) based on Eq. (2);The -th branch, denoted by   = (  ,   ,   ), includes to  the two vertices incident to the edge   , i.e.,  (  ), and excludes from  those edges in { 1 ,  2 , • • • ,   −1 } (and those vertices that are disconnected from the vertices incident to   ).Formally, for 1 ≤  ≤ | ()|, we have , • • • ,  | () | }, i.e.,   = [  , • • • ,  | () | ].We note that (1)  ( (  ),   ) is to filter out those vertices that are not adjacent to the two vertices incident to   since they cannot form any -cliques with   and (2)   [ ( (  ),   )] is the graph instance for the subbranch induced by the vertex set  ( (  ),   ) in   .
The rationale is that since all vertices in   have their color values strictly smaller than  (  ) (according to Eq. (1) and the definition of the color-based vertex ordering), they do not have  − 1 different color values, indicating   does not contain any ( − 1)-cliques, and therefore   can be pruned.
They first color the vertices in  by iteratively assigning to an uncolored vertex  the smallest color value taken from {1, 2, • • • } that has not been assigned to 's neighbours.Let  be the number of color values used by the coloring procedure.They then obtain a vertex orderng by sorting the vertices in a non-increasing order based on the color values ⟨ 1 ,  2 , • • • ,  | () | ⟩ (with ties broken by node ID), i.e., for   and   with  < , we have  (  ) ≥  (  ), where  (•) is the color value of a vertex.As a result, they prune the sub-branch   = (  ,   ,   ), which includes   to , if  (  ) < .

Table 2 :
Time for generating truss-based edge ordering and degeneracy ordering (unit: sec).