Abstract 1 Introduction 2 State of the art 3 Our contributions 4 Results References

Efficient Enumeration of π’Œ-Plexes and π’Œ-Defective Cliques

Mohamed Jiddou LI-PARAD, UniversitΓ© de Versailles Saint-Quentin-En-Yvelines, Paris-Saclay, France George Manoussakis LI-PARAD, UniversitΓ© de Versailles Saint-Quentin-En-Yvelines, Paris-Saclay, France
Abstract

We investigate the enumeration of dense subgraphs under two well-known relaxations of cliques: k-plexes and k-defective cliques. Our main contribution is a family of algorithms with improved worst-case and output-sensitive complexities, driven by a decomposition technique based on graph degeneracy. We first propose a worst-case output-size near-optimal algorithm to enumerate all maximal k-plexes of size at least 2⁒kβˆ’1, achieving a total time complexity of π’ͺ⁒(n⁒(d⁒k)3⁒2d⁒Δk), where d is the degeneracy and Ξ” the maximum degree of the input graph. We then refine this result to obtain a fixed-parameter tractable output-sensitive algorithm with complexity π’ͺ⁒(α⁒f⁒(k)⁒p⁒(d⁒Δ)), where Ξ± is the number of solutions, f⁒(k) is an arbitrary function of k, and p is a polynomial. We then extend this framework to the enumeration of k-defective cliques and also show a linear-time O⁒(n) algorithm for the enumeration of 2-plexes for graphs with bounded degeneracy. To the best of our knowledge, these complexities are competitive with or better than the current state of the art.

Keywords and phrases:
Parameterized complexity, enumeration algorithms, maximal cliques enumeration
Copyright and License:
[Uncaptioned image] © Mohamed Jiddou and George Manoussakis; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Theory of computation β†’ Parameterized complexity and exact algorithms
Editors:
Akanksha Agrawal and Erik Jan van Leeuwen

1 Introduction

Finding dense substructures in graphs is a fundamental problem in data mining [9, 19], social network analysis [16, 23], bio-informatics [15, 14], and database theory, where uncovering dense groups of entities reveals critical insights into the organization of complex systems. In data mining, dense patterns often signify meaningful associations or frequent co-occurrences; in social networks, they correspond to densely connected communities; in biological networks, they may represent protein complexes or functional modules; and in database systems, they inform efficient indexing and query optimization over graph-structured data.

Among the most well-known dense patterns is the clique, a subset of vertices in which every pair is mutually adjacent. Cliques represent idealized notions of cohesion but are rarely found in real-world networks, which are typically large, sparse, and noisy. The requirement of full connectivity makes cliques overly restrictive for practical applications. As a result, various relaxed clique models have been proposed to capture dense – but not necessarily complete – subgraphs that better reflect real-world connectivity.

Among these, the k-plex and k-defective clique models have been widely used [2, 19, 10, 20, 24]. A k-plex allows each vertex to be non-adjacent to up to k other vertices in the subgraph, while a k-defective clique requires the induced subgraph to miss at most k edges. These definitions offer a balance between density and noise tolerance, enabling the discovery of dense structures even in imperfect data. These models have demonstrated practical utility in numerous domains: detecting non-clique-like but cohesive communities in social networks [20, 23], identifying biologically relevant modules in protein-protein interaction networks [22], and mining patterns in incomplete or uncertain data sources [8].

The versatility of relaxed clique models makes them an important tool in modern graph analysis, where the goal is often to find structures that are both dense and resilient to noise. Consequently, the development of efficient algorithms to enumerate such subgraphs has become a central research problem.

2 State of the art

In this paper, we focus on the enumeration of two families of graph-theoretic structures: k-defective cliques and k-plexes. Both serve as models of relaxed cliques. Although the enumeration of k-plexes has been extensively studied, less attention has been paid to k-defective cliques. In this section, we review existing techniques and results concerning the enumeration of maximal k-plexes and k-defective cliques. In both the related work and throughout this paper, we encounter two common classes of output-sensitive algorithms for enumeration problems: Polynomial Total Time and Polynomial Delay. A problem is said to be solvable in polynomial total time if the total time required to enumerate all solutions is bounded by a polynomial in the size of the input and the number of solutions. This notion is typically used when the user is interested in generating the full output. However, Polynomial Delay ensures that the time between any two consecutive outputs is bounded by a polynomial in the input size. This is particularly valuable in practice, as it allows the user to process or visualize each solution incrementally without waiting for the enumeration to complete.

To our knowledge, there exist only two enumeration algorithms specifically designed for maximal s-defective cliques, which are given in [10]. The first is a polynomial delay algorithm, meaning that the time elapsed between two consecutive outputs is bounded by a polynomial function. Specifically, the delay is π’ͺ⁒(n2⁒Nm2⁒k+1/4k), where n is the number of vertices in the graph, Nm is the size of the largest k-defective clique. The second algorithm, which follows a more brute force approach and whose complexity is not output sensitive, uses a branch-and-bound approach with an optimized pivoting technique. Its time complexity is π’ͺ⁒(n⁒αsn), where Ξ±s is a real constant strictly less than 2. An optimization based on the degeneracy ordering of the graph reduces this complexity to π’ͺ⁒(nk+2⁒αkΞ΄), where Ξ΄ is the degeneracy of the graph, a parameter that is typically small in real-world networks.

For the problem of enumerating all maximal k-plexes, several algorithms have been proposed. Some of these are adaptations of the Bron–Kerbosch algorithm [3], which was originally designed to enumerate maximal cliques. Wu and Pei [20] extended the Bron–Kerbosch algorithm to handle maximal k-plexes by introducing a set of pruning rules to eliminate unnecessary branches in the search space. The time complexity of their algorithm is π’ͺ⁒(2n). Zhou et al. [24] introduced a novel branching heuristic that improves the running time to π’ͺ⁒(Ξ±kn), where Ξ±k is a constant depending on k and is strictly less than 2. In a related approach, Conte et al. [1] proposed a decomposition-based Bron–Kerbosch algorithm to enumerate k-plexes with diameter at most 2. Although no explicit time complexity is provided, a brief analysis suggests that the algorithm runs in π’ͺβˆ—β’(2d⁒Δ), where d denotes the degeneracy and Ξ” the maximum degree of the graph.

Other approaches have also been proposed. In Wang et al. [19], the authors present an algorithm to enumerate all k-plexes with a time complexity of π’ͺ⁒(n2⁒k+n⁒(d⁒Δ)k+1⁒αkd). In Dai et al. [11], they describe an algorithm to enumerate all maximal k-plexes of size at least q, with a time complexity of π’ͺ⁒(n⁒r1k⁒r2⁒αkd), where r1=min⁑{d⁒Δqβˆ’2⁒k+2,n} and r2=min⁑{d⁒Δ2qβˆ’2⁒k+2,n}. It is also possible to apply the more general framework of Cohen et al. [7], which provides algorithms to enumerate maximal induced subgraphs satisfying hereditary properties. In fact, in a subsequent paper of Berlowitz et al. [2], they applied this framework to the specific case of k-plexes, resulting in a fixed-parameter tractable polynomial-time delay algorithm with time complexity π’ͺ(f(k)p(n)) with p⁒(n) a polynomial function of n and f⁒(k) an arbitrary function of k.

Closely related to our problems, the computation of the maximum k-defective clique has also been studied. It is known to be NP-hard [21], and several non-trivial algorithms have been developed to address it [4, 6, 5, 13]. These methods achieve exponential time complexities with base constants strictly less than 2, often derived from the roots of characteristic polynomials. Some offer tighter theoretical bounds, while others emphasize practical performance through preprocessing and reduction techniques. Certain approaches also exploit structural properties of the graph, such as degeneracy, to improve practical runtime. However, even optimized methods become impractical for large values of k, particularly on real-world datasets [13].

3 Our contributions

In this paper, we investigate the enumeration of dense subgraphs under the models of k-plexes and k-defective cliques. More specifically, we focus on connected k-plexes and k-defective cliques of diameter at most 2, as they better capture the notion of a community. To achieve this, Lemma 4 ensures that it suffices to enumerate k-plexes of size at least 2⁒kβˆ’1 and k-defective cliques of size at least k+2.

Our main goal is to develop algorithms to enumerate all maximal k-plexes of size at least 2⁒kβˆ’1. We then leverage this approach to enumerate maximal k-defective cliques by exploiting the structural relationship between the two concepts.

We begin by presenting general combinatorial results in Section 4.2. Then, in Section 4.3, we focus on the enumeration of maximal k-plexes. As a starting point, we build on the decomposition introduced in [9]. We first prove that every maximal k-plex of size at least 2⁒kβˆ’1 is contained within a small subgraph of size π’ͺ⁒(d⁒Δ). Using this structural insight, we design an enumeration algorithm that explores each subgraph Gi in time π’ͺ⁒((d⁒k)3⁒2d⁒Δk), ensuring that all maximal k-plexes of size at least 2⁒kβˆ’1 are reported without duplication. A subsequent filtering step based on suffix trees guarantees a total enumeration time bounded by π’ͺ⁒(n⁒(d⁒k)3⁒2d⁒Δk). This result is formalized in Theorem 16. We also establish an upper bound on the number of such k-plexes, namely π’ͺ⁒(n⁒k⁒2d⁒Δkβˆ’1), and demonstrate the near-optimality of this bound by constructing a family of graphs in which the number of maximal k-plexes of size at least 2⁒kβˆ’1 is Ω⁒(n⁒3d/3⁒Δkβˆ’1). It follows that our algorithm achieves near-optimal runtime in the worst case.

In Berlow et al. [2], the authors introduced an algorithm for the enumeration of maximal k-plexes of size at least 2⁒kβˆ’1, with fixed-parameter tractable polynomial delay π’ͺ⁒(f⁒(k)⁒p⁒(n)), where f⁒(k) is an arbitrary function of k, and p⁒(n) is a polynomial in the number of vertices n. The considered parameter is k. We improve upon this result by applying the enumeration to the subgraphs Gi, leveraging the fact that each Gi contains at most π’ͺ⁒(d⁒Δ) vertices. Combined with our upper bound on the total number of solutions across all subgraphs Gi in Lemma 12, this enables the design of a polynomial total algorithm with runtime π’ͺ⁒(α⁒f⁒(k)⁒p⁒(d⁒Δ)), where Ξ± is the total number of output solutions. To the best of our knowledge, this is the first algorithm with total runtime polynomial both in the output size and in the degeneracy and maximum degree of the input graph.

By applying the same technique to the polynomial delay algorithm of Dai et al. [10] for the enumeration of maximal k-defective cliques of size at least k+2, mentioned earlier, we also derive a second output sensitive algorithm with polynomial total runtime. These results are presented in Theorems 17 and 19, respectively.

Finally, we propose an algorithm that lists all maximal 2-plexes in time π’ͺ⁒(n) for graphs of bounded degeneracy. This result is presented in Theorem 23. An overview of the existing results, as well as our claimed complexities, can be found in Table 1.

Table 1: Existing algorithms for the problems considered in this paper. Here d is the degeneracy, Ξ” the maximum degree, n the graph order, Nm the size of the largest k-defective clique, Ξ±k, Ξ±s are constants <2, and Ξ± the output size.
Algorithm Output Complexity
Wu and Pei [20] Maximal k-plexes O⁒(2n)
Zhou et al. [24] Maximal k-plexes O⁒(αkn)
Conte et al. [1] Maximal k-plexes with diameter ≀2 Oβˆ—β’(2d⁒Δ)
Wang et al. [19] Maximal k-plexes O⁒(n2⁒k+n⁒(d⁒Δ)k+1⁒αkd)
Dai et al. [11] Maximal k-plexes of size β‰₯q O⁒(n⁒r1k⁒r2⁒αkd), where r1=min⁑{d⁒Δqβˆ’2⁒k+2,n}, r2=min⁑{d⁒Δ2qβˆ’2⁒k+2,n}
Dai et al. [10] Maximal k-defective cliques O⁒(n2⁒Nm2⁒k+1/4k) (polynomial-time delay)
Dai et al. [10] (Pivoting) Maximal k-defective cliques O⁒(n⁒αsn)
Dai et al. [10] (Degeneracy-optimized) Maximal k-defective cliques O⁒(nk+2⁒αkd)
Berlowitz et al. [2] Maximal k-plexes O⁒(f⁒(k)⁒p⁒(n)), where p⁒(n) is polynomial in n and f⁒(k) is any function of k (fixed-parameter tractable polynomial delay)
This paper Maximal k-plexes of size β‰₯2⁒kβˆ’1 O⁒(n⁒(d⁒k)3⁒2d⁒Δk)
This paper Maximal k-defective cliques of size β‰₯k+2 O⁒(α⁒(d⁒Δ)2⁒(d+k)2⁒k+24k) (polynomial total time)
This paper Maximal 2-plexes O⁒(n) (when d=O⁒(1))
This paper Maximal k-plexes of size β‰₯2⁒kβˆ’1 O⁒(α⁒f⁒(k)⁒p⁒(d⁒Δ)), where p⁒(d⁒Δ) is polynomial in d⁒Δ and f⁒(k) is any function of k (fixed-parameter tractable polynomial total time)

4 Results

4.1 Notations

We consider graphs of the form G=(V,E), which are simple, undirected, with n vertices and m edges. If XβŠ†V, the subgraph of G induced by X is denoted by G⁒[X]. If XβŠ‚V, then X is a proper subgraph of G. When not clear from the context, the vertex set of G will be denoted by V⁒(G). The set N⁒(x) is called the open neighborhood of the vertex x and consists of the vertices adjacent to x in G.

Given an arbitrary ordering Οƒ=v1,…,vn of the vertices of G, the set Vi consists of the vertices following vi in this ordering, including vi itself, that is, {vi,vi+1,…,vn}. In the ordering Οƒ, the rank of vi, denoted by σ⁒(vi), is its position in the ordering (here, i). By [n], we denote the set of integers {1,2,…,n}. The distance between two vertices u and v is the length of the shortest path from u to v. Let Nik⁒(v)=Vi∩Nk⁒(v), where Nk⁒(v) is the set of vertices at distance k from v (in this paper, we consider Ni1⁒(vi)=N⁒(vi)).

4.2 Preliminaries

In this section, we present a set of preliminary definitions and combinatorial results that constitute the theoretical foundation of our algorithms. We begin by introducing a decomposition framework based on subgraphs Gi, which plays a central role throughout the paper. We then formally define the two central notions of subgraph density considered in this work: k-plexes and k-defective cliques. These definitions enable a rigorous formulation of the enumeration problems that we aim to solve.

The section proceeds with a series of lemmas that establish the essential properties of these structures. In particular, Lemma 5 and Lemma 6 guarantee that any maximal k-plex of size at least 2⁒kβˆ’1 in a graph G is entirely contained in a unique subgraph Gi of the decomposition, Lemma 11 provides a procedure to verify whether a k-plex is maximal in its corresponding subgraph Gi in time π’ͺ⁒((d+k)⁒Δ), making the approach efficient in practice. These results are central in justifying the correctness and non-redundancy of our enumeration strategy. Further, Lemmas 9 and 10 provide tight bounds on the size and number of such k-plexes in terms of the graph’s degeneracy d and maximum degree Ξ”. In addition, Lemma 12 establishes an upper bound on the total number of such k-plexes in all subgraphs Gi, showing that their sum is proportional to the number of maximal k-plexes in G. This result is crucial in the design and analysis of our output-sensitive algorithms.

Definition 1.

Let G=(V,E) be a graph, and let v1,…,vn be an ordering of its vertices. For each i∈[n], we define the graph Gi as the subgraph of G induced by the vertex set V⁒(Gi)={vi}βˆͺNi⁒(vi)βˆͺNi2⁒(vi), that is, the vertex vi itself, its neighbors in Vi, and the vertices at distance two from vi within Vi.

Definition 2.

Let G=(V,E) be an undirected graph and let k be a non-negative integer. A subset SβŠ†V is called a k-plex if, in the induced subgraph G⁒[S], each vertex has at most k non-neighbors (equivalently, at least |S|βˆ’k neighbors) within S.

A k-plex S is said to be maximal in G if there does not exist a strict superset Sβ€²βŠƒS such that Sβ€² is also a k-plex in G; that is, S is inclusion-maximal among the k-plexes of G.

Definition 3.

Let G=(V,E) be an undirected graph and let k be a non-negative integer. A subset CβŠ†V is called a k-defective clique if the induced subgraph G⁒[C] is missing at most k edges to be a complete clique. A k-defective clique C is said to be maximal in G if there does not exist a strict superset Cβ€²βŠƒC such that Cβ€² is also a k-defective clique in G; that is, C is inclusion-maximal among the k-defective cliques of G.

Lemma 4 (Two-hop property [18]).

If S is a k-plex in G with |S|β‰₯2⁒kβˆ’1, then the subgraph G⁒[S] is connected and has diameter at most two.

Lemma 5.

Let G be a graph, and let Οƒ=(v1,…,vn) be a degeneracy ordering of its vertices. Let CβŠ†V⁒(G) be a maximal k-plex such that the size of C is at least 2⁒kβˆ’1. Then, there exists a unique index i∈[n] such that CβŠ†V⁒(Gi) and vi∈C.

Proof.

Let C be a maximal k-plex in G with |C|β‰₯2⁒kβˆ’1, and let i∈[n] be the smallest index such that vi∈C. By Lemma 4, the subgraph G⁒[C] has diameter at most two and contains vi, which implies that every vertex u∈Cβˆ–{vi} is at distance at most two from vi. Therefore, each such vertex u is either a neighbor of vi or is at distance two from vi, so by the definition of Gi, it follows that CβŠ†V⁒(Gi).

To show uniqueness, suppose for contradiction that there exists an index jβ‰ i such that CβŠ†V⁒(Gj) and vj∈C. If j<i, then vj∈C, which contradicts the minimality of i. If j>i, then since CβŠ†V⁒(Gj), we must have vi∈V⁒(Gj). By definition, V⁒(Gj)={vj}βˆͺN⁒(vj)βˆͺN2⁒(vj), so vi∈N⁒(vj)βˆͺN2⁒(vj). However, this is impossible, since all vertices in N⁒(vj)βˆͺN2⁒(vj) have indices strictly greater than j, whereas i<j. Therefore, such an index j cannot exist, proving the uniqueness. β—€

Lemma 6.

Let G be a graph, and let Οƒ=(v1,…,vn) be a degeneracy ordering of its vertices. Let CβŠ†V⁒(G) be a maximal k-plex in subgraph Gi, for some i∈[n], such that the size of C is at least 2⁒kβˆ’1. Then C is not maximal in G if and only if there exists a maximal k-plex Cβ€²βŠ†V⁒(G) of size at least 2⁒kβˆ’1, maximal in G, such that C⊊Cβ€²βŠ†V⁒(Gj) for some j<i.

Proof.

Suppose that C is a maximal k-plex of size at least 2⁒kβˆ’1 in Gi, for some i∈[n], but that C is not maximal in G. Then there exists a set SβŠ†V⁒(G)βˆ–C such that the subgraph G⁒[CβˆͺS] is a k-plex of size at least 2⁒kβˆ’1, and is maximal in G. Let vj∈S be the vertex with the smallest rank according to the ordering Οƒ.

If j>i, then since G⁒[CβˆͺS] has a diameter of at most 2, the vertex vj must be at distance at most 2 from every vertex in C. By the definition of Gi, this means vj∈V⁒(Gi), so Cβˆͺ{vj}βŠ†V⁒(Gi) forms a k-plex of size at least 2⁒kβˆ’1 in Gi, contradicting the maximality of C in Gi. Therefore, it must be that j<i. Now set Cβ€²=CβˆͺS, which by hypothesis is a k-plex of size at least 2⁒kβˆ’1, maximal in G. Since vj∈Cβ€²βˆ–C, we have C⊊Cβ€², and Cβ€²βŠ†V⁒(Gj) with j<i. This completes the first implication.

Conversely, suppose that there exists a maximal k-plex Cβ€² of size at least 2⁒kβˆ’1 in G, included in a subgraph Gj for some j<i, such that C⊊Cβ€². Then, by definition, C cannot be maximal in G, which completes the proof. β—€

Corollary 7.

Let G be a d-degenerate graph and let K be a maximal k-plex of size at least 2⁒kβˆ’1 of an induced subgraph Gi, i∈[n], such that K is not maximal in G. Let C be a maximal k-plex of size at least 2⁒kβˆ’1 of G, which is a subgraph of some graph Gj, j<i, and such that K is a subgraph of C. Let W⁒(K) and W⁒(C) be the words obtained from the vertices of the k-plexes K and C ordered according to ΟƒG. Then W⁒(K) is a proper suffix of W⁒(C).

Proof.

First observe that, by Lemma 6, the k-plex C is well defined and K⊊C. Let vi be the vertex of K with the smallest index in ΟƒG; thus, vi appears first in W⁒(K). Since K⊊C, we also have vi∈C.

Assume for contradiction that W⁒(K) is not a proper suffix of W⁒(C). This means that there exists at least one vertex x∈Cβˆ–K which appears after vi in W⁒(C). Otherwise, W⁒(K) would indeed be a proper suffix of W⁒(C). Let vj denote the vertex of C with the smallest index in ΟƒG; according to Lemma 6, we have j<i. Since any subset of a k-plex is itself a k-plex, it follows that Kβˆͺ{x} is a k-plex in Gj. Moreover, as K has size at least 2⁒kβˆ’1, so does Kβˆͺ{x}. By Lemma 4, Kβˆͺ{x} must have diameter at most 2, implying x∈N⁒(vi)βˆͺNi2⁒(vi). Thus, Kβˆͺ{x} is a k-plex of size at least 2⁒kβˆ’1 in Gi, which contradicts the maximality of K in Gi. β—€

Lemma 8.

Let G be a graph of degeneracy d. Then the size of any maximal k-plex in G of size at least 2⁒kβˆ’1 is at most d+k.

Proof.

Let C be a maximal k-plex in G of size at least 2⁒kβˆ’1, and let Οƒ be a degeneracy ordering of G with degeneracy d. Let vi be the vertex of C with the smallest rank in ΟƒG. By Lemma 5, CβŠ†V⁒(Gi). Therefore, C can contain at most kβˆ’1 vertices in Ni2⁒(vi); otherwise, the number of vi’s non-neighbors would exceed the allowed kβˆ’1, contradicting the definition of a k-plex. Moreover, by the definition of degeneracy, vi has at most d neighbors in Vi, so at most d vertices in Ni⁒(vi) can belong to C. Since Ni⁒(vi) and Ni2⁒(vi) are disjoint, we obtain the following inequality: |C|≀d+k. β—€

Lemma 9.

Let G be a graph, and d its degeneracy. Then the number of maximal k-defective cliques of size at least k+2 is π’ͺ⁒(n⁒k⁒2d⁒Δkβˆ’1).

Proof.

Let G be a d-degenerate graph and Οƒ a degeneracy ordering of its vertices. Denote by 𝒫⁒([d]) the set of all subsets of [1,d], and by 𝒫kβˆ’1 the set of all subsets of Ni2⁒(vi) of size at most kβˆ’1. Let Ξ±i denote the number of maximal k-plex of size at least 2⁒kβˆ’1 in the graph Gi, for i∈[n], containing vi, and let Ξ± be the number of maximal k-plex of size at least 2⁒kβˆ’1 in the graph G. According to Lemma 5, for every maximal k-plex of size at least 2⁒kβˆ’1 in G, there exists i∈[n] such that CβŠ†V⁒(Gi) and vi∈C. Furthermore, by Lemma 6, there may exist a maximal k-plex of size at least 2⁒kβˆ’1 in Gi containing vi (for some i∈[n]), which are not maximal in G. It follows that Ξ±β‰€βˆ‘i=1nΞ±i.

Let i∈[n]. By definition of Οƒ, the vertex vi has at most d neighbors of higher rank (i.e., greater index) in Οƒ; in other words, the cardinality of N⁒(vi) is at most d. Each vertex in N⁒(vi) is adjacent to at most Ξ” vertices in N2⁒i⁒(vi), so |N2⁒i⁒(vi)|≀d⁒Δ. Moreover, by arguments analogous to those in the proof of Lemma 8, any maximal k-plex of size at least 2⁒kβˆ’1 in Gi containing vi contains at most d vertices from N⁒(vi) and at most kβˆ’1 vertices from N2⁒i⁒(vi). Thus, for k-plex C, there exist two sets S1βŠ†π’«β’([d]) and S2βŠ†π’«k such that C={vi}βˆͺS1βˆͺS2. Therefore, we obtain the following inequality: Ξ±i≀|𝒫⁒([d])×𝒫kβˆ’1|, with |𝒫kβˆ’1|=βˆ‘r=0kβˆ’1(d⁒Δr) and |𝒫⁒([d])|=2d. As βˆ‘r=0kβˆ’1(d⁒Δr)∈π’ͺ⁒(k⁒Δkβˆ’1), it follows that |𝒫⁒([d])×𝒫kβˆ’1|∈π’ͺ⁒(k⁒2d⁒Δkβˆ’1), and thus Ξ±i∈π’ͺ⁒(k⁒2d⁒Δkβˆ’1). Consequently, Ξ±β‰€βˆ‘i=1nΞ±i which is bounded by π’ͺ⁒(n⁒k⁒2d⁒Δkβˆ’1). β—€

Lemma 10.

For any tuple (k,d,Ξ”,n) such that d≀k≀Δ≀n, we can construct a graph of order n with maximum degree Ξ” and degeneracy d such that G has Ω⁒((nβˆ’dβˆ’Ξ”)⁒3d/3⁒Δkβˆ’1) maximal k-plexes of size at least 2⁒kβˆ’1.

Proof.

Let G=(V,E) be a simple, undirected, d-degenerate graph with maximum degree Ξ”, and let Οƒ=(v1,v2,…,vn) be a degeneracy ordering. Set S1={vi:1≀i≀nβˆ’dβˆ’Ξ”}, S2=Vβˆ–S1, and consider a partition S2=S21βˆͺS22 such that |S21|=d, G⁒[S22] is a clique, and S1 is an independent set.

For every i∈{1,…,nβˆ’dβˆ’Ξ”}, let Gi be the subgraph induced by the vertex set {vi}βˆͺS2, where vi is adjacent to all vertices in S21, and vi is not adjacent to any vertex in S22. Let Ξ±i denote the number of maximal k-plexes of size at least 2⁒kβˆ’1 in Gi, and let Ξ± denote the number of such k-plexes in G. For i∈{1,…,nβˆ’dβˆ’Ξ”}, Consider C={vi}βˆͺC1βˆͺC2, where C1 is a maximal clique of S21 and C2βŠ†S22 is a subset of cardinality kβˆ’1. We show that C is a maximal k-plex of size at least 2⁒kβˆ’1 in Gi. First, CβŠ†V⁒(Gi), and since viβˆ‰C2, we have |C|=d+kβ‰₯k+2 by Lemma 8. Moreover, since S22 induces a clique and vi is not adjacent to any vertex in S22, the subgraph Gi⁒[C] missing exactly kβˆ’1 edges, namely those between vi and each vertex of C2. Thus, C is indeed a k-plex in Gi.

Assume for contradiction that C is not maximal in G; then there exists u∈Vβˆ–C such that Cβˆͺ{u} is a k-defective clique. Since |S21|=d, then vi and u are not adjacent; hence, vi has exactly k non-neighbors in G⁒[Cβˆͺ{u}], contradicting the definition of a k-plex. C is therefore maximal both in G and in Gi.

For every choice of a pair (C1,C2), we obtain a distinct maximal k-plex. There are exactly 3d/3 maximal cliques in S21 and (|S22|kβˆ’1)=(Ξ”kβˆ’1) subsets of size k in S22 (since |S22|=Ξ”). Thus, we obtain 3d/3⁒(Ξ”kβˆ’1) maximal k-plexes of the form C. Therefore, for each i∈{1,…,nβˆ’dβˆ’Ξ”}, we have Ξ±iβ‰₯3d/3⁒(Ξ”kβˆ’1). Moreover, since S1 is an independent set, every maximal k-plex of size at least 2⁒kβˆ’1 in Gi is also maximal in G, for each such i.

Finally, we obtain: Ξ±=βˆ‘i=1nβˆ’dβˆ’Ξ”Ξ±iβ‰₯(nβˆ’dβˆ’Ξ”)⁒3d/3⁒(Ξ”kβˆ’1) Now, since (Ξ”kβˆ’1)∈Ω⁒(Ξ”kβˆ’1), it follows that α∈Ω⁒((nβˆ’dβˆ’Ξ”)⁒3d/3⁒Δkβˆ’1).β—€

Lemma 11.

Let G be a d-degenerate graph with maximum degree Ξ”, Οƒ a degeneracy ordering of its vertices, and Gi the subgraph defined as in Definition 1 for some i∈[n]. If CβŠ†V⁒(Gi) is a k-plex of size at least 2⁒kβˆ’1, then one can verify whether C is maximal in Gi in time π’ͺ⁒((d+k)⁒d⁒Δ).

Proof.

Let CβŠ†V⁒(Gi) be a k-plex of size at least 2⁒kβˆ’1. To check whether C is maximal in Gi, it suffices, by Definition 2, to verify whether there exists a vertex u∈V⁒(Gi)βˆ–C such that Cβˆͺ{u} is still a k-plex in Gi. The cardinality of V⁒(Gi) is bounded by 1+d+d⁒Δ (i.e., O⁒(d⁒Δ)), since Gi contains at most d direct neighbors of vi and d⁒Δ vertices at distance two. Therefore, the size of V⁒(Gi)βˆ–C is also O⁒(d⁒Δ). For each u∈V⁒(Gi)βˆ–C, one needs to check whether |Cβˆͺ{u}|βˆ’degG⁒[Cβˆͺ{u}]⁑(v)≀kβˆ’1, for each v∈Cβˆͺ{u}, which can be done in O⁒(d+k) time, since |C|≀d+k by Lemma 4. If this condition holds for every v∈Cβˆͺ{u}), then C is not maximal in Gi. Therefore, the maximality of a k-plex can be verified in O⁒((d+k)⁒d⁒Δ) time. β—€

Lemma 12.

Let G be a d-degenerate graph, and let Gi, i∈[n], be the family of induced subgraphs defined in Definition 1. Let Ξ± denote the number of maximal k-plexes of size at least 2⁒kβˆ’1 in G, and let Ξ±i denote the number of such k-plexes in Gi. We have that βˆ‘i=1nΞ±i≀(d+k)⁒α.

Proof.

Let mi denote the number of maximal k-plexes of size at least 2⁒kβˆ’1 in Gi, i∈[n] that are also maximal in G, and let N⁒mi be the number of such k-plexes in Gi that are not maximal in G. Thus, Ξ±i=mi+N⁒mi.

Let C be a maximal k-plex of size at least 2⁒kβˆ’1 in G. By Lemma 8, the number of vertices in C is at most d+k. Consequently, W⁒(C), the word formed by the vertices of C ordered according to ΟƒG, can have at most d+kβˆ’1 proper suffixes.

Moreover, by Corollary 7, every maximal k-plex K of size at least 2⁒kβˆ’1 in some subgraph Gi, i∈[n], that is not maximal in G, satisfies W⁒(K) being a proper suffix of W⁒(C) for some maximal k-plex C in G. Therefore, βˆ‘i=1nN⁒mi≀(d+kβˆ’1)⁒α, and it follows that βˆ‘i=1nΞ±i=βˆ‘i=1n(mi+N⁒mi)β‰€βˆ‘i=1nmi+βˆ‘i=1nN⁒mi≀α+(d+kβˆ’1)⁒α=(d+k)⁒α. β—€

4.3 Algorithms for the enumeration of π’Œ-plexes

We now describe our enumeration framework for computing all maximal k-plexes of size at least 2⁒kβˆ’1 in a graph G. This section presents two algorithms: a base algorithm that enumerates all such k-plexes in each subgraph Gi, and a refined version that guarantees uniqueness of output using a generalized suffix tree. The first algorithm operates locally in each Gi and its enumeration time depends solely on the degeneracy of G, ensuring efficient exploration of the search space. The second algorithm builds upon the first by incorporating a filtering mechanism based on suffix tree rejection to avoid duplicate outputs. Both algorithms are described in detail and formally analyzed. The correctness and non-redundancy of the enumerated solutions are established in Theorems 13 and 14, while their complexities are proved in Theorems 15 and 16. Finally, in Theorem 17, we derive an output-sensitive result by applying the polynomial delay algorithm from [12] to the subgraphs Gi defined in Definition 1. By exploiting the fact that each Gi has size π’ͺ⁒(d⁒Δ), and combining this with the bound established in Lemma 12 on the total number of maximal k-plexes across all Gi’s, we design an output-sensitive algorithm with a total running time polynomial in d⁒Δ, and linear in the number of solutions.

Algorithm 1 The procedure to find the local maximal k-plexes.
Algorithm 2 The algorithm to find all maximal k-plexes.

4.3.1 Proof of correctness

Theorem 13.

Given a subgraph Gi as defined in Definition 1, Algorithm 1 outputs exactly all maximal k-plexes of size at least 2⁒kβˆ’1, containing vi, without duplication.

Proof.

Assume for contradiction that there exists a k-plex C of size at least 2⁒kβˆ’1, containing vi and maximal in Gi, which is not reported by Algorithm 1. Let C1=C∩N1 and C2=C∩N2, so that C={vi}βˆͺC1βˆͺC2. Observe that since C1βŠ†N1, the subset S1=C1 is examined at line 4 of the algorithm. Moreover, as vi has no neighbors in C2, it follows that |C2|≀kβˆ’1. Thus, the subset S2=C2 is included in the enumeration at line 5. Consequently, the set C is constructed at line 6, and by assumption, both the size and k-plex constraints at line 7, as well as the maximality criterion at line 8, are satisfied. Hence, Algorithm 1 must output C, a contradiction. It follows that every k-plex of size at least 2⁒kβˆ’1, containing vi and maximal in Gi, is indeed generated by the algorithm.

We now show that Algorithm 1 does not produce any duplicates. Suppose, to the contrary, that a k-plex C is generated more than once, i.e., there exist distinct pairs (S1,S2)β‰ (S1β€²,S2β€²) such that C={vi}βˆͺS1βˆͺS2={vi}βˆͺS1β€²βˆͺS2β€². By construction, S1,S1β€²βŠ†N1, S2,S2β€²βŠ†N2, with N1∩N2=βˆ…. Thus, the decomposition C={vi}βˆͺS1βˆͺS2 is unique, as the sets S1 and S2 are disjoint and correspond to non-overlapping neighborhoods. Therefore, if (S1,S2)β‰ (S1β€²,S2β€²), the resulting sets are necessarily distinct, contradicting our assumption. This establishes that each clique is output at most once by the algorithm. β—€

Theorem 14.

Given a subgraph G, and an integer k, Algorithm 2 outputs exactly all maximal k-plexes of size at least 2⁒kβˆ’1, without duplication.

Proof.

Assume for contradiction, that there exists a maximal k-plex C of size at least 2⁒kβˆ’1 in G that is not output by Algorithm 2. By Lemma 5, there exists a unique index i∈[n] such that C is maximal in Gi and CβŠ†V⁒(Gi). According to Theorem 13, Algorithm 1, which is called at line 4 of Algorithm 2, enumerates all maximal k-plexes in Gi without duplication. Thus, C must necessarily be produced at line 5. It follows that C can only be rejected by the suffix-tree rejection test (lines 7–9) if it is detected as a proper suffix of some already produced k-plex Cβ€² that is maximal in G, with C⊊Cβ€², as ensured by Corollary 7. However, the inclusion C⊊Cβ€² contradicts the maximality of C in G. Therefore, C must indeed be output by Algorithm 2. We conclude that Algorithm 2 outputs all maximal k-plexes of size at least 2⁒kβˆ’1 in G.

We now show that there is no duplication. Assume for contradiction, that this is not the case; that is, there exists a maximal k-plex C of size at least 2⁒kβˆ’1 in G that is output at least twice by Algorithm 2. Since Algorithm 1 enumerates, without duplication, all maximal k-plexes of each subgraph Gi, i∈[n], at line 4, the only possibility is that C is enumerated in two different subgraphs Gi and Gj with iβ‰ j. However, this contradicts Lemma 5, which guarantees that a maximal k-plex of size at least 2⁒kβˆ’1 in G is included in exactly one such subgraph Gi.

Hence, by contradiction, Algorithm 2 outputs exactly all maximal k-plexes of size at least 2⁒kβˆ’1 in G, without duplication. β—€

4.3.2 Proofs of complexity

This subsection establishes the computational complexity of our enumeration algorithms for maximal k-plexes of size at least 2⁒kβˆ’1. We analyze both the local enumeration within individual subgraphs Gi and then the enumeration across the entire graph G. These bounds exploit the structural properties of degeneracy orderings and leverage the combinatorial limits established in Lemma 9, combined with efficient suffix tree operations to ensure uniqueness of the output.

Theorem 15.

Given a graph Gi, i∈[n], and an integer k, the time complexity of Algorithm 1 is in π’ͺ⁒((d⁒k)3⁒2d⁒Δk).

Proof.

Let G be a d-degenerate graph, and let Οƒ be a degeneracy ordering of its vertices. For each vertex vi, the algorithm operates on the subgraph Gi, as defined in Definition 1. The for loop at line 4 enumerates all subsets S1βŠ†N1, yielding 2d iterations. The loop at line 5 iterates over all S2βŠ†N2 with |S2|≀kβˆ’1, corresponding to exactly βˆ‘r=0kβˆ’1(d⁒Δr) iterations, which is π’ͺ⁒(k⁒Δkβˆ’1). The checks at line 7 are performed in π’ͺ⁒(d+k) time, and the maximality verification at line 8 requires π’ͺ⁒(d⁒(d+k)⁒Δ) time according to Lemma 11. Therefore, the body of the inner loop runs in π’ͺ(d(d+k)2Ξ” time. In total, the algorithm has a complexity of π’ͺ⁒(d⁒k⁒(d+k)2⁒Δ⁒2d⁒Δkβˆ’1)=π’ͺ⁒(d⁒k⁒(d+k)2⁒2d⁒Δk), that is, π’ͺ⁒((d⁒k)3⁒2d⁒Δk). β—€

Theorem 16.

Given a graph G with degeneracy d and maximum degree Ξ”, and an integer k, the time complexity of Algorithm 2 is in π’ͺ⁒(n⁒(d⁒k)3⁒2d⁒Δk).

Proof.

Let G be a d-degenerate graph and let Οƒ be a degeneracy ordering of its vertices. The computation of the degeneracy and the ordering Οƒ at line 1 can be performed in π’ͺ⁒(m) time, where m is the number of edges. For lines 3–4, we consider each subgraph Gi for i∈[n], so this step is executed for n subgraphs in total. Enumerating all maximal k-plexes of size at least 2⁒kβˆ’1 in each Gi takes π’ͺ⁒((d⁒k)3⁒2d⁒Δk) time by Theorem 15. According to Lemma 9, each subgraph Gi contains π’ͺ⁒(2d⁒Δk) maximal k-plexes of size at least 2⁒kβˆ’1. Thus, the for loop at line 5 runs π’ͺ⁒(2d⁒Δk) times. Regarding lines 5–12: Ordering the vertices of C according to Οƒ can be done in π’ͺ⁒(|C|)βŠ†π’ͺ⁒(d+k) time, by Lemma 8. Suffix tree operations (search and insertion) for words of length at most d+k can be performed in π’ͺ⁒(d+k) time (see [17]). Thus, the body of the inner loop at line 5 has complexity π’ͺ⁒((d+k)⁒2d⁒Δk), and so the outer loop at line 3 has total complexity π’ͺ⁒(n⁒((d⁒k)3⁒2d⁒Δk+n⁒(d+k)⁒2d⁒Δk))=π’ͺ⁒(n⁒(d⁒k)3⁒2d⁒Δk). Since all other steps require at most π’ͺ⁒(m) operations, it follows that the overall complexity of the algorithm is π’ͺ⁒(n⁒(d⁒k)3⁒2d⁒Δk). β—€

Theorem 17.

Given a graph G of degeneracy d and maximum degree Ξ”, and an integer k, one can enumerate all maximal k-plexes of size at least 2⁒kβˆ’1, without duplication, in time π’ͺ⁒(α⁒f⁒(k)⁒p⁒(d⁒Δ)), where Ξ± denotes the number of maximal k-plexes of size at least 2⁒kβˆ’1 in G, p⁒(d⁒Δ) is a polynomial function of d⁒Δ, and f⁒(k) is an arbitrary function of k. The algorithm is output-sensitive, with total running time proportional to the number of solutions.

Proof.

Let Ξ± denote the number of maximal k-plexes of size at least 2⁒kβˆ’1 in G, and let Ξ±i denote the number of such k-plexes in the subgraph Gi, for i∈[n]. In [2], the authors applied this framework to the specific case of k-plexes, resulting in a fixed-parameter tractable algorithm with polynomial delay and time complexity π’ͺ⁒(f⁒(k)⁒p⁒(n)), where n is the order of the graph, p⁒(n) is a polynomial function of n, and f⁒(k) is an arbitrary function of k. This algorithm can be adapted to our decomposition into subgraphs Gi, which yields a significant improvement in complexity: π’ͺ⁒(α⁒f⁒(k)⁒p⁒(d⁒Δ)). More concretely, the approach consists of applying this algorithm to each subgraph Gi, for i∈[n]. For each i∈[n], the order of Gi is Θ⁒(d⁒Δ), where Ξ” is the maximum degree of G. Consequently, the enumeration in each Gi can be performed with a delay between two outputs in π’ͺ⁒(f⁒(k)⁒p⁒(d⁒Δ)). Since there are Ξ±i such cliques in Gi, for i∈[n], the enumeration in Gi takes π’ͺ(Ξ±if(k)p(dΞ”) time.

Moreover, by applying the same arguments used in the proof of Lemma 12, it can be shown that βˆ‘i=1nΞ±i≀(d+kβˆ’1)⁒α. It follows that the enumeration over all subgraphs Gi can be performed in total time π’ͺ⁒(f⁒(k)⁒p⁒(d⁒Δ)β’βˆ‘i=1nΞ±i)∈π’ͺ⁒(α⁒f⁒(k)⁒p⁒(d⁒Δ)). To ensure that only cliques which are maximal in G are retained, a similar filtering procedure to that of Algorithm 2 can be used. This step requires π’ͺ⁒((d+k)⁒α) time, as established in the proof of Theorem 16. Therefore, by Lemma 5, Lemma 6, and Corollary 7, this approach yields an exhaustive, duplication-free enumeration of all maximal k-defective cliques of size at least k+2 in G, with total time complexity π’ͺ⁒(α⁒f⁒(k)⁒p⁒(d⁒Δ)). β—€

4.4 Application to the enumeration of π’Œ-defective cliques

In this section, we show how to effectively extend our analytical framework to the enumeration of k-defective cliques. We leverage the fact that a k-defective clique is, by definition, a (k+1)-plex, which allows us to reuse the algorithms previously developed for the enumeration of k-plexes. By inserting an additional verification step into the enumeration algorithm, we ensure that only those (k+1)-plexes satisfying the k-defectiveness condition are retained. This refinement enables the duplication-free generation of all maximal k-defective cliques of size at least k+2 in a given graph, as established in Theorem 16.

We then introduce an alternative approach based on an output-sensitive algorithm that fully exploits the degeneracy and the maximum degree of the graph to improve the computational complexity. Theorem 19 formalizes this optimization by providing a bound on the total running time in terms of the number of solutions. To the best of our knowledge, these are the first output-sensitive bounds for this problem that are expressed solely in terms of the parameters k, Ξ”, d, and the number of maximal k-defective cliques. Since the proofs of Theorems 18 and 19 are similar to the proofs presented in Section 4.3.

Theorem 18.

Given a graph G of degeneracy d and maximum degree Ξ”, and an integer k, one can enumerate all maximal k-defective cliques of size at least k+2, without duplication, in time π’ͺ⁒(n⁒(d⁒k)5⁒2d⁒Δk+1).

Proof.

Since every k-defective clique is a (k+1)-plex, the enumeration algorithm for maximal (k+1)-plexes can be leveraged to enumerate all maximal k-defective cliques. Specifically, Algorithm 2 is applied to enumerate all maximal (k+1)-plexes of size at least 2⁒k+1. Immediately after Line 11 of Algorithm 2, an additional verification step is incorporated to test whether the current (k+1)-plex is also a k-defective clique. This verification consists in counting the number of missing edges in the subgraph induced by the current (k+1)-plex. It can be performed in π’ͺ⁒((d+k)2) time. According to Theorem 16, Algorithm 2 enumerates all maximal (k+1)-plexes of size at least 2⁒k+1 in π’ͺ⁒(n⁒(d⁒k)3⁒2d⁒Δk+1) time. Since the additional verification for the k-defective clique condition is performed once per candidate and requires at most π’ͺ⁒((d+k)2) time, the total time per candidate becomes π’ͺ⁒((d⁒k)3⁒(d+k)2⁒2d⁒Δk+1)=π’ͺ⁒((d⁒k)5⁒2d⁒Δk+1). Finally, by Lemma 9, Lemma 10, and Corollary 7, the suffix-tree-based filtering guarantees that only the k-defective cliques which are maximal in G are retained, and that no duplicates are produced. Hence, this approach yields an exhaustive, duplication-free enumeration of all maximal k-defective cliques of size at least k+2 in G, with overall time complexity π’ͺ⁒((d⁒k)5⁒2d⁒Δk+1). β—€

Theorem 19.

Given a graph G of degeneracy d and maximum degree Ξ”, and an integer k, one can enumerate all maximal k-defective cliques of size at least k+2, without duplication, in time π’ͺ⁒(n⁒α⁒(d⁒Δ)2⁒(d+k)2⁒k+24k), where Ξ± denotes the number of maximal k-defective cliques of size at least k+2 in G. The algorithm is output-sensitive, with total running time proportional to the number of solutions.

Proof.

Let Ξ± denote the number of maximal k-defective cliques of size at least K+2 of G, and let Ξ±i denote the number of maximal k-defective cliques of size at least k+2 in the subgraph Gi, i∈[n]. In [10], Algorithm 3 enumerates all maximal k-defective cliques of size at least k+2 in a graph G, with a delay of π’ͺ⁒(n2⁒Nm2⁒k+1/4k) between two outputs, where n is the order of the graph and Nm denotes the size of the largest maximal k-defective clique in G. This algorithm can be adapted to our decomposition into subgraphs Gi, which allows for a significant complexity improvement to π’ͺ⁒(n⁒(d⁒Δ)2⁒(d+k)2⁒k+2/4k), where d is the degeneracy of the input graph and n its order. More concretely, the approach consists in applying Algorithm 3 to each subgraph Gi, i∈[n]. For every i∈[n], the order of Gi is Θ⁒(d⁒Δ), where Ξ” is the maximum degree of G. Moreover, Lemma 4 ensures that the size of the largest maximal k-defective clique of size at least k+2 in Gi is at most d+k+1. Thus, the enumeration in each Gi can be performed with a polynomial delay of π’ͺ⁒((d⁒Δ)2⁒(d+k)2⁒k+1/4k). Consequently, the enumeration in each Gi can be performed with a polynomial delay between two outputs in π’ͺ⁒((d⁒Δ)2⁒(d+k)2⁒k+14k). Since there are Ξ±i such cliques in Gi, for i∈[n], the enumeration in Gi takes π’ͺ⁒(Ξ±i⁒(d⁒Δ)2⁒(d+k)2⁒k+14k) time. Moreover, by applying exactly the same arguments used in the proof of Lemma 12, it can be shown that βˆ‘i=1nΞ±i≀(d+kβˆ’1)⁒α. It follows that the enumeration over all subgraphs Gi can be performed in total time π’ͺ⁒((d⁒Δ)2⁒(d+k)2⁒k+14kβ’βˆ‘i=1nΞ±i)∈π’ͺ⁒(α⁒(d⁒Δ)2⁒(d+k)2⁒k+24k). To ensure that only cliques which are maximal in G are retained, one can use a similar filtering procedure as in Algorithm 2, which requires π’ͺ⁒(α⁒(d+k)) time, as established in the proof of Theorem 16. Therefore, by Lemma 5, Lemma 6, and Corollary 7, this approach yields an exhaustive, duplication-free enumeration of all maximal k-defective cliques of size at least k+2 in G withπ’ͺ⁒(α⁒(d⁒Δ)2⁒(d+k)2⁒k+34k) time. β—€

4.5 Application to the enumeration of 2-plexes

In this section, we focus on the enumeration of maximal 2-plexes. We build upon some of the combinatorial results presented in the previous sections and apply a variation of a result by Eppstein [12] concerning the enumeration of non-induced maximal bicliques. This allows us to derive a linear-time algorithm, with complexity π’ͺ⁒(n), to enumerate maximal 2-plexes in graphs of constant degeneracy.

Recall that a non-induced biclique is a bipartite subgraph AΓ—B such that every vertex in A is adjacent to every vertex in B, without the requirement that A and B form independent sets. Such a biclique is said to be maximal if it is not properly contained in any other biclique of the same form. Moreover, given an undirected graph G, a d-bounded orientation of G is any orientation of the edges such that each vertex has out-degree at most d. In this section, the term biclique always refer to non-induced bicliques.

Lemma 20.

Let G be an undirected d-degenerate graph, and let C be a 2-plex of size at least 3 and maximal in G. Then there exists a maximal non-induced biclique AΓ—B in G such that CβŠ†AβˆͺB.

Proof.

Let G be an undirected d-degenerate graph, and let C be a maximal 2-plex of size at least 3 in G. By Lemma 5, there exists i∈[n] such that CβŠ†V⁒(Gi) and vi∈C. Let us define A=C∩N⁒(vi), and B=C∩(Ni2⁒(vi)βˆͺ{vi}) , so that C=AβˆͺB. By construction, AβŠ†N⁒(vi), and thus |A|≀d. Since C is a 2-plex, C can contain at most one vertex in Ni2⁒(vi), ensuring that vi has at most one non-neighbor in C. Hence, |B|≀2. Furthermore, by the definition of N⁒(vi), the vertex vi is adjacent to every vertex in A, and every u∈B is adjacent to every vertex in A as well; otherwise, u would have more than one non-neighbor in C, contradicting the fact that C is a 2-plex. Consequently, AΓ—B forms a biclique. If AΓ—B is maximal, the lemma holds, otherwise it is included in a maximal non-induced biclique containing AΓ—B. β—€

Lemma 21 (Folklore).

If a graph G has degeneracy d, it has a d-bounded orientation.

Lemma 22 (Eppstein [12]).

Given a graph G with a d-bounded orientation, and a collection of sets Ai, where each Ai is a 2-plex of size at most d in G, it is possible to compute the corresponding non-induced bicliques AiΓ—Bi in total time π’ͺ⁒(d⁒2d⁒n+d2⁒r), where r denotes the total size of all sets Ai.

Proof.

We rely on a result established in [12], which shows that, given a graph equipped with a d-bounded orientation and a collection of sets A1,…,Am, where each Ai is a subset of vertices, all non-induced bicliques AiΓ—Bi can be listed in total time π’ͺ⁒(d2⁒n+d2⁒r), where r denotes the total size of sets Ai. In our case, we consider as candidates the sets Ai defined as 2-plexes of size at most d in the subgraphs Gj, j∈[n], according to Definition 1. More specifically, we restrict to sets AiβŠ†N⁒(vj), since N⁒(vj) contains at most d vertices due to the degeneracy of the graph. Therefore, each Gj contains at most 2d such subsets. Summing over all n vertices vj, the total number of sets Ai is thus bounded by n⁒2d. All these sets can therefore be listed in time π’ͺ⁒(n⁒2d). Then, by applying the result from [12] to this collection, all non-induced bicliques AiΓ—Bi can be listed in total time π’ͺ⁒(d2⁒n+d2⁒n⁒2d+n⁒2d)=π’ͺ⁒(d2⁒n+d2⁒2d⁒n), since r=n⁒2d. β—€

The proof of the following theorem is similar to that given by Eppstein [12] for their linear-time algorithm to enumerate maximal non-induced bicliques, with a few additional simple steps.

Theorem 23.

If an undirected graph G has degeneracy d=π’ͺ⁒(1), then all maximal 2-plexes of G can be listed in π’ͺ⁒(n) time.

Proof.

We rely on Theorem 1 from [12], which establishes that for any graph G with arboricity a=π’ͺ⁒(1), all maximal non-induced bicliques of G can be listed without duplication in total time π’ͺ⁒(n), where n denotes the order of the graph. In their proof, the arboricity is used to ensure the existence of a 2⁒a-bounded acyclic orientation of the graph. However, in our context, Lemma 21 guarantees that any d-degenerate graph admits a d-bounded orientation. Moreover, Lemma 3 from [12] ensures that such a d-bounded orientation implies the existence of a 2⁒d-bounded acyclic orientation, which can be computed in linear time. It follows that a graph with degeneracy d=π’ͺ⁒(1) admits a 2⁒d-bounded acyclic orientation, thus allowing the application of Theorem 1 from [12] within our framework. To make use of this result, we adapt the technical lemmas from [12] by replacing their Lemmas 2 and 4 with our Lemmas 21 and 22, respectively. Indeed, in the proof of Lemma 21, we define a collection of sets Ai as the 2-plexes of size at most d in the subgraphs Gj, which enables the efficient listing of non-induced bicliques of the form AiΓ—Bi. Then, Lemma 20 ensures that every maximal 2-plex in G is included in some maximal biclique of G.

However, this is not sufficient to recover exactly all maximal 2-plexes. Recall that in Lemma 20, it is shown that a maximal 2-plex is composed of a vertex vi (the vertex with the smallest rank in the 2-plex, with respect to a degeneracy ordering), a set Ai of its neighbors with higher rank at distance one, and a single vertex with the highest rank at distance two. Therefore, given a maximal non-induced biclique AiΓ—Bi, to find all 2-plexes included in that biclique, it suffices to identify the vertices in Bi that are not neighbors of the vertex vi. This can be done in time π’ͺ⁒(nΓ—d). According to Theorem 1 of Eppstein [12], the computation of the sets Bi requires π’ͺ⁒(a3⁒22⁒a⁒n) time, where a is the arboricity of the graph. Recalling that d=2⁒a, the total time complexity becomes π’ͺ⁒(a3⁒22⁒a⁒n+d⁒22⁒a⁒n)=π’ͺ⁒((a3+2⁒a)⁒22⁒a⁒n), which yields the claimed result. β—€

References

  • [1] A.Conte, T. De Matteis, D. De Sensi, R. Grossi, A. Marino, and L. Versari. D2k: Scalable community detection in massive networks via small-diameter k-plexes. In Proceedings of the 24th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, pages 1272–1281. ACM, 2018. doi:10.1145/3219819.3220093.
  • [2] D. Berlowitz, S. Cohen, and B. Kimelfeld. Efficient enumeration of maximal k-plexes. In Proceedings of the 2015 ACM SIGMOD International Conference on Management of Data, pages 431–444. ACM, 2015. doi:10.1145/2723372.2746484.
  • [3] C. Bron and J. Kerbosch. Algorithm 457: Finding all cliques of an undirected graph. Communications of the ACM, 16(9):575–577, 1973. doi:10.1145/362342.362367.
  • [4] Y. Cai and M. Xiao. A new exact algorithm for the maximum k-defective clique problem, 2023. arXiv:2309.02635.
  • [5] Y. Cai and M. Xiao. A simple yet effective branching algorithm for the maximum k-defective clique problem, 2024. arXiv:2407.16588.
  • [6] X. Chen, Y. Zhou, J.-K. Hao, and M. Xiao. Computing maximum k-defective cliques in massive graphs. Computers & Operations Research, 127:105131, 2021. doi:10.1016/J.COR.2020.105131.
  • [7] S. Cohen, B. Kimelfeld, and Y. Sagiv. Generating all maximal induced subgraphs for hereditary and connected-hereditary graph properties. Journal of Computer and System Sciences, 74(7):1147–1159, 2008. doi:10.1016/j.jcss.2007.12.006.
  • [8] A. Conte, P. Foggia, and M. Vento. Exploring community structures using relaxed cliques. European Journal of Operational Research, 226(1):103–113, 2013. doi:10.1016/j.ejor.2012.10.031.
  • [9] A. Conte, T. De Matteis, D. De Sensi, R. Grossi, A. Marino, and L. Versari. D2k: Scalable community detection in massive networks via small-diameter k-plexes. In Proceedings of the 24th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pages 1272–1281. ACM, 2018. doi:10.1145/3219819.3220101.
  • [10] Q. Dai, R.-H. Li, M. Liao, and G. Wang. Maximal defective clique enumeration. Proceedings of the ACM on Management of Data, 1(1):Article 77, 2023. doi:10.1145/3588931.
  • [11] Q. Dai, R.-H. Li, and G. Wang. Output-sensitive enumeration of maximal k-plexes of minimum size in massive graphs, 2024. arXiv:2402.13008.
  • [12] D. Eppstein. Arboricity and bipartite subgraph listing algorithms. Information Processing Letters, 51(4):207–211, 1994. doi:10.1016/0020-0190(94)90121-X.
  • [13] T. Gao, Z. Xu, R. Li, and M. Yin. An exact algorithm with new upper bounds for the maximum k-defective clique problem in massive sparse graphs. In Proceedings of the AAAI Conference on Artificial Intelligence (AAAI), pages 10174–10183, 2022.
  • [14] M. GrbiΔ‡, A. Kartelj, S. JankoviΔ‡, D. MatiΔ‡, and V. FilipoviΔ‡. Variable neighborhood search for partitioning sparse biological networks into the maximum edge-weighted k-plexes. arXiv preprint arXiv:1807.01160, 2018. arXiv:1807.01160.
  • [15] X. Li, H. Chen, and H. Yan. The identification of protein complexes from weighted ppi networks using a novel core-attachment method. BMC Bioinformatics, 11(1):1–13, 2010. doi:10.1186/1471-2105-11-595.
  • [16] Y. Liu, L. Zhou, and Q. Liu. Community detection based on k-plexes in complex networks. Physica A: Statistical Mechanics and its Applications, 503:999–1009, 2018. doi:10.1016/j.physa.2018.02.159.
  • [17] G. Manoussakis. A new decomposition technique for maximal clique enumeration for sparse graphs. Theoretical Computer Science, 770:25–33, 2019. doi:10.1016/j.tcs.2018.10.014.
  • [18] C. Verma and A. K. Tripathi. Enumeration of k-defective cliques, 2024. arXiv:2407.16588.
  • [19] Z. Wang, Y. Zhou, M. Xiao, and B. Khoussainov. Listing maximal k-plexes in large real-world graphs. In Proceedings of the ACM Web Conference 2022, WWW ’22, pages 1517–1527, New York, NY, USA, 2022. Association for Computing Machinery. doi:10.1145/3485447.3512198.
  • [20] B. Wu and X. Pei. A parallel algorithm for enumerating all the maximal k-plexes. In Pacific-Asia Conference on Knowledge Discovery and Data Mining, pages 476–483. Springer, 2007. doi:10.1007/978-3-540-71701-0_46.
  • [21] M. Yannakakis. Node- and edge-deletion np-complete problems. In Proceedings of the Tenth Annual ACM Symposium on Theory of Computing (STOC), pages 253–264. ACM, 1978. doi:10.1145/800133.804355.
  • [22] H. Yu, X. Zhao, and H. Huang. Discovering protein complexes based on k-plexes in protein interaction networks. PLOS ONE, 9(7):e101541, 2014. doi:10.1371/journal.pone.0101541.
  • [23] J. Zhou, X. Chen, J. Huang, and Q. Fang. Efficient community detection based on k-plexes in social networks. Information Sciences, 512:1172–1192, 2020. doi:10.1016/j.ins.2019.10.057.
  • [24] Y. Zhou, J. Xu, Z. Guo, M. Xiao, and Y. Jin. Enumerating maximal k-plexes with worst-case time guarantee. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 34, pages 2442–2449, 2020.