Homework 2

This homework covers the material from lectures 5 to 11.

Due date: October 11th, 10pm Waterloo time.

LaTeX template, in case you want to write it in LaTeX.

Required Exercises

Problem 1 - Basic Relations Between Complexity Classes (20 points)

  1. Prove that PNPcoNP.

  2. Suppose that L1,L2NP. Is it true that L1L2NP? What about L1L2? Justify your answers with a proof.


Problem 2 - NP Completeness (20 points)

Let Φ:=C1C2Cm be a 3CNF formula. An -assignment to the variables of Φ is an assignment that satisfies Φ but for every clause Ci, at least one of the literals in Ci is set to false.

  1. Show that the negation of a -assignment is also a -assignment.

  2. Let -3SAT be the collection of 3CNF formulas that have a -assignment. Show that -3SAT is NP-complete.

Hint: Reduce from 3SAT. What happens if you replace clause (y1y2y3) with (y1y2z)(¬zy3b) for a new variable z and a new variable b?


Problem 3 - Max-Cut (20 points)

A cut in an undirected graph G=(V,E) is a partition of the vertices V into disjoint sets S and VS. The size of the cut (S,VS) is the number of edges that have one endpoint in S and the other in VS. Let MAX-CUT:={G,kG has a cut of size at least k}. Show that MAX-CUT is NP-complete. You may assume the result from problem 2.

Hint: Reduce from -3SAT. Here is one possible way. Given an instance Φ=C1Cm of -3SAT, construct a graph G as follows: for each variable xi in Φ, construct 3m nodes labeled xi and 3m nodes labeled xi. All nodes labeled xi are connected to all nodes labeled xi. For each clause Cj=y1y2y3 in Φ, add a clique of size 3 with nodes labeled y1, y2, and y3 (do not use the same node in more than one clique). Prove that this works.


Problem 4 - Polynomial Hierarchy (20 points)

  1. Show that if P=NP, then PH=P.

  2. The VC-dimension is an important concept in computational learning theory. If S={S1,S2,,Sm} is a collection of subsets of a finite set U, the VC-dimension of S, denoted VCdim(S), is the size of the largest subset XU such that for every YX, there exists SiS such that Y=SiX. In this case, we say that X is shattered by S.

    A boolean circuit C succinctly represents a collection S of subsets of U if Si consists of all xU such that C(i,x)=1.

    Let

    VC-DIMENSION:={C,kC succinctly represents S such that VCdim(S)k}.

    Prove that VC-DIMENSIONΣ3p.


Problem 5 - Circuits for Majority (20 points)

  1. We can consider circuits that output strings over {0,1} by considering a circuit with multiple output gates. Let addn:{0,1}2n{0,1}n+1 be the function that takes two n-bit strings x and y (the bit representation of two integers) and outputs the (n+1)-bit string that represents the sum of x and y in binary. Show that we can compute addn by a family of circuits {Cn}nN such that size(Cn)=O(n).

  2. Define the function majorityn:{0,1}n{0,1} as follows: majorityn(x1,x2,,xn)={1if i=1nxin20otherwise.

    Show that majorityn can be computed by a family of circuits {Cn}nN such that size(Cn)=O(nlogn).

Previous
Next