Homework 12
Last updated: Sun, 14 May 2023 21:48:19 -0400
Out: Mon May 08, 00:00 EST Due: Sun May 14 Mon May 15, 23:59 EST
This assignment explores NP and NP-Completeness.
Homework Problems
Scheduling Courses in NP? (7 + 7 = 14 points)
Operations on Languages in NP (7 + 7 = 14 points)
A Way To Prove P = NP? (10 points)
Vertex Cover Problem (13 points)
README (1 point)
Total: 52 points
Submitting
Submit your solution to this assignment in Gradescope hw12. Please assign each page to the correct problem and make sure your solutions are legible.
A submission must also include a README containing the required information.
1 Scheduling Courses in NP?
Let C = \left\{\texttt{CS110}, \texttt{CS210}, \texttt{CS220}, \ldots\right\} represent a set of n CS courses, and let S, whose elements are drawn from \mathcal{N}\times\mathcal{P}(C) (where \mathcal{N} is a natural number and \mathcal{P}(C) is the powerset of C), represent student course selections. More specifically, a student in S is represented by a pair, where the first element is an ID number and the second element is a subset of courses from C. You may assume that there is a constant number of students m.
Define a valid schedule to be a mapping from course names to a constant number of time slots (1 to t) where:
all courses have an assigned time slot
no more than 3 courses have the same time slot
no student has two courses at the same time
Formally, define the language:
\textit{SCH} = \left\{\left\langle C,S,t\right\rangle\mid \textrm{a valid schedule is possible for courses }C\textrm{, student selections }S\textrm{, and }t\textrm{ slots}\right\}
Give two separate proofs that \textit{SCH} is in \textbf{NP}, where the length of the strings are expressed in terms of the number of courses n.
Be sure to structure each proof in the form of a Statements and Justifications table. In particular be careful about the justifications for each proof (they won’t be the same). The "Examples" step for this proof requires 1 example not in the language and 1 example in the language.
Creating a verifier requires a certificate. Make sure to be precise about explaining what kind of value the certificate is and what it represents.
Creating a non-deterministic TM requires a precise explanation about when the TM uses non-determinism, i.e., exactly how and when the computation branches.
2 Operations on Languages in NP
Prove that the set of \textbf{NP} languages is closed under the following operation: \textit{ALL}(A,B,C) = \left\{w\mid w\in A, w\in B,\textrm{ and } w\in C\right\}
The proof must use non-deterministic TMs. Remember that a non-deterministic TM requires a precise explanation about when the TM uses non-determinism, i.e., exactly how and when the computation branches.
More specifically, for each proof:Give the If-Then statement that must be proved.
Prove the statement by giving a table of Statements and Justifications, where the last statement is the If-Then statement to be proved from above.
Prove that the set of \textbf{NP} languages is closed under the following operation: \textit{CAT3}(A,B,C) = \left\{abc\mid a\in A,b\in B,\textrm{ and } c\in C\right\}
The proof must use verifiers.
More specifically, for each proof:Give the If-Then statement that must be proved.
Prove the statement by giving a table of Statements and Justifications, where the last statement is the If-Then statement to be proved from above.
3 A Way To Prove P = NP?
Prove that if the 4-digit lock problem from Guessing Combination Locks in Homework 11 is \textbf{NP}\textrm{-Complete}, then \textbf{P}=\textbf{NP}.
4 Vertex Cover Problem
A vertex cover in an undirected graph is a subset of the nodes where every edge of the graph touches one of those nodes.
The vertex cover problem is represented as a language:
\textit{VERTEX-COVER} = \left\{\left\langle G,k\right\rangle\mid G\textrm{ is an undirected graph with a }k \textrm{-node vertex cover}\right\}
Prove that the \textit{VERTEX-COVER} problem is \textbf{NP}\textrm{-Complete}.
It must explicitly include the 3 steps for proving NP-Completeness given in class.
Also, the mapping reducibility part must explicitly state the 4 steps given in class.
Finally, the reverse direction of the if-and-only-if of mapping reducibility must prove the contrapositive statement.
HINT: A proof is described in Sipser Theorem 7.44.
NOTE: This problem is testing to see if you are able to read a proof, understand it, and then re-explain it in your own words, in the required formet. So simply submitting a copy (or isomorphic version) of a proof from a textbook or the output some chatbot is insufficient.