Describe Clique Decision Problem (CDP)

Describe Clique Decision Problem (CDP)

Verified Sources
Sep 12, 2026

The Clique Decision Problem (CDP) asks whether a given undirected graph contains a clique of a specified size. Formally, CDP is the decision version of the maximum clique problem: it does not ask for the largest clique size, but instead asks whether there exists at least a clique with kk vertices.

We model an input graph as G=(V,E)G=(V,E) (with n=Vn=|V| vertices) and ask:

  • Is there a subset SVS \subseteq V with S=k|S|=k such that every pair of vertices in SS is connected by an edge?
  • In other words, does there exist a kk-clique?

This can be written as:
SV, S=k, u,vS, uv(u,v)E.\exists S \subseteq V,\ |S|=k,\ \forall u,v \in S,\ u\neq v \Rightarrow (u,v)\in E.

Conceptually, a clique is a “complete subgraph.” You can visualize CDP as a yes/no test that checks whether a graph hides a fully-connected kk-vertex “cluster.”

Key learning terms introduced in this section:

  • Clique
  • k-Clique
  • Decision problem
  • NP
  • Reduction

Clique Decision Problem (CDP) intuition & verification

CDP formal problem statement

Let the input be:

  • an undirected simple graph G=(V,E)G=(V,E)
  • an integer kk

The decision version is:

  • CDP(G, k) = YES iff GG contains a clique of size at least kk (often phrased as “contains a kk-clique”).

In certificate-verification language (for complexity):

  • A certificate is a set SVS \subseteq V with S=k|S|=k.
  • Verification checks whether for all distinct u,vSu,v \in S, the edge (u,v)(u,v) is in EE.

Verification time is polynomial in nn:

  • There are (k2)\binom{k}{2} pairs to check.
  • With adjacency queries in O(1)O(1) using a hash/set or adjacency matrix, the check is O(k2)O(k^2) (plus input parsing).

Key complexity learning terms:

  • Certificate
  • Verifier
  • Adjacency query

Pro Tip

When learning CDP, focus on verification: once someone hands you a candidate set of kk vertices, checking it is fast; the difficulty is finding it.

Relationship to maximum clique and complement structure

The maximum clique problem asks for the largest clique size:

  • output: the maximum tt such that a tt-clique exists.

CDP instead asks:

  • output: whether some clique of size kk exists.

So, if f(G)f(G) is the size of the maximum clique, then CDP asks whether: f(G)k.f(G) \ge k.

A useful structural fact (often used in reasoning) is the connection between cliques in GG and independent sets in the complement graph G\overline{G}:

  • a clique in GG corresponds to an independent set in G\overline{G}.

This is a “graph duality” perspective:

  • Clique problems and independent-set problems are tightly related through graph complement.

Key terms:

  • Graph complement
  • Independent set

CDP is in NP; brute-force baseline

Membership in NP: CDP is in NP because a kk-vertex candidate clique can be checked in polynomial time.

Brute-force algorithm idea: try all (nk)\binom{n}{k} subsets of vertices and test if each subset forms a clique. This yields exponential time: (nk)nkk! (grows rapidly).\binom{n}{k} \approx \frac{n^k}{k!}\ \text{(grows rapidly)}.

This motivates why clique-finding is hard:

  • the search space is combinatorial.

Key terms:

  • Brute force
  • Combinatorial explosion
  • [Exponential time]{def="Runtime that grows like cnc^n or faster"}

How to verify a proposed k-clique (certificate checking)

  1. 1
    Step 1

    You are given G=(V,E)G=(V,E) and an integer kk.

  2. 2
    Step 2

    A candidate certificate is a set SVS\subseteq V with S=k|S|=k.

  3. 3
    Step 3

    If S ek|S|\ e k, reject (it cannot be a kk-clique).

  4. 4
    Step 4

    For every distinct u,vSu,v\in S, verify that (u,v)E(u,v)\in E.

  5. 5
    Step 5

    If every pair is connected, accept (YES); otherwise reject (NO).

Conceptual learning roadmap for CDP

Define CDP precisely

Step 1

Understand the YES/NO question about the existence of a kk-clique."

Certificate verification

Step 2

Learn why CDP is in NP: checking a proposed clique is polynomial."

Baseline algorithms

Step 3

See brute-force subset enumeration and its exponential growth."

Complexity implications

Step 4

Connect CDP to NP-hardness/NP-completeness via reductions (conceptual)."

Parameterization intuition

Step 5

View CDP as kk-parameterized search (e.g., kk-clique vs general clique)."

CDP hardness and classic reduction viewpoint

In computational complexity, CDP is a canonical example for illustrating NP-completeness:

  • it captures a fundamental combinatorial selection problem,
  • and it is widely used as a target for reductions from other NP problems.

The typical reasoning pattern is:

  1. Choose a known NP-complete problem (e.g., SAT variants).
  2. Construct a graph GG and integer kk so that:
    • SAT instance is satisfiable iff GG has a clique of size kk.
  3. Therefore, solving CDP would solve the original NP-complete problem.

Key terms:

  • NP-complete
  • Polynomial-time reduction
  • 3-SAT

Common confusions about CDP

Warning: conflating search vs decision

CDP is a decision problem (YES/NO). If you instead try to output the clique itself, you are solving a different (search) problem, usually harder to do directly.

Runtime intuition: brute-force subset enumeration vs verification

Verification per candidate is fast; the number of candidates grows combinatorially.

Knowledge Check

Question 1 of 4
Q1Single choice

Which statement best matches the Clique Decision Problem (CDP)?

Explore Related Topics

1

Understanding Cognitive Thinking

Cognitive thinking is the organized set of mental processes—attention, perception, memory, reasoning, language, problem solving, decision‑making, executive function, and metacognition—used to acquire, interpret, store, evaluate, and regulate information, underpinning learning, decision‑making, and everyday behavior.

  • It operates as an information‑processing system: sensory input → attention → perception → working memory → reasoning → decision/action → metacognitive monitoring (which loops back).
  • Foundational processes (attention, perception, memory) support higher‑order functions (reasoning, planning, judgment).
  • Critical thinking is a specialized subset of cognitive thinking focused on evaluating evidence and assumptions.
  • Metacognition “thinks about thinking,” enabling error detection, strategy adjustment, and self‑regulated learning.
  • Practice, explicit strategy instruction, and reflective habits strengthen cognitive thinking and improve academic performance.
2

Dijkstra's Algorithm

Dijkstra's algorithm finds the shortest‑path distances from a single source to all reachable vertices in a weighted graph whose edge weights are non‑negative, using a greedy selection of the minimum‑distance unsettled vertex and edge relaxation.

  • Keeps a tentative distance array and a min‑priority queue; extracting the smallest distance finalizes that vertex’s shortest path.
  • Correct only for non‑negative edges; negative weights invalidate the greedy invariant.
  • With an adjacency‑list and binary heap the time is O((V+E) log V); matrix scans give O(V²) and Fibonacci heaps can achieve O(E + V log V).
  • Storing a predecessor array allows reconstruction of actual shortest paths and early termination when a specific target is settled.
  • Fundamental in routing, navigation, and as a subroutine in many larger graph algorithms.
3

Deadlock Avoidance and Resource-Allocation Graphs with Cycles but No Deadlock

Deadlock avoidance grants resources only when the resulting state is safe, using safety tests (e.g., the Banker’s algorithm) and graph analysis to prevent unsafe allocations.

  • A request is granted iff the post‑allocation state satisfies a safe sequence: Grant request    state is safe\text{Grant request} \iff \text{state is safe}.
  • In a single‑instance resource graph, any cycle means deadlock; with multiple instances, a cycle only indicates a possible deadlock.
  • The safety test checks for a process PiP_i with NeediAvailableNeed_i \le Available; such a process can finish, release resources, and repeat the check.
  • Example: R1R_1 (1 instance) and R2R_2 (2 instances) form a cycle, but P3P_3 can complete and break it, so no deadlock occurs.
  • The OS may defer a request even when resources are free if granting it would move the system to an unsafe state.