On this page:
1 README
2 Undirected Hamiltonian Paths
3 SUBSET-SUM With Unary Numbers
4 A PATH to P=NP
5 The Knapsack Problem
6 The Graph Coloring Problem

Homework 11

Last updated: Sun, 13 Dec 2020 21:30:12 -0500

Out: Mon Dec 7, 00:00 EST Due: Tues Dec 15, 23:59 EST

This homework covers material from Chapter 7 of the textbook.

Homework Problems

  1. README (2 points)

  2. Undirected Hamiltonian Paths (6 points)

  3. SUBSET-SUM With Unary Numbers (6 points)

  4. A PATH to P=NP (6 points)

  5. The Knapsack Problem (6 points)

  6. The Graph Coloring Problem (6 points)

Total: 32 points

Submitting

Submit this assignment at Gradescope hw11.

You may write up your solution however you like but the submission:
  • should only include pdf or plain text files,

  • and each file must be assigned to the correct problem in Gradescope.

1 README

Create a README file containing the required information, and submit it along with the rest of the homework.

2 Undirected Hamiltonian Paths

Theorem 7.55 in the textbook proves that

\textrm{\textit{UHAMPATH}} = \{\left\langle G,s,t\right\rangle\mid G\textrm{ is an undirected graph with a Hamiltonian path from }s\textrm{ to }t\}

is \textrm{NP}-complete.

Read and understand the proof.

Then, based on this understanding, re-state the proof in your own words by explicitly describing the five steps (numbered 1-5) we followed in class when using Theorem 7.36.

3 SUBSET-SUM With Unary Numbers

Using the textbook and class notes, read and understand the proof showing that the \textrm{\textit{SUBSET-SUM}} problem is \textrm{NP}-complete, for decimal (i.e., base10) numbers.

Alternatively, unary notation is a representation of numbers that only uses one digit, e.g., 5 in unary is 11111.

In the \textrm{\textit{SUBSET-SUM}} problem, if we represent numbers in unary notation, give an estimate of the running time of the reduction that we used to prove \textrm{NP}-completeness.

Can we re-use the same proof to prove \textrm{NP}-completeness of the unary \textrm{\textit{SUBSET-SUM}} problem? Why or why not?

4 A PATH to P=NP

NOTE: The wording of this problem has been updated (on 2020-12-13 9pm EST) to prevent trivially answering it using Theorem 7.35.

We showed that the \textrm{\textit{PATH}} problem is in \textrm{P}.

Show that if PATH is NP-complete, then P = NP.

Show that if \textrm{\textit{PATH}} is \textrm{NP}-complete, then for any language L, L \in \textrm{P} \Leftrightarrow L \in \textrm{NP}.

(Once you have shown this, you will have shown that \textrm{\textit{PATH}} being \textrm{NP}-complete implies \textrm{P} = \textrm{NP}.)

5 The Knapsack Problem

Define the the Knapsack problem as the language \textrm{\textit{KNAPSACK}} where \left\langle Items,V,W\right\rangle\in\textrm{\textit{KNAPSACK}} if:

Prove that \textrm{\textit{KNAPSACK}} is \textrm{NP}-complete.

6 The Graph Coloring Problem

Graph coloring is practically very important because any kind of resource allcation problem can be reduced to it. For example, computing a final exam schedule so that no student has two exams at the same time is an instance of graph coloring.

Formally, a "coloring" is an assignment of a color to each vertex in a graph so that no two adjacent vertices have the same color. The 3COLOR problem, then, is the language:

3COLOR = \{\left\langle G\right\rangle\mid G\textrm{ is colorable with 3 colors}\}

Show that 3COLOR is NP-complete.

You may use the "gadget" subgraphs described in Sipser problem 7.29.