🧩 Constraint Solving POTD:Problem of the Day: Maximum Clique Problem #63417
Closed
Replies: 1 comment
|
This discussion has been marked as outdated by Constraint Solving — Problem of the Day. A newer discussion is available at Discussion #63611. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Problem Statement
The Maximum Clique Problem asks: given an undirected graph
G = (V, E), find the largest subset of verticesC ⊆ Vsuch that every pair of vertices inCis connected by an edge. We sayCis a clique—a complete subgraph where everyone knows everyone.Concrete Example:
Consider a social network with 6 people and these friendships:
Can you find the largest group where all members are mutual friends? {Alice, Bob, Charlie} is a clique of size 3. Can you do better?
Input/Output Specification:
G = (V, E)withn = |V|vertices andm = |E|edgesC ⊆ Vmaximizing|C|such that ∀u, v ∈ C: (u, v) ∈ EWhy It Matters
Social network analysis: Identifying tight-knit communities where everyone interacts with everyone else helps platforms detect user clusters for recommendation and content moderation.
Bioinformatics: Finding cliques in protein interaction networks reveals functionally related protein complexes that work together in cellular processes.
Conflict analysis: In scheduling, a clique in a conflict graph represents a set of tasks that all mutually conflict—critical for feasibility analysis.
SAT solver optimization: Maximum clique is equivalent to maximum independent set and relates to satisfiability; solving it efficiently informs the design of SAT and SMT solvers.
Modeling Approaches
Approach 1: Integer Linear Programming (ILP)
Decision variables:
x_v ∈ {0, 1}for each vertexv(1 ifvis in the clique).Objective: Maximize Σ
x_v.Constraints:
(u, v) ∉ E, we havex_u + x_v ≤ 1(at most one of them is in the clique).x_u + x_v + x_w ≤ 2for triangles missing from the graph.Trade-offs: ILP is exact and benefits from decades of solver engineering. However, the linear relaxation can be weak, requiring many branch-and-bound nodes. Scalability is limited to ~1000 vertices for hardest instances.
Approach 2: Constraint Programming with Arc Consistency
Decision variables:
clique[i] ∈ {0..n}for each vertexiandsize ∈ {0..n}representing clique membership.Constraints:
iandjare both in the clique, then they must be adjacent:(clique[i] = 1 ∧ clique[j] = 1) → (i, j) ∈ E.size = Σ clique[i](total clique size).Propagation: Domain filtering exploits neighborhood structure—if vertex
iis in the clique, remove any vertex not adjacent toifrom the remaining domain.Trade-offs: CP naturally encodes reachability and global constraints. The neighborhood propagation is efficient. Local search and branch-and-bound can find good solutions quickly, though proving optimality requires exhaustive search.
Approach 3: Reduction to Maximum Independent Set
The complement graph
Ḡhas an edge betweenuandviff(u, v) ∉ EinG. A clique inGis an independent set inḠ. Solving maximum independent set onḠyields the maximum clique inG. This reduction clarifies the computational complexity and enables reuse of independent-set algorithms.Example Model (Pseudo-code)
This model enforces that any pair in the clique must be adjacent. The solver searches over 2^n subsets, pruned by domain consistency.
Key Techniques
1. Clique Graph Representation & Neighborhood Propagation
Maintain adjacency lists for each vertex. When a vertex
venters the clique, immediately restrict remaining candidate vertices toN(v)(neighbors ofv). This reduces the search space exponentially and is the backbone of practical clique-finding algorithms.2. Branch-and-Bound with Upper Bounds
Use a greedy coloring of the remaining graph to estimate an upper bound on the maximum clique size reachable from the current partial solution. If
current_size + upper_bound ≤ incumbent, prune. Also, compute lower bounds via greedy clique construction to focus the search.3. Symmetry Breaking & Canonical Forms
Since the vertex ordering is arbitrary, many search branches explore isomorphic subproblems. Use canonical labeling (e.g., lexicographically smallest clique representation) or impose strict ordering: require vertex indices in the clique to be strictly increasing,
v_1 < v_2 < ... < v_k.Challenge Corner
Can you model this as a SAT formula? Given a target clique size
k, encode "find a clique of size ≥ k" as a Boolean formula and feed it to a SAT solver. How many clauses do you need?Symmetry & Certificates: A clique is its own certificate—easy to verify. But the maximum clique problem is NP-hard. Can you design a symmetry-breaking rule that doesn't discard the optimal clique?
Greedy vs. Optimal: A greedy algorithm picks vertices greedily if they're adjacent to all current clique members. Does this always find a maximal clique? Why or why not? Can you improve it?
Parameterized Complexity: For graphs with bounded degeneracy
d, can you solve maximum clique faster than 2^n? What about planar graphs?References
Rossi, F., van Beek, P., & Walsh, T. (2006). Handbook of Constraint Programming. Chapter on hard combinatorial problems. Elsevier. — Covers cliques, independent sets, and graph problems in CP.
Bomze, I. M., Budinich, M., Pardalos, P. M., & Pelillo, M. (1999). "The Maximum Clique Problem." In Handbook of Combinatorial Optimization. — Comprehensive survey of algorithms, complexity, and applications.
Konc, J., & Janežič, D. (2007). "An improved branch and bound algorithm for the maximum clique problem." MATCH Communications in Mathematical and in Computer Chemistry. — Modern practical algorithms leveraging neighborhood reduction.
Östergård, P. R. J. (2001). "A fast algorithm for the maximum clique problem." Discrete Applied Mathematics. — State-of-the-art exact algorithm combining bounds, pruning, and efficient data structures.
All reactions