Independent sets and vertex covers [00UQ]
- November 30, 2026
Let's start by examining two problems which are important in practice but turn out not to have efficient solutions (as far as we know).
The independent set problem [00V1]
- November 30, 2026
Definition Independent set [00UR]
- November 30, 2026
An independent set in an undirected graph G = (V,E) is a subset of vertices S \subseteq V such that no two vertices in S are adjacent.
Example Independent sets [00US]
- November 30, 2026
Remark For independent sets, bigger = harder [00UT]
- November 30, 2026
The empty set \varnothing always counts as an independent set in any graph. Intuitively, making small independent sets is easy, but making bigger ones is more difficult: the more vertices we add, the harder it is to avoid picking a vertex which is adjacent to an existing one. This leads to the following interesting question.
Problem IND-SET-OPT [00UU]
- November 30, 2026
Given an undirected graph G, what is the maximum possible size of an independent set in G?
It will also be convenient to reformulate this as a problem with a yes-or-no answer, called a decision problem.
Definition Decision problem [00VL]
- December 2, 2026
A decision problem is a problem which, for any input, expects a yes-or-no answer.
Problem IND-SET [00UV]
- November 30, 2026
Given an undirected graph G and a natural number k, does there exist an independent set in G of size k or greater?
Remark IND-SET vs IND-SET-OPT [00UW]
- November 30, 2026
If we had an algorithm to solve IND-SET-OPT, we could obviously use it to solve IND-SET: given G and k, we ask our IND-SET-OPT algorithm for the size of the largest independent set and then check whether it is greater than or equal to k. Conversely, and slightly less obviously, if we had an algorithm to solve IND-SET, we could use it to solve IND-SET-OPT with only an extra factor of \Theta (\lg V): just use binary search to repeatedly ask the IND-SET algorithm about different sizes until "zeroing in" on the unique maximum size.
Something similar often happens with many problems: there is an "optimization version" which returns a best answer, and there is also a "decision version" which takes an extra parameter and decides whether the best answer is better than the given parameter or not. Since decision problems are simpler, and we can usually solve the optimization problem by doing binary search with the decision problem, we sometimes restrict ourselves to considering only decision problems.
Remark Independent sets in practice [00UZ]
- November 30, 2026
It's not too hard to think of reasons why people might concretely care about this problem. For example, imagine that each edge in a graph represents a conflict. Perhaps the vertices are tasks and there is an edge between two tasks if they cannot be done at the same time (because they both require the same resource, for example). Then an independent set represents a set of tasks that can all successfully be done simultaneously, and a maximum independent set is the largest possible such set of tasks.
Solving IND-SET-OPT by brute force [00V0]
- November 30, 2026
What would be a brute force algorithm to solve IND-SET-OPT (or IND-SET)? Just list every possible subset of V—there are 2^V such subsets—test whether each one is independent (by iterating through every possible pair of vertices), and keep track of the largest. Naïvely, this takes something like \Theta (2^V V^2). We can probably reduce this to \Theta (2^V) if we are clever, and perhaps even something like \Theta (2^{V/2}) if we are extremely clever—but astonishingly, we do not know of any fundamentally better algorithms! All the algorithms we know of have some kind of exponential running time, that is, V shows up in an exponent.
The vertex cover problem [00V2]
- November 30, 2026
Definition Vertex cover [00V3]
- November 30, 2026
A vertex cover in an undirected graph G = (V,E) is a subset of vertices S \subseteq V such that every edge has at least one endpoint in S.
Remark Museum guards [00V5]
- November 30, 2026
Intuitively, think of each edge as a straight hallway; then we want to hire some guards to put at the vertices, where each guard can "see" the edges adjacent to their vertex. A vertex cover is then a set of vertices where we can place guards such that every edge is guarded. Obviously in this case, it is more difficult to make a small vertex cover.
Problem VERTEX-COVER [00VY]
- November 30, 2026
Given an undirected graph G and a natural number k, does there exist a vertex cover in G of size k or less?
Theorem Independent set \iff vertex cover [00V6]
- November 30, 2026
For any undirected graph G, S \subseteq V is an independent set if and only if \overline {S} is a vertex cover. (Here \overline {S} = V \setminus S is the set complement of S, i.e. the set of vertices in V which are not in S.)
Proof.
- November 30, 2026
Subproof. Independent set \iff vertex cover ›
- November 30, 2026
Subproof. Independent set \iff vertex cover ›
- November 30, 2026
Corollary Maximum independent set \iff minimum vertex cover [00V7]
- November 30, 2026
S is a maximum independent set in G if and only if \overline {S} is a minimum vertex cover.
Proof.
- November 30, 2026