HW11. Due: December 6, 2018

Similar documents
HW11. Due: December 8, 2016

HW8. Due: November 1, 2018

Non-Approximability Results (2 nd part) 1/19

Complexity Classes V. More PCPs. Eric Rachlin

Complexity Theory Final Exam

Lecture 18: PCP Theorem and Hardness of Approximation I

Technische Universität München Summer term 2010 Theoretische Informatik August 2, 2010 Dr. J. Kreiker / Dr. M. Luttenberger, J. Kretinsky SOLUTION

Randomized Complexity Classes; RP

Topics in Complexity Theory

SAT, Coloring, Hamiltonian Cycle, TSP

Show that the following problems are NP-complete

Essential facts about NP-completeness:

3130CIT Theory of Computation

NP Completeness. CS 374: Algorithms & Models of Computation, Spring Lecture 23. November 19, 2015

NP Completeness and Approximation Algorithms

Keywords. Approximation Complexity Theory: historical remarks. What s PCP?

Notes for Lecture 2. Statement of the PCP Theorem and Constraint Satisfaction

Approximation Algorithms

CSE 135: Introduction to Theory of Computation NP-completeness

CS154, Lecture 13: P vs NP

6.045 Final Exam Solutions

CSCI3390-Second Test with Solutions

CS Lecture 29 P, NP, and NP-Completeness. k ) for all k. Fall The class P. The class NP

Polynomial time reduction and NP-completeness. Exploring some time complexity limits of polynomial time algorithmic solutions

Solution of Exercise Sheet 12

Lecture 19: Finish NP-Completeness, conp and Friends

CSCI 1590 Intro to Computational Complexity

CSCI 1590 Intro to Computational Complexity

P is the class of problems for which there are algorithms that solve the problem in time O(n k ) for some constant k.

20.1 2SAT. CS125 Lecture 20 Fall 2016

Pr[X = s Y = t] = Pr[X = s] Pr[Y = t]

Umans Complexity Theory Lectures

NP and NP Completeness

CSE 555 HW 5 SAMPLE SOLUTION. Question 1.

NP-Completeness. Sections 28.5, 28.6

6.045J/18.400J: Automata, Computability and Complexity Final Exam. There are two sheets of scratch paper at the end of this exam.

Complexity Classes IV

Intro to Theory of Computation

CS21 Decidability and Tractability

an efficient procedure for the decision problem. We illustrate this phenomenon for the Satisfiability problem.

Announcements. Friday Four Square! Problem Set 8 due right now. Problem Set 9 out, due next Friday at 2:15PM. Did you lose a phone in my office?

Theory of Computation CS3102 Spring 2014 A tale of computers, math, problem solving, life, love and tragic death

Midterm II : Formal Languages, Automata, and Computability

CS 5114: Theory of Algorithms. Tractable Problems. Tractable Problems (cont) Decision Problems. Clifford A. Shaffer. Spring 2014

6.840 Language Membership

NP-COMPLETE PROBLEMS. 1. Characterizing NP. Proof

NP Completeness and Approximation Algorithms

Hardness of Approximation

Lecture 24: Randomized Complexity, Course Summary

Umans Complexity Theory Lectures

Algebraic Dynamic Programming. Solving Satisfiability with ADP

Time and space classes

NP-Complete Problems. More reductions

Chapter 2. Reductions and NP. 2.1 Reductions Continued The Satisfiability Problem (SAT) SAT 3SAT. CS 573: Algorithms, Fall 2013 August 29, 2013

6.045: Automata, Computability, and Complexity (GITCS) Class 17 Nancy Lynch

Lecture 15: A Brief Look at PCP

Tractability. Some problems are intractable: as they grow large, we are unable to solve them in reasonable time What constitutes reasonable time?

CSC 5170: Theory of Computational Complexity Lecture 9 The Chinese University of Hong Kong 15 March 2010

Lecture 12: Randomness Continued

Complexity Theory VU , SS The Polynomial Hierarchy. Reinhard Pichler

9.1 HW (3+3+8 points) (Knapsack decision problem NP-complete)

Outline. Complexity Theory EXACT TSP. The Class DP. Definition. Problem EXACT TSP. Complexity of EXACT TSP. Proposition VU 181.

Introduction to Advanced Results

The Cook-Levin Theorem

6-1 Computational Complexity

Review of Complexity Theory

6.045: Automata, Computability, and Complexity (GITCS) Class 15 Nancy Lynch

-bit integers are all in ThC. Th The following problems are complete for PSPACE NPSPACE ATIME QSAT, GEOGRAPHY, SUCCINCT REACH.

1 Distributional problems

Topic: Sampling, Medians of Means method and DNF counting Date: October 6, 2004 Scribe: Florin Oprea

NP Complete Problems. COMP 215 Lecture 20

CSC 5170: Theory of Computational Complexity Lecture 5 The Chinese University of Hong Kong 8 February 2010

Lecture 12: Interactive Proofs

Handout 5. α a1 a n. }, where. xi if a i = 1 1 if a i = 0.

Welcome to... Problem Analysis and Complexity Theory , 3 VU

CS154, Lecture 15: Cook-Levin Theorem SAT, 3SAT

U.C. Berkeley CS278: Computational Complexity Professor Luca Trevisan August 30, Notes for Lecture 1

SOLUTION: SOLUTION: SOLUTION:

CS154, Lecture 13: P vs NP

UC Berkeley CS 170: Efficient Algorithms and Intractable Problems Handout 22 Lecturer: David Wagner April 24, Notes 22 for CS 170

Correctness of Dijkstra s algorithm

NP-Completeness Review

Chapter 5 : Randomized computation

CSE 3500 Algorithms and Complexity Fall 2016 Lecture 25: November 29, 2016

Review of unsolvability

Approximation Algorithms and Hardness of Approximation. IPM, Jan Mohammad R. Salavatipour Department of Computing Science University of Alberta

CISC 4090 Theory of Computation

NP-Completeness. Andreas Klappenecker. [based on slides by Prof. Welch]

SAT, NP, NP-Completeness

CS154, Lecture 18: 1

CSCI 1590 Intro to Computational Complexity

1 Randomized complexity

Lecture 16: Time Complexity and P vs NP

Summer School on Introduction to Algorithms and Optimization Techniques July 4-12, 2017 Organized by ACMU, ISI and IEEE CEDA.

CS 151 Complexity Theory Spring Solution Set 5

Limits to Approximability: When Algorithms Won't Help You. Note: Contents of today s lecture won t be on the exam

CS 5114: Theory of Algorithms

Notes on Complexity Theory Last updated: October, Lecture 6

CS Lecture 28 P, NP, and NP-Completeness. Fall 2008

ENEE 459E/CMSC 498R In-class exercise February 10, 2015

Transcription:

CSCI 1010 Theory of Computation HW11 Due: December 6, 2018 Attach a fully filled-in cover sheet to the front of your printed homework. Your name should not appear anywhere; the cover sheet and each individual page of the homework should include your Banner ID only. While collaboration is encouraged in this class, please remember not to take away notes from any labs or collaboration sessions. Please monitor Piazza, as we will post clarifications of questions there. Hand in your solutions by 10:20am to the CSCI 1010 bin on the second floor of the CIT. Late homeworks are not accepted. Problem 1 In order to construct additional pylons, probes must deliver minerals to the appropriate nexus. The nexuses are arranged in a circle, and the probes each have a starting nexus and a destination nexus. Each probe starts at its starting nexus and must choose to go around the circle either clockwise or counterclockwise to get to its destination. Unfortunately, there is known to be an infestation of zerglings in the area, and they will position themselves between a pair of consecutive nexuses in order to attack the largest number of probes. Help the probes by directing each one clockwise or counterclockwise so that the maximum over all edges of the number of probes that traverse that edge is minimized. An instance of this problem is given by a cycle graph on n nodes where V = {0,...,n 1} and E = {(0,1),(1,2),...,(n 2,n 1),(n 1,0)}, and a list of m routing jobs which are pairs of vertices denoting the start and destinationofeachprobe(theseareoftheform(s 1,d 1 ),(s 2,d 2 ),...,(s m,d m ) where s i,d i V). A solution specifies the direction each probe is routed: clockwise or counterclockwise. The cost of a solution is the number of probes that go through the solution s most overloaded edge (in other words, the maximum over all edges of the number of probes that traverse that edge); this cost function is called Zerg Feast. An optimal solution is one that minimizes this cost function.

Algorithm ProbeRouting = On input a cycle graph of size n and list of routing jobs: 1. While not all jobs have been chosen to be routed clockwise or counterclockwise: pick an unrouted job, and route it in whichever direction is the shorter path (ties broken arbitrarily) Prove that this algorithm is a 2-approximation for Zerg Feast. Hint: Think about the edge with the largest number of passing probes in the routing scheme produced by this algorithm, and think about the edge directlyoppositethisedgeinthegraph. Whatcanyousayaboutthenumber of probes that pass through these edges? Problem 2 Leonidas is trying to find a clique. With only polynomial strength he cries out This is madness! Actually, this is Sparta, so only a rough approximation is needed. a. Leonidas is given a graph G with 3n vertices. He is told that the largest clique in G is of size 2n. Help him construct a polynomial time algorithm that uses this fact to find a 2-approximation of the largest clique. Specifically, the algorithm should return a clique of size at least n. b. In class you learned that in general finding 2-approximations for maximum cliques is NP-hard. Why does this fact not contradict your answer to the previous part? The following questions are lab problems. Lab Problem 1 A probabilistic Turing machine is a Turing machine that, in addition to the usual tape, has a second tape filled with random bits. This machine may sometimes accept and sometimes reject the same input x, depending on the content of the random tape. 2

The concept of a probabilistic Turing machine gives rise to a whole new set of complexity classes, namely probabilistic polynomial time complexity classes. Some of the main ones are BPP, RP, corp, and ZPP 1, and they are defined as follows: A language L is in BPP if there exists a probabilistic Turing machine M that runs in polynomial time such that the following two conditions hold: Completeness: For every x L, Pr[M accepts x] 2/3. Soundness: For every x / L, Pr[M accepts x] 1/3. This Turing machine M is called a Monte Carlo algorithm for L. A language L is in RP if there exists a probabilistic Turing machine M that runs in polynomial time such that the following two conditions hold: Completeness: For every x L, Pr[M accepts x] 2/3. Perfect soundness: For every x / L, Pr[M accepts x] = 0. A language L is in corp if its complement is in RP. Equivalently, a language L is in corp if there exists a Turing machine M that runs in polynomial time such that the following two conditions hold: Perfect completeness: For every x L, Pr[M accepts x] = 1. Soundness: For every x / L, Pr[M accepts x] 1/3. A language L is in ZPP if there exists a probabilistic Turing machine M that, in addition to the usual accepting and rejecting states, has an unsure state in which the machine can halt. M will run in polynomial time and at termination time will be in the accept, reject, or unsure state, such that the following two conditions hold: Completeness: For every x L, Pr[M accepts x] 2/3, Pr[M rejects x] = 0, and Pr[M is unsure on x] 1/3. Soundness: For every x / L, Pr[M accepts x] = 0, Pr[M rejects x] 2/3, and Pr[M is unsure on x] 1/3. a. Show that P RP BPP and P corp BPP. 1 For the curious: BPP stands for bounded-error probabilistic polynomial time, RP stands for randomized polynomial time, and ZPP stands for zero-error probabilistic polynomial time. 3

b. Show that ZPP = RP corp. c. Using either the given definition for ZPP or the one you just derived in part (b), demonstrate that the following definition is also equivalent: A language L is in ZPP if there exists a probabilistic Turing machine M (which does not have unsure states) and some polynomial p such that: Runtime: Forallinputsxoflengthn,theexpectedruntimeE[runtime of M on x] is O(p(n)). Completeness: For every x L, Pr[M accepts x] = 1. Soundness: For every x / L, Pr[M accepts x] = 0. Hint: You may find Markov s inequality to be helpful. If X is a nonnegative random variable and a > 0, then Lab Problem 2 Pr[X a] E[X] a Recall that in the decision problem 3SAT, we wanted to determine whether there was an assignment of truth values that satisfied every clause of a 3CNF Boolean formula. In the optimization version Max-3SAT, the goal is to find some assignment of truth values that satisfies the maximum possible number of clauses, even if it is not possible to satisfy every single clause. Design a (deterministic) polynomial-time algorithm that, given as input a Boolean formula in 3CNF, finds an assignment of values that satisfies at least 7/8 s as many clauses as the maximum possible number of satisfiable clauses. You should assume that each clause contains exactly 3 literals of distinct variables. Prove that your algorithm is correct and runs in polynomial time. Hint: What happens if you assign each variable randomly? (This hint may be useful to consider, but remember that your solution has to be a deterministic algorithm.) Lab Problem 3 The PCP Theorem is one of the most important and surprising results in computational complexity, which gives an alternative characterization of the class NP and has many implications for approximability and algorithm design. One statement of the PCP Theorem is the following: 4

PCP Theorem. There exists a constant ρ < 1 such that the following holds. For every language L in NP, there is a polynomial-time computable function f mapping a string x to a 3CNF formula f(x) such that: If x L, then there is an assignment of variables that satisfies every clause in the formula f(x). If x L, then every assignment of variables satisfies less than a ρ- fraction of the clauses in f(x). Note that if we replace ρ with 1, then the two bullet points above are just the definition of a mapping reduction, so for any language L in NP, the Cook-Levin reduction for L would satisfy them. The PCP Theorem says something stronger: not only can we map strings in L to satisfiable formulas and map strings not in L to unsatisfiable formulas, but we can also create a gap between the maximum fraction of satisfiable clauses in the two cases. a. Consider the types of clauses produced by the Cook-Levin reduction and explain why if L NP, then even if x L, almost all of the clauses can be satisfied. In other words, the Cook-Levin reduction does not satisfy the conditions of the PCP Theorem. Thus, while mapping reductions may help in proving results about approximability, they don t always work and have to be analyzed more carefully. b. Using the PCP Theorem, show that if there is a polynomial-time (1/ρ)- approximation for Max-3SAT (where ρ is the constant defined in the PCP Theorem), then P = NP. c. Using the PCP Theorem, show that for every language L in NP, there is a polynomial-time computable function g mapping a string x to a graph g(x) such that: If x L, then there is a clique in g(x) of size at least ( V(g(x)) /3) (i.e., a clique containing at least 1/3 of the vertices in g(x)). If x L, then every clique in g(x) has size less than ρ( V(g(x)) /3). Together with what you have shown in class, this result implies that if Max-Clique can be approximated in polynomial time to within any constant factor, then P = NP. (For example, if there is a polynomial-time algorithm that is guaranteed to find a clique that is even 1/1000 the size of the maximum clique, then P = NP.) 5