Clique
A clique is a subset of vertices in a graph in which every pair of distinct vertices is connected by an edge.
Algorithms Every Programmer Should Know
A clique is a set of vertices in a graph in which every pair of distinct vertices is connected by an edge.
- How it is used
- Identifies fully connected groups in networks and mutually consistent feature matches in compatibility graphs.
- How deep it goes
- Defines cliques and maximality, then traces recursive enumeration, duplicate rejection, and pivoting.
- Examples
- Uses a five-vertex missing-edge comparison, a traced graph with two maximal cliques, and stereo feature matching.
- What you can do after
- Apply it via a Python Bron–Kerbosch implementation to enumerate maximal cliques in an undirected graph.
Read how Algorithms Every Programmer Should Know explains clique →
Fabulous Adventures in Data Structures and Algorithms
A clique is a group of graph nodes in which every node is adjacent to every other node.
- How it is used
- Uses cliques as a convenience feature while building an immutable undirected graph.
- How deep it goes
- Defines mutual adjacency and illustrates it with a country-map example.
- Examples
- Uses friendship groups and Argentina, Bolivia, Brazil, and Paraguay as clique examples.
- What you can do after
- Evaluate/understand whether a group of graph nodes satisfies mutual adjacency.
Read how Fabulous Adventures in Data Structures and Algorithms explains clique →
What to know first
- edgeAn edge is a connection between two vertices or nodes in a graph or related structure, representing a relationship and optionally carrying direction, labels, or weights.
- nodeA node is a discrete element of a graph, tree, linked structure, network, or computing system that can represent an entity, state, or component and may connect to other elements.
Related concepts
- maximal clique problemincludes · The maximal clique problem is the graph problem of finding a clique that cannot be enlarged by adding another vertex while preserving pairwise adjacency.
- complete subgraphkind of · A complete subgraph is a subgraph in which every pair of distinct vertices is connected by an edge.
- graphpart of · A graph is a mathematical structure consisting of vertices and edges that connect pairs of vertices to represent relationships or connections.
- graph coloringuses · Graph coloring is the assignment of colors to graph elements subject to constraints, such as requiring adjacent vertices to have different colors.
Questions about clique
What is clique?
A clique is a subset of vertices in a graph in which every pair of distinct vertices is connected by an edge.
Which Manning books explain clique?
Algorithms Every Programmer Should Know and Fabulous Adventures in Data Structures and Algorithms.
What should I know before learning clique?
Manning books that teach clique usually introduce edge and node first.
What kinds of clique are there?
Kinds of clique include maximal clique problem.
What is clique a kind of?
Clique is a kind of complete subgraph. A complete subgraph is a subgraph in which every pair of distinct vertices is connected by an edge.
What is clique part of?
Clique is part of graph. A graph is a mathematical structure consisting of vertices and edges that connect pairs of vertices to represent relationships or connections.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

