Connections between exponential time and polynomial time problem Lecture Notes for CS294

Similar documents
A FINE-GRAINED APPROACH TO

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

Hardness for easy problems. An introduction

Matching Triangles and Basing Hardness on an Extremely Popular Conjecture

NP-completeness. Chapter 34. Sergey Bereg

Limitations of Algorithm Power

NP-Hardness reductions

On the Structure and the Number of Prime Implicants of 2-CNFs

U.C. Berkeley Better-than-Worst-Case Analysis Handout 3 Luca Trevisan May 24, 2018

NP-Completeness Review

6.S078 A FINE-GRAINED APPROACH TO ALGORITHMS AND COMPLEXITY LECTURE 1

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

Complexity (Pre Lecture)

Fine Grained Counting Complexity I

U.C. Berkeley CS294: Beyond Worst-Case Analysis Handout 8 Luca Trevisan September 19, 2017

Holger Dell Saarland University and Cluster of Excellence (MMCI) Simons Institute for the Theory of Computing

Induced subgraphs with many repeated degrees

Essential facts about NP-completeness:

Complexity Theory of Polynomial-Time Problems

Improved Quantum Algorithm for Triangle Finding via Combinatorial Arguments

Scribes: Po-Hsuan Wei, William Kuzmaul Editor: Kevin Wu Date: October 18, 2016

arxiv: v2 [cs.ds] 3 Oct 2017

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

CS21 Decidability and Tractability

CS 5114: Theory of Algorithms

CPSC 320 (Intermediate Algorithm Design and Analysis). Summer Instructor: Dr. Lior Malka Final Examination, July 24th, 2009

FPT hardness for Clique and Set Cover with super exponential time in k

On some fine-grained questions in algorithms and complexity

Design and Analysis of Algorithms

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

U.C. Berkeley CS294: Beyond Worst-Case Analysis Handout 2 Luca Trevisan August 29, 2017

1. Introduction Recap

P, NP, NP-Complete, and NPhard

Geometric Problems in Moderate Dimensions

Lecture 22: Counting

Chapter 34: NP-Completeness

Hardness of Embedding Metric Spaces of Equal Size

Completeness for First-Order Properties on Sparse Structures with Algorithmic Applications

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

More Consequences of Falsifying SETH and the Orthogonal Vectors Conjecture [Full version]

Lecture 24 Nov. 20, 2014

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

Instructor N.Sadagopan Scribe: P.Renjith. Lecture- Complexity Class- P and NP

1 Randomized reduction: a first start

A FINE-GRAINED APPROACH TO ALGORITHMS AND COMPLEXITY. Virginia Vassilevska Williams Stanford University

Hardness of Approximation

Complexity Theory of Polynomial-Time Problems

1.1 P, NP, and NP-complete

15.1 Proof of the Cook-Levin Theorem: SAT is NP-complete

CSCI3390-Second Test with Solutions

Lecture 16: Time Complexity and P vs NP

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

NP Complete Problems. COMP 215 Lecture 20

On converting CNF to DNF

A Duality between Clause Width and Clause Density for SAT

NP-Complete Reductions 2

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

The Complexity of Optimization Problems

Theory of Computation Time Complexity

NP Completeness and Approximation Algorithms

Lecture 2: November 9

Lecture 4: LMN Learning (Part 2)

Local Maxima and Improved Exact Algorithm for MAX-2-SAT

Branching. Teppo Niinimäki. Helsinki October 14, 2011 Seminar: Exact Exponential Algorithms UNIVERSITY OF HELSINKI Department of Computer Science

Induced subgraphs of prescribed size

CSCI 1590 Intro to Computational Complexity

On the Sensitivity of Cyclically-Invariant Boolean Functions

Complexity Theory of Polynomial-Time Problems

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

Lower and Upper Bound Results for Hard Problems Related to Finite Automata

Geometric Steiner Trees

NP-Complete Reductions 1

Algorithms and Almost Tight Results for 3-Colorability of Small Diameter Graphs

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

CSC 2414 Lattices in Computer Science September 27, Lecture 4. An Efficient Algorithm for Integer Programming in constant dimensions

Lecture 18: More NP-Complete Problems

A Satisfiability Algorithm for Sparse Depth Two Threshold Circuits

NP-COMPLETE PROBLEMS. 1. Characterizing NP. Proof

CS Introduction to Complexity Theory. Lecture #11: Dec 8th, 2015

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

Why walking the dog takes time: Fréchet distance has no strongly subquadratic algorithms unless SETH fails

SAT, NP, NP-Completeness

Chapter 2 : Time complexity

Computational Complexity and Intractability: An Introduction to the Theory of NP. Chapter 9

More on NP and Reductions

CSCI3390-Lecture 17: A sampler of NP-complete problems

NP-Completeness. Subhash Suri. May 15, 2018

Near-domination in graphs

CS154, Lecture 13: P vs NP

The Complexity of Maximum. Matroid-Greedoid Intersection and. Weighted Greedoid Maximization

CS21 Decidability and Tractability

NP and NP Completeness

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

A Collection of Problems in Propositional Logic

CS 320, Fall Dr. Geri Georg, Instructor 320 NP 1

Lecture Semidefinite Programming and Graph Partitioning

P P P NP-Hard: L is NP-hard if for all L NP, L L. Thus, if we could solve L in polynomial. Cook's Theorem and Reductions

Kernelization by matroids: Odd Cycle Transversal

Polynomial kernels for constant-factor approximable problems

Transcription:

Connections between exponential time and polynomial time problem Lecture Notes for CS294 Lecturer: Russell Impagliazzo Scribe: Stefan Schneider November 10, 2015 We connect problems that have exponential time-complexity with much easier polynomial time problems using reductions that preserve their fine-grained complexity 1 Subset-Sum and k-sum Consider the Subset-Sum problem we have seen before Definition 1 The Subset-Sum problem is given integers a 1,, a n [ 2 l, 2 l ] and T N, find a set S {1,, n} such that a i = T (1) i S The trivial algorithm for subset sum tests all subsets of numbers and takes time O(2 n ), but we have seen in earlier lectures that we can improve this algorithm to O(2 n/2 ) In fact, we showed that Subset-Sum is in time min{2 n/2, 2 l } The k-sum problem is in some sense the polynomial time equivalent of subset sum Definition 2 The k-sum problem is given k sets of integers A 1,, A k with A 1 = = A k = n and T N, find a i A i for all i such that k a i = T (2) i=1 Using a similar idea as used for Subset-Sum, we can solve k-sum in time O(n k/2 ) The k-sum conjecture then says that this runtime is essentially optimal Conjecture 1 (k-sum conjecture) k-sum requires time O(n k/2 ε ) for all ε > 0 As we will see next lecture, the k-sum conjecture implies interesting lower bounds for geometric problems We have previously seen that Subset-Sum is hard assuming the Exponential Time Hypothesis (ETH) In particular, we have seen a reduction from 3-SAT on n variables and m clauses to Subset- Sum of size n = O(n + m) and l = O(n + m) Hence, if ETH is true, there is a c > 0 such that Subset-Sum is not in time min{2 cn, 2 cl } We want to prove a similar statement for k-sum Let c k = inf c k-sum TIME(n c ) be the best exponent in the runtime for k-sum Note that we take an infimum to avoid problems if there is an infinite sequence of better and better algorithms rather than a single optimal algorithm 1

Theorem 1 ([1]) If ETH is true, then c k = Θ(k) Proof The idea is to reduce Subset-Sum to k-sum Let A = {a 1,, a n }, T be the input to the Subset-Sum problem Divide A into k sets {(i 1) n k + 1,, i n k } of size n k each and let A i be all sums of subsets of this sets Note that N = A i = 2 n/k We then ask if the k-sum instance A 1,, A k, T has a solution Using the fact that we have an O(N ck+δ ) algorithm for k-sum for any δ > 0 we get a total time complexity of ( O k2 n/k) ( ) + O N c k+δ = O ) (2 n c k +δ k Assuming ETH the time complexity of Subset-Sum is lower bounded by 2 cn for some constant c Therefore we have c k k c and therefore c k = Ω(k) 2 Independent Set and k-independent Set In this section we consider the k-independent set problem we have seen in earlier lectures Definition 3 The k-independent set problem is given a graph G, decide whether there is a set of k vertices such that they are independent, ie there is no edge between them Note the the independent set problem on the complement graph is the k-clique problem For the purpose of this section there is no difference between the k-independent set problem and the k-clique problem As seen earlier, this problem can be solved in time n ωk/3 where ω is the matrix multiplication exponent by reduction to the problem of finding a triangle in a graph Triangle detection of a graph G with adjacency matrix M can be solved in time O(n ω ) by checking if M 3 contains a positive entry in the diagonal We have also seen that the maximum independent set problem requires time 2 cn for some constant c assuming ETH Definition 4 The maximum independent set problem is given a graph G and t N, decide if there is an independent set of size at least t Let c k be the best exponent for k-independent set We want to show that c k = Θ(k) with a reduction from independent set to k-independent set Consider an input G = (V, E), t for the independent set problem Partition V into k sets V 1,, V k with V i = n k arbitrarily Consider a tuple t 1,, t k with t 1 + +t k = t Note that there are O(n k ) such tuples We build a graph G consisiting of k cliques U 1,, U k where the vertex set of U i consists of all independents sets of V i of size exactly t i For two vertices S U i and T U j we further add an edge (S, T ) if S T is not and independent set In G any k-independent set must be exactly one vertex per clique Furthermore, since a k- independent set cannot contain any edges, such a set must necessarily correspond to an independent set of size t in the original graph G To execute this reduction and then solve the k-independent set problem we need to construct this graph and solf the k-independent set problem n k times The time complexity is therefore given by ( n k k2 2n/k + (2 n/k) c k ) Assuming ETH this has to be lower bounded by 2 cn for some constant c We can conclude c max{ 2 k, c k k } and therefore c k = Θ(k) 2

3 Tight Lower Bounds for Orthogonal Vectors So far we used ETH to argue about the asymptotic growth of the the exponent To get a result on a more specific exponent we need to use a strong hypothesis Definition 5 The Strong Exponential Time Hypothesis (SETH) is that for all ε > 0 there is a k such that k-sat requires time Ω(2 n εn ) We want to apply SETH to the 2-Orthogonal Vectors problem Definition 6 The 2-Orthogonal Vectors problem is given two sets of boolean vectors S and T with S = T = n and every A S and B T are d-dimensional boolean vectors, ie A = A 1 A 2 A d with A i {0, 1} and B = B 1 B d with B i {0, 1} The question is if there is A S and B T such that A and B are orthogonal, ie A 1 B 1 + + A d B d = 0 We will consider the problem where d = polylogn The obvious algorithm for 2-orthogonal vectors tests all pairs of vectors and runs in time O(n 2 d) The Orthogonal Vectors Conjecture (OVC) is that this is essentially optimal Specifically, if d = ω(log n), then there is no O(n 2 ε ) algorithm for any ε > 0 Theorem 2 ([2]) SETH implies OVC Proof We use the split and list technique which we already used in the previous examples Consider a k-cnf with variable set x 1,, x n and let C 1,, C m be its clauses By the Sparsification Lemma we can assume m = O(n) We will construct two sets of d-dimensional boolean vectors S and T with N = S = T = 2 n/2 and d = m = cn = c log S Split the variables into two sets and let α be an assigment to the first set of variables Define the vector A α as { 1 if α does not satisfy Ci (A α ) j = 0 otherwise Symmetrically, for β an assignment to the second set of variables define B β as { 1 if β does not satisfy Ci (B β ) j = 0 otherwise We define S as the set of all A α obtained that way and T as the set of all B β We have that α, β satisfies the formula if and only if for all j either α or β satisfies C j Hence either (A α ) j = 0 or (B β ) j = 0, which is the case exactly if A α and B β are orthogonal If we now have an algorithm for orthogonal vectors that runs in time O(n 2 ε ) for some ε > 0 if d = ω(log N) tk hen we have such an algorithm for d = C log N for all constants C Hence for any k we get a total time to solve k-sat of ( ( O 2 n/2 + 2 n/2) ) 2 ε = O (2 n nε/2) which contradicts the Strong Exponential Time Hypothesis 3

4 Graph Diameter In this section we show that it is hard under SETH to approximate the diameter of a graph within a factor of 3/2 Definition 7 For an unweighted, undirected graph G, the diameter of G is the maximum (shortest path) distance between any two vertices The obvious algorithm for graph diameter does a breadth first search from every starting point The total time complexity of this algorithm is O(nm) We reduce the orthogonal vectors problem to the graph diameter problem Given an instance of the orthogonal vectors problem, we construct a graph G = (V, E) with We have to following edges: (s, A) for all A S (s, i) for all i {1,, d} (t, B) for all B T (t, i) for all i {1,, d} (s, t) (A, i) if (A) i = 1 (B, i) if (B) i = 1 We can observe the following distances: dist(a 1, A 2 ) = 2 dist(b 1, B 2 ) = 2 dist(a, i) 2 dist(b, i) 2 dist(a, s) = 1 dist(a, t) = 2 dist(b, s) = 2 dist(b, t) = 1 dist(i, j) = 2 Furthermore we have dist(a, B) = V = S T {1,, d} {s, t} { 2 if they are not orthogonal 3 if they are orthogonal Hence we have a diameter of 3 if there is an orthogonal pair and a diameter of 2 otherwise Using the orthogonal vectors conjecture (or SETH) we can therefore conclude that distinguishing between graphs of diameters 2 and 3 requires time Ω(n 2 ε ) for all ɛ In particular this also implies that approximating the diameter within a factor of 3/2 also requires quadratic time 4

s t A 1 1 B 1 A 2 B 2 A i if (A i ) j = 1 j if (B i ) j = 1 B i d A N Figure 1: The reduction from orthogonal vectors to graph diameter B N 5

References [1] Mihai Patrascu and Ryan Williams On the possibility of faster sat algorithms In SODA, volume 10, pages 1065 1075 SIAM, 2010 [2] Ryan Williams A new algorithm for optimal 2-constraint satisfaction and its implications Theoretical Computer Science, 348(2):357 365, 2005 6