Docsity

Independent Set Maximality - Computability and Complexity - Homework, Exercises of Applications of Computer Sciences

Toggle sidebar
bg1
CSE 200
Computability and Complexity
Homework 2
NP, Completeness, and Reductions
Due Monday, May 14
May 1, 2012
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 NP -complete. Given a graph Gand
an independent set Iin G, is there a larger independent set I0,|I|<|I0|?
Lowest Cost Machines Prove that the following problem is NP -complete:
Problem: Machine budget
Instance: A bipartite graph G= (M, J, E), where the nodes in Mrep-
resent types of machines, the nodes in Jrepresent 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
Brepresenting the total budget.
Solution space: A subset SโŠ‚Mof machines to purchase.
Constraints: For each jโˆˆJ, there must me some mโˆˆSthat can
perform job j, i.e., so that (m, j)โˆˆE. The total price PmโˆˆSpmof
purchased machines must be at most B.
Abstract Sudoku Consider the abstract sudoku problem. An instance is a number k,n
variables x1...xntaking on values 1..k, and a family of subsets S1, ...Sm,
each SjโŠ‚ {1, .., n}and has size |Sj|=k. A solution assigns each variable
xia value aiin {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
1
pf2

Partial preview of the text

Download Independent Set Maximality - Computability and Complexity - Homework and more Exercises Applications of Computer Sciences in PDF only on Docsity!

CSE 200

Computability and Complexity Homework 2 NP, Completeness, and Reductions Due Monday, May 14

May 1, 2012

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?