
Recent Posts
 Matrix Domination December 1, 2023
 Maximum Likelihood Ranking October 27, 2023
 Randomization Test For Matched Pairs October 13, 2023
 Clustering September 29, 2023
 ShapleyShubik Voting Power September 15, 2023
Recent Comments
Archives
 December 2023
 October 2023
 September 2023
 August 2023
 March 2023
 January 2023
 December 2022
 November 2022
 October 2022
 September 2022
 August 2022
 June 2022
 May 2022
 December 2021
 November 2021
 October 2021
 September 2021
 August 2021
 July 2021
 May 2021
 April 2021
 March 2021
 February 2021
 January 2021
 December 2020
 November 2020
 October 2020
 September 2020
 August 2020
 March 2020
 February 2020
 January 2020
 December 2019
 November 2019
 October 2019
 September 2019
 August 2019
 July 2019
 June 2019
 May 2019
 April 2019
 March 2019
 February 2019
 January 2019
 December 2018
 November 2018
 October 2018
 September 2018
 August 2018
 July 2018
 June 2018
 May 2018
 April 2018
 March 2018
 February 2018
 January 2018
 December 2017
 November 2017
 October 2017
 September 2017
 August 2017
 July 2017
 June 2017
 May 2017
 April 2017
 March 2017
 February 2017
 January 2017
 December 2016
 November 2016
 October 2016
 September 2016
 August 2016
 July 2016
 June 2016
 May 2016
 April 2016
 March 2016
 February 2016
 January 2016
 December 2015
 November 2015
 October 2015
 September 2015
 August 2015
 July 2015
 June 2015
 May 2015
 April 2015
 March 2015
 February 2015
 January 2015
 December 2014
 November 2014
 October 2014
 September 2014
 August 2014
 July 2014
 June 2014
Categories
 Algebra and Number Theory
 Appendix Algebra and Number Theory
 Appendix Automata and Language Theory
 Appendix Games and Puzzles
 Appendix Mathematical Programming
 Appendix Network Design
 Appendix Program Optimization
 Appendix Sets and Partitions
 AppendixGraph Theory
 AppendixLogic
 Appendix: Miscellaneous
 Appendix: Sequencing and Scheduling
 Appendix: Storage and Retrieval
 Chapter 3 Exercises
 Core Problems
 Overview
 Problems not in appendix
 Uncategorized
Tag Archives: Vertex Cover
Protected: Dominating Set
Enter your password to view comments.
Posted in Chapter 3 Exercises
Tagged Difficulty 4, Dominating Set, GT2, No G&J reference, reductions, uncited reduction, Vertex Cover
Protected: Feedback Vertex Set
Enter your password to view comments.
Posted in Chapter 3 Exercises
Tagged Difficulty 3, Fedback Vertex Set, GT7, reductions, uncited reduction, Vertex Cover
Hamiltonian Circuit
This is one of my favorite problems, but one of the worst reductions to understand. I usually skip over it when I teach it, showing them the picture of the widget and saying “See? It’s Nuts!” and moving on
The problem: Hamiltonian Circuit (HC)
The definition: Given a graph G=(V,E), where V = N. Can I create an ordering <v_{1}, v_{2}…v_{n}>of the vertices where an edge exists between each (v_{i}, v_{i+1}) in the sequence, and the edge (v_{n}, v_{1}) also exists?
(In other words, does a sequence of edges exist that lets me start at some vertex, visit each other vertex exactly once, and return to the start?)
Example:
The sequence <a,d,h,k,g,c> forms a Hamiltonian Circuit
The reduction: Is from VC, and it’s nuts. G&J do it on pages 5660. Starting with an instance of VC (A graph G, and an integer K), build a new graph G’ with:
 K “selector” vertices (a_{1}a_{k})
 12 vertices and 14 edges (see page 57) for each edge in G (a “covertesting” component
 Edges to connect the selector vertices to the start and end of the covertesting component.
The Cormen algorithms book has an example of this, and it takes a graph with 4 vertices and 4 edges and builds a HC instance with 50 vertices and 72 edges.
Difficulty: 9, only because I’m sure there exist reductions that have like 25 page proofs, and I want to save my 10 for that. But really, I think just making the students trace this reduction on an example is a really hard problem.
Posted in Core Problems
Tagged core problems, Difficulty 9, Hamiltonian Circuit, reductions, Vertex Cover
Independent Set
The last of the three similar graph problems, it’s also probably the easiest reduction. When I teach NPCompleteness, I’ve had a lot of success starting with this reduction (instead of building a stable of NPComplete problems from zero like the textbooks do). You kind of have to say “Trust me, Vertex Cover is NPComplete, I’ll show you why later”, but starting with a simple reduction means that they can follow the idea and the process right from the beginning without having to be bogged down in ugly conversions involving SAT.
The problem: Independent Set (IS)
The definition Given a graph G=(V,E) and an integer J. Does G have a collection of at least J vertices where no edges connect any two vertices in J?
Example: Using the same graph:
{a,h,k} is an independent set of size 3.
The reduction: From VC. Use the exact same graph, and set J=VK. (G has an independent set of J vertices exactly when it has a vertex cover of K vertices. Vertices not in the cover can’t have edges between them).
Difficulty: 1. There’s a reason why I do this first (though sometimes I go from Clique instead). In general, though, I try to avoid making them do problems that are too easy for homeworks and tests. If the reduction is trivial, it makes showing that the conversion solves the original problem difficult. You get a lot of proofs that basically say “C’mon! They’re the same thing!”. Which is not what I’m looking for 🙂
Posted in Core Problems
Tagged core problems, Difficulty 1, Independent Set, Reduction, Vertex Cover
Clique
G&J don’t even bother to prove Clique is NPComplete, just stating that it (and Independent Set) is a “different version” of Vertex Cover. But the problem comes up often enough that it’s worth seeing in its own right.
The problem: Clique (I’ve also seen “Max Clique” or “Clique Decision Problem” (CDP))
The definition: Given a graph G=(V,E), and a positive integer J (G&J say J needs to be ≤ V, but I think you can allow large values and make your algorithm just say “no”). Does J contain a subset V’ of V, or size at least J, where every two vertices in V’ are joined by an edge in E?
Example: Using the graph we had for VC:
{a,c,d} form a clique of size 3. There are no cliques of size 4, but if we add the edge (d,g) and the edge (c,h), then the vertices {c,d,g,h} would be one.
The reduction: From Vertex Cover. Given a graph G and an integer K that is an instance of Vertex Cover, take the complement of G (the complement of a graph has the same vertices, but the set of edges is “inverted”: (u,v) is an edge in the complement if and only if it was not an edge in G), and use it as your instance of CDP. Set J= VK
Difficulty: 3. It’s not a 2 because it takes a little thought to see why the complement works.
Note: As stated perviously, I teach this course using the Cormen book, so in class I show Clique is NPHard by reducing from 3SAT. It’s a good example of a hard reduction, probably about as hard as the VC reduction G&J do.
Posted in Core Problems
Tagged Clique, core problems, Difficulty 3, reductions, Vertex Cover
Vertex Cover
Back to the “core 6” with a classic problem from graph theory. There are lots of similar graph problems, so it’s important to keep them all straight.
The Problem: Vertex Cover (VC)
The Definition: Given a graph G=(V,E) and a positive integer K (G&J say that K ≤ V, but really, if it’s bigger than that, you can have the algorithm just return “yes”). Can I find a subset V’ of V, V’ ≤ K, where every edge in E has at least one endpoint in V’?
Example: Hmm, I wonder if I can insert an image..
Ok, looks like that worked. In the graph above, {c,d,g} is a vertex cover, because all edges have at least one endpoint in the set {c,d,g}. As we’ll see later, a graph containing a clique (complete subgraph) of N nodes will need at have at least N1 of those vertices in the cover.
The reduction: From 3SAT. G&J on pages 5456 show the construction. We build a graph with vertices for all variables and their negation, with an edge between them. We have three variables for each clause, connected in a triangle. (The three variables correspond to “positions” in the clause). Then there is an edge from each vertex corresponding to a literal (or its negation) to its corresponding “clause vertex” the vertex that holds the position of that variable in the original formula. K= # of variables + 2* number of clauses.
Difficulty: 7 , assuming it’s the first time a student has seen this sort of reduction. If they have seen something similar (for example, a reduction from 3SAT to Clique), then maybe a 5. The ideas are pretty similar.
Note: I teach my algorithms class using the Cormen book. In it, they reduce 3SAT to Clique, proving Clique is NPComplete, and then reduce Clique to VC. This works in the exact same way as the reduction from VC to Clique that I’ll be doing here next.
Posted in Core Problems
Tagged 3sat, Clique, core problems, Difficulty 7, reductions, Vertex Cover