soln5

# soln5 - CS 151 Complexity Theory Spring 2011 Solution Set 5...

This preview shows pages 1–2. Sign up to view the full content.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: CS 151 Complexity Theory Spring 2011 Solution Set 5 Posted: May 16 Chris Umans 1. We are given a Boolean circuit C on n variables x 1 ,x 2 ,...,x n with m , and gates. Our 3-CNF formula will have m auxiliary variables z 1 ,z 2 ,...,z m in addition to the x variables, and we associate each z variable with one of the m gates. We want to enforce constraints so that any satisfying assignment to all of the variables will have the z variables taking on the value that the associated gates would output given the assignment to the x variables. We do this as follows: for a gate associated with z i , and with input w (which may be a z variable or an x variable), we enforce w z i by including the clauses ( w z i ) and ( w z i ). for an gate associated with z i , and with inputs w and y (each of which may be a z variable or an x variable), we enforce ( w y ) z i by including the clauses ( w y z i ), ( z i w ) and ( z i y ). for an gate associated with z i , and with inputs w and y (each of which may be a y variable or an x variable), we enforce ( w y ) z i by including the clauses ( w z i ), ( y z i ) and ( z i w y ). Assume that z m is the variable associated with the output gate. By construction our 3-CNF so far has the property that any assignment that satisfies the above clauses must assign to z m the value that C ( x 1 ,x 2 ,...,x n ) takes given the assignment to the x variables. We add a final clause ( z m ). Now an assignment satisfies the formula if and only if the assignment sets the x variables in such a way that C ( x 1 ,x 2 ,...x n ) = 1. It is also easy to see that any assignment to the x variables for which C ( x 1 ,x 2 ,...,x n ) = 1 can be extended to an assignment to the x and z variables that satisfies all of the above clauses, by simply setting each z i to the value the i-th gate is outputting in circuit C . Thus C is satisfiable if and only if the just-constructed 3-CNF formula is. If we call the 3-CNF formula , then we have, as desired: z 1 ,z 2 ,...,z m ( x 1 ,x 2 ,...,x n ,z 1 ,z 2 ,...,z m ) = 1 C ( x 1 ,x 2 ,...,x n ) = 1 . For the second part, we first take C and add a gate to its output; call this circuit C . Now applying the above transformation to C gives a 3-CNF formula with the property that: z 1 ,z 2 ,...,z m ( x 1 ,x 2 ,...,x n ,z 1 ,z 2 ,...,z m ) = 1 C ( x 1 ,x 2 ,...,x n ) = 1 . Equivalently, z 1 ,z 2 ,...,z m ( x 1 ,x 2 ,...,x n ,z 1 ,z 2 ,...,z m ) = 0 C ( x 1 ,x 2 ,...,x n ) = 0 . Let us define to be , and note that (if we distribute the ) is a 3-DNF formula. We have: z 1 ,z 2 ,...,z m ( x 1 ,x 2 ,...,x n ,z 1 ,z 2 ,...,z m ) = 1 C ( x 1 ,x 2 ,...,x n ) = 0 ....
View Full Document

## soln5 - CS 151 Complexity Theory Spring 2011 Solution Set 5...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online