

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


Computability and Complexity Homework 2 NP, Completeness, and Reductions Due Monday, May 14
Give proofs for each problem. Proofs can be high-level, but be precise. You may use without giving a proof any result proved in class or in the textbook. In particular, to prove NP-completeness, it suffices to give a reduction from any of the NP-complete problems from the text or from class. However, you must show your reduction is valid, by showing the equivalence of the constructed instance and the original. Independent Set Maximality (ISM) Prove that the following problem is N P -complete. Given a graph G and an independent set I in G, is there a larger independent set Iโฒ, |I| < |Iโฒ|? Lowest Cost Machines Prove that the following problem is N P -complete: Problem: Machine budget Instance: A bipartite graph G = (M, J, E), where the nodes in M rep- resent types of machines, the nodes in J represent types of jobs, and the edges represent that the machine is capable of performing the job. For each machine m, an integer price pm > 0. A positive integer B representing the total budget. Solution space: A subset S โ M of machines to purchase. Constraints: For each j โ J, there must me some m โ S that can perform job j, i.e., so that (m, j) โ E. The total price
mโS pm^ of purchased machines must be at most B. Abstract Sudoku Consider the abstract sudoku problem. An instance is a number k, n variables x 1 ...xn taking on values 1..k, and a family of subsets S 1 , ...Sm, each Sj โ { 1 , .., n} and has size |Sj | = k. A solution assigns each variable xi a value ai in { 1 , ..k}. It is feasible if every value appears exactly once in each subset, i.e., for each Sj , and each 1 โค v โค k, there is an i โ Sj
with ai = v. The abstract sudoku problem is, given k, n and the family S 1 , ..Sm, decide whether there is a feasible solution. Prove that abstract sudoku is N P -complete. You can use without proof the N P -completeness of any problem proved N P -complete in class, in the text, or on the homeworks. (However, although it has been proved that non-abstract sudoku (see below) is also N P -complete, you should not use that fact for this problem.)
Closure under reductions Prove that N P is closed under polynomial-time Turing reductions if and only if N P = Co โ N P.
Sudoku The sudoku problem of size n is as follows. The input is an n^2 ร n^2 matrix M whose entries are either โblankโ or an integer between 1 and n^2. A solution fills in the blank spaces with integers between 1 and n^2. The following constraints must be met: Each integer from 1 to n^2 appears exactly once in each row, in each column, and in each n ร n sub-matrix of the form M [jn + 1...(j + 1)n][in + 1..(i + 1)n] for each 0 โค i, j โค n โ 1. The problem is to decide whether there is a solution meeting the constraints. Give at least two distinct reductions from Sodoku to CN F SAT. For each, analyze the number of variables in the resulting CN F , and the number of clauses of different sizes. In the next homework, you will be asked to run experiments combining these reductions with a SAT solver to solve Sudoku. Which reduction do you expect to have the best results in the experiment, and why?