---
title: 'FastQC: γ-Quasi-Clique Enumeration'
url: https://www.emergentmind.com/topics/fastqc-algorithm
type: topic
---

# FastQC: γ-Quasi-Clique Enumeration

FastQC is a branch-and-bound (BB) algorithm designed for the efficient enumeration of all large maximal $\gamma$-quasi-cliques (MQCs) in undirected graphs. The method introduces co-designed pruning and branching rules to overcome time complexity barriers of prior approaches, complemented by a divide-and-conquer enhancement. FastQC enables the practical discovery of cohesive subgraph structures at scales and densities previously infeasible due to both theoretical worst-case bounds and empirical performance bottlenecks [2305.14047].

## 1. Problem Formulation: Maximal γ-Quasi-Clique Enumeration

Let $G = (V, E)$ be an undirected graph with $n = |V|$ vertices. Fix a density parameter $\gamma \in [0.5, 1]$ and a size threshold $\sigma > 0$.

- **γ-Quasi-Clique (γ-QC):** An induced subgraph $G[H]$ ($H \subseteq V$) is a $\gamma$-quasi-clique if:
  1. $G[H]$ is connected; and
  2. For every $v \in H$, $\deg_{G[H]}(v) \geq \gamma \cdot (|H| - 1)$.

Equivalently, defining the maximum number of disconnections in $G[H]$ as
$$
A(H) \equiv \max_{v \in H} (|H| - 1 - \deg_{G[H]}(v)),
$$
we require $A(H) \leq T(|H|)$, where $T(x) = \lfloor (1 - \gamma)x + \gamma \rfloor$.

- **Maximal γ-Quasi-Clique (MQC):** A $\gamma$-QC $G[H]$ is maximal if no $H' \supset H$ exists such that $G[H']$ is also a $\gamma$-QC.

- **Enumeration Problem (MQCE):** Output all MQCs in $G$ of size at least $\sigma$.

Since QC maximality checking is NP-hard and the QC family is non-hereditary, enumeration is typically staged:
1. Enumerate a superset $S$ containing all MQCs.
2. Filter $S$ for maximality.

FastQC addresses the superset enumeration stage via an advanced BB framework.

## 2. Branch-and-Bound Framework in FastQC

FastQC explores the space of vertex subsets using a recursive BB search, where each node (branch) is represented by a triple $(S, C, D)$:
- $S$: current partial set (must-include vertices)
- $C$: candidate set (potential additions to $S$)
- $D$: excluded set (must-not-include vertices)

Subsets $H$ satisfying $H \supseteq S$, $H \subseteq S \cup C$, $H \cap D = \emptyset$ are explored under each node.

The high-level recursive process `FastQC-Rec(S, C, D)` operates as follows:
- Apply pruning (described in Section 3).
- If candidate set $C$ is empty, test $S$ for being a $\gamma$-QC (output if $|S| \geq \sigma$).
- When an early-stop maximality criterion is satisfied, output $S \cup C$ as a found MQC.
- Otherwise, select a pivot $u \in S \cup C$ and branch via the selected branching strategy (see Section 4).

## 3. Pruning Mechanisms: Size–Disconnection Space

FastQC introduces pruning rules in the "size–disconnection (SD)" space, efficiently restricting search to promising branches.
For any $H \subseteq V$:
- $A(H) = \max_{v \in H} (|H| - 1 - \deg_{G[H]}(v))$
- $T(x) = \lfloor (1 - \gamma)x + \gamma \rfloor$

For each node $B = (S, C, D)$:
- Lower bound on QC size: $|S|$
- Upper bound: $o(B) = \min\big\{|S \cup C|,~ \lfloor d_{\min}(B)/\gamma \rfloor + 1\big\}$, where $d_{\min}(B) = \min_{v \in S} \deg_{G[S \cup C]}(v)$

Branch $B$ can only contain a $\gamma$-QC if:
$$
A(S) \leq T(o(B))
$$

Vertex refinement in $C$ is performed by progressive pruning:
- (R1) Remove $v$ if $A(S \cup \{v\}) > T(o(B))$ — inclusion of $v$ violates QC bounds.
- (R2) Remove $v$ if $\deg_{G[S \cup C]}(v) < \sigma - T(o(B))$ — no large QC could include $v$.

These pruning operations are iterated, updating $o(B)$ and re-checking the pruning condition until no further removal is possible. If $A(S) > T(o(B))$ at any step, the branch is safely pruned. This ensures the correctness and safety of the enumeration process, as only subsets $H \supseteq S$ with $A(H) \leq T(|H|) \leq T(o(B))$ can form $\gamma$-QCs.

## 4. Branching Strategies: Sym-SE and Hybrid-SE

Once pruning and candidate refinement stall, FastQC branches the current search node using symmetry-exploiting rules.

- **Symmetric SE branching (Sym-SE):** Order candidates $C = (v_1, \ldots, v_m)$. Branch into $m+1$ child nodes, each enforcing inclusion/exclusion decisions on $v_i$. For increasing $i$, $A(S_i)$ increases; if $A(S_i) > T(o(B))$, all further siblings are pruned.

- **Hybrid-SE branching:** Triggered when a pivot $u$ has $\deg_{dis}(u) > T(o(B))$ and $\deg_S(u) = 0$. The "exclude $u$" branch uses SE branching and a separate necessary condition for maximality; the "include $u$" uses Sym-SE to prune non-QC branches—boosting pruning efficacy.

Pivot selection prefers $u \in S \cup C$ with maximal disconnections to maximize the utility of subsequent pruning.

## 5. Worst-Case Time Complexity

Let $k = \max_{B} T(o(B))$, with the bound $k \leq T(n)$ and typically $k \ll n$. Define $\alpha_k$ as the maximal real root of $x^{k+2} - x^{k+1} - 2x^{k} + 2 = 0$. FastQC explores at most $O(n d \alpha_k^n)$ recursion nodes, with $\alpha_k < 2$ for all $k \geq 1$ (e.g., $\alpha_2 \approx 1.769$, $\alpha_3 \approx 1.899$, $\alpha_4 \approx 1.953$).

All pruning and branching rules are proven, via induction and recurrence analysis, to satisfy this exponential node growth, improving on the $O^*(2^n)$ worst-case bounds of prior BB approaches [2305.14047].

## 6. Divide-and-Conquer Enhancement: DCFastQC

To scale FastQC to massive or dense graphs, a divide-and-conquer variant ("DCFastQC", *Editor's term*) is employed:
- Compute a degeneracy ordering $v_1, \ldots, v_n$.
- For each $v_i$, define $V_i = \{v_j : \mathrm{dist}_G(v_i, v_j) \leq 2,~ j \geq i\}$ and form subgraph $G_i = G[V_i]$.
- Each MQC appears in exactly one $G_i$ where $v_i$ is minimal by degeneracy rank.
- Algorithm outline:
  1. Peel $G$ to its $\lfloor \gamma \cdot (\sigma-1) \rfloor$-core.
  2. For $i = 1$ to $n$:
     - Form $G_i = G[V_i]$;
     - Iteratively prune via one-hop/two-hop pruning;
     - Call `FastQC-Rec(S = \{v_i\}, C = V_i \setminus \{v_i\}, D = \{v_1, \ldots, v_{i-1}\})$.

For degeneracy $\delta$ and maximum degree $d$, each $G_i$ has $O(\delta d)$ vertices; aggregate runtime is $O(n \delta d \alpha_k^{\delta d})$, yielding substantial acceleration on sparse or locally bounded graphs.

## 7. Empirical Performance and Observations

Empirical evaluation on both real (12 network datasets, up to $23$M vertices and $261$M edges) and synthetic (Erdős–Rényi, up to $10^6$ vertices, varied densities) graphs demonstrates:

- Against Quick+ (state-of-the-art BB), DCFastQC achieves up to $100\times$ speedup on real-world networks (e.g., Enron, WordNet, Pokec), solving instances in seconds where Quick+ requires minutes or fails due to memory exhaustion.
- Speedup increases with $\gamma$ and $\sigma$ as the search space becomes more amenable to aggressive pruning.
- On dense Erdős–Rényi graphs, DCFastQC successfully handles $10^5$–$10^6$ vertices and edge-densities up to $70$, where Quick+ fails beyond $10^5$ vertices.
- DCFastQC and FastQC return identical sets of MQCs, but enumerate far fewer non-maximal QCs, significantly reducing the burden of the subsequent maximality filtering step and further improving overall enumeration efficiency.

These results establish FastQC (and DCFastQC) as among the fastest and most theoretically robust algorithms for maximal $\gamma$-quasi-clique enumeration in large-scale graphs [2305.14047].

Source: https://www.emergentmind.com/topics/fastqc-algorithm