ArticleslgStudy

computer science

Vertex cover

Vertex cover is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Vertex cover rather than just read about it. In short: In graph theory, a vertex cover (sometimes node cover) of a graph is a set of vertices that includes at least one endpoint of every edge of the graph. In computer science, the problem of finding a minimum vertex cover is a classical optimization problem.

Vertex cover — main illustration
Vertex cover — illustration

Key takeaways

  • Vertex cover belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Vertex cover to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Vertex cover from memory before moving on to harder problems.

Reference excerpt

In graph theory, a vertex cover (sometimes node cover) of a graph is a set of vertices that includes at least one endpoint of every edge of the graph. In computer science, the problem of finding a minimum vertex cover is a classical optimization problem. It is NP-hard, so it cannot be solved by a polynomial-time algorithm if P ≠ NP. Moreover, it is hard to approximate – it cannot be approximated up to a factor smaller than 2 if the unique games conjecture is true. On the other hand, it has several simple 2-factor approximations. It is a typical example of an NP-hard optimization problem that has an approximation algorithm. Its decision version, the vertex cover problem, was one of Karp's 21 NP-complete problems and is therefore a classical NP-complete problem in computational complexity theory. Furthermore, the vertex cover problem is fixed-parameter tractable and a central problem in parameterized complexity theory. The minimum vertex cover problem can be formulated as a half-integral, linear program whose dual linear program is the maximum matching problem. Vertex cover problems have been generalized to hypergraphs, see Vertex cover in hypergraphs.

Definition

Formally, a vertex cover V ′ {\displaystyle V'} of an undirected graph G = ( V , E ) {\displaystyle G=(V,E)} is a subset of V {\displaystyle V} such that ( u v ∈ E ) ⇒ ( u ∈ V ′ ∨ v ∈ V ′ ) {\displaystyle (uv\in E)\Rightarrow (u\in V'\lor v\in V')} , that is to say it is a set of vertices V ′ {\displaystyle V'} where every edge has at least one endpoint in the vertex cover V ′ {\displaystyle V'} . Such a set is said to cover the edges of G {\displaystyle G} . The upper figure shows two examples of vertex covers, with some vertex cover V ′ {\displaystyle V'} marked in red. A minimum vertex cover is a vertex cover of smallest possible size. The vertex cover number τ {\displaystyle \tau } is the size of a minimum vertex cover, i.e. τ = | V ′ | {\displaystyle \tau =|V'|} . The lower figure shows examples of minimum vertex covers in the previous graphs.

Examples The set of all vertices is a vertex cover. The endpoints of any maximal matching form a vertex cover. The complete bipartite graph K m , n {\displaystyle K_{m,n}} has a minimum vertex cover of size τ ( K m , n ) = min { m , n } {\displaystyle \tau (K_{m,n})=\min\{\,m,n\,\}} .

Properties A set of vertices is a vertex cover if and only if its complement is an independent set. Consequently, the number of vertices of a graph is equal to its minimum vertex cover number plus the size of a maximum independent set.

Computational problem The minimum vertex cover problem is the optimization problem of finding a smallest vertex cover in a given graph.

INSTANCE: Graph G {\displaystyle G}

OUTPUT: Smallest number k {\displaystyle k} such that G {\displaystyle G} has a vertex cover of size k {\displaystyle k} . If the problem is stated as a decision problem, it is called the vertex cover problem:

INSTANCE: Graph G {\displaystyle G} and positive integer k {\displaystyle k} . QUESTION: Does G {\displaystyle G} have a vertex cover of size at most k {\displaystyle k} ? They are equivalent under polynomial-time reduction by using binary search. The vertex cover problem is an NP-complete problem: it was one of Karp's 21 NP-complete problems. It is often used in computational complexity theory as a starting point for NP-hardness proofs.

ILP formulation Assume that every vertex has an associated cost of c ( v ) ≥ 0 {\displaystyle c(v)\geq 0} . The (weighted) minimum vertex cover problem can be formulated as the following integer linear program (ILP).

This ILP belongs to the more general class of ILPs for covering problems. The integrality gap of this ILP is 2 {\displaystyle 2} , so its relaxation (allowing each variable to be in the interval from 0 to 1, rather than requiring the variables to be only 0 or 1) gives a factor- 2 {\displaystyle 2} approximation algorithm for the minimum vertex cover problem. Furthermore, the linear programming relaxation of that ILP is half-integral, that is, there exists an optimal solution for which each entry x v {\displaystyle x_{v}} is either 0, 1/2, or 1. A 2-approximate vertex cover can be obtained from this fractional solution by selecting the subset of vertices whose variables are nonzero.

… excerpt ends here. Continue reading the full article.

Illustrations

Vertex cover: Example graph that has a vertex cover comprising 2 vertices (bottom), but none with fewer
Example graph that has a vertex cover comprising 2 vertices (bottom), but none with fewer
Vertex cover: Examples of vertex covers
Examples of vertex covers
Vertex cover: Examples of minimum vertex covers
Examples of minimum vertex covers
Vertex cover illustration

Worked examples

Example 1 — a first encounter with Vertex cover

Start with the simplest possible case. Write down what Vertex cover claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Vertex cover before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Vertex cover ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Vertex cover

In research
Vertex cover appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Vertex cover in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Vertex cover is common in secondary-school and first-year university syllabi. It links to neighbouring topics Computational problems in graph theory, Covering problems, NP-complete problems, so understanding it makes those chapters shorter.
In everyday life
Look for Vertex cover outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Vertex cover” →

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Vertex cover in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Vertex cover means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Vertex cover out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Vertex cover in simple terms?

In graph theory, a vertex cover (sometimes node cover) of a graph is a set of vertices that includes at least one endpoint of every edge of the graph. In computer science, the problem of finding a minimum vertex cover is a classical optimization problem.

Why does Vertex cover matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Vertex cover?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Vertex cover.

Tags

  • Computational problems in graph theory
  • Covering problems
  • NP-complete problems

Keep exploring