Complexity Theory of Polynomial-Time Problems

Similar documents
Complexity Theory of Polynomial-Time Problems

Complexity Theory of Polynomial-Time Problems

Complexity Theory of Polynomial-Time Problems

Complexity Theory of Polynomial-Time Problems

Hardness for easy problems. An introduction

A FINE-GRAINED APPROACH TO

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

On some fine-grained questions in algorithms and complexity

Complexity Theory VU , SS The Polynomial Hierarchy. Reinhard Pichler

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

Complexity Theory of Polynomial-Time Problems

Limitations of Algorithm Power

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

Complete problems for classes in PH, The Polynomial-Time Hierarchy (PH) oracle is like a subroutine, or function in

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

arxiv: v2 [cs.cc] 2 Apr 2015

Complexity, P and NP

CSC236 Week 11. Larry Zhang

BBM402-Lecture 11: The Class NP

Notes on Complexity Theory Last updated: October, Lecture 6

1 Circuit Complexity. CS 6743 Lecture 15 1 Fall Definitions

Lecture 4. 1 Circuit Complexity. Notes on Complexity Theory: Fall 2005 Last updated: September, Jonathan Katz

NP and NP Completeness

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

1 More finite deterministic automata

NP-completeness. Chapter 34. Sergey Bereg

CS151 Complexity Theory. Lecture 1 April 3, 2017

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

Matching Triangles and Basing Hardness on an Extremely Popular Conjecture

Simulating Branching Programs with Edit Distance and Friends

2 P vs. NP and Diagonalization

Show that the following problems are NP-complete

CSC 5170: Theory of Computational Complexity Lecture 4 The Chinese University of Hong Kong 1 February 2010

The Polynomial Hierarchy

Chapter 7: Time Complexity

Lecture 8: Alternatation. 1 Alternate Characterizations of the Polynomial Hierarchy

CSC 1700 Analysis of Algorithms: P and NP Problems

Lecture 16: Time Complexity and P vs NP

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

CS154, Lecture 13: P vs NP

Simulating Branching Programs with Edit Distance and Friends Or: A Polylog Shaved is a Lower Bound Made

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

Fine Grained Counting Complexity I

Introduction to Advanced Results

1 PSPACE-Completeness

Lecture 8. MINDNF = {(φ, k) φ is a CNF expression and DNF expression ψ s.t. ψ k and ψ is equivalent to φ}

NP-Complete problems

CP405 Theory of Computation

1. Introduction Recap

Lecture 20: conp and Friends, Oracles in Complexity Theory

About the impossibility to prove P NP or P = NP and the pseudo-randomness in NP

Complexity Classes V. More PCPs. Eric Rachlin

SAT, NP, NP-Completeness

CS154, Lecture 13: P vs NP

Dynamic Programming: Shortest Paths and DFA to Reg Exps

Complexity (Pre Lecture)

Final exam study sheet for CS3719 Turing machines and decidability.

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

arxiv: v2 [cs.ds] 3 Oct 2017

CSC 8301 Design & Analysis of Algorithms: Lower Bounds

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

Computational Complexity

Complexity. Complexity Theory Lecture 3. Decidability and Complexity. Complexity Classes

Umans Complexity Theory Lectures

Lecture 7: Polynomial time hierarchy

COMP/MATH 300 Topics for Spring 2017 June 5, Review and Regular Languages

Finish K-Complexity, Start Time Complexity

NP Complete Problems. COMP 215 Lecture 20

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

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

SOLUTION: SOLUTION: SOLUTION:

Lecture 3: Nondeterminism, NP, and NP-completeness

The Class NP. NP is the problems that can be solved in polynomial time by a nondeterministic machine.

Topics in Complexity Theory

On the Space Complexity of Parameterized Problems

CISC 4090 Theory of Computation

Notes for Lecture 3... x 4

Theory of Computation Time Complexity

COMP Analysis of Algorithms & Data Structures

NP Completeness and Approximation Algorithms

Lecture 19: Finish NP-Completeness, conp and Friends

CS 151 Complexity Theory Spring Solution Set 5

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

Lecture 14 - P v.s. NP 1

An introduction to Parameterized Complexity Theory

Computability Theory

CSCI3390-Lecture 16: NP-completeness

MTAT Complexity Theory October 20th-21st, Lecture 7

Lecture 17: Cook-Levin Theorem, NP-Complete Problems

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY

Lecture #14: NP-Completeness (Chapter 34 Old Edition Chapter 36) Discussion here is from the old edition.

Computability and Complexity Theory: An Introduction

COL 352 Introduction to Automata and Theory of Computation Major Exam, Sem II , Max 80, Time 2 hr. Name Entry No. Group

Dynamic Programming: Shortest Paths and DFA to Reg Exps

Lecture 4: NP and computational intractability

NP-Complete Problems. Complexity Class P. .. Cal Poly CSC 349: Design and Analyis of Algorithms Alexander Dekhtyar..

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

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

Umans Complexity Theory Lectures

CPSC 421: Tutorial #1

Transcription:

Complexity Theory of Polynomial-Time Problems Lecture 13: Recap, Further Directions, Open Problems Karl Bringmann

I. Recap II. Further Directions III. Open Problems

I. Recap

Hard problems SAT: OV: APSP: 3SUM: given a formula in conj. normal form on n variables is it satisfiable? conjecture: no O(2 2&' 3 ) algorithm (SETH) given n vectors in {0,1}. (for small d) are any two orthogonal? conjecture: no O(n %&' ) algorithm given a weighted graph with n vertices compute the distance between any pair of vertices conjecture: no O(n )&' ) algorithm given n integers do any three sum to 0? conjecture: no O(n %&' ) algorithm

Fine-Grained Reductions A fine-grained reduction from (P, T) to (Q, T ) is an algorithm A for P with oracle access to Q s.t.: problem P instance I reduction problem Q instance I 1 size n 2 Properties: size n total time r(n) instance I k size n ; for any instance I, algorithm A(I) correctly solves problem P on I A runs in time r(n) = O(T(n) 2&? ) for some γ > 0 for any ε > 0 there is a δ > 0 s.t. ; FG2 T (n F ) 2&' T(n) 2&I

SETH SAT 2 3 Complexity Inside P 3SUM n % 3SUM-hard APSP n ) APSP equivalent k-ov n ; X+Y n % GeomBase n % Metricity n ) OV n % Colinear n % Separator n % Radius n ) Frechet n % MaxInnerProduct n % PlanarMotion Planning n % Betweenness Centrality n ) Diameter n % 2SAT+2Clauses n % MaxSubmatrix n ) LCS n % NFA-Acceptance n % NegTriangle n ) LPalindromicS n % OV-hard OMv n ) SSReach SSSP OMv-hard BMM n K /n ) TransitiveClosure n K /n ) SlidingWindowHammingDist n 2.N BMM-hard

Conditional Lower Bounds allow to classify polynomial time problems are an analogue of NP-hardness yield good reasons to stop searching for faster algorithms should belong to the basic toolbox of theoretical computer scientists allow to search for new algorithms with better focus improve SAT before longest common subsequence non-matching lower bounds suggest better algorithms motivate new algorithms relax the problem and study approximation algorithms, parameterized running time,

Algorithms BMM: fast matrix multiplication: ω < 3 NodeWeightedNegativeTriangle O(n K ) k-clique O(n K;/) ) MaxCut O(2 K3/) poly(n)) lower order improvements: 4 Russians trick yields log-factor improvements polynomial method: OV in O(n %&2/V WXY./WXY 3 ) or O(n % /2 Z( WXY 3) ) APSP and OMv in O(n ) /2 Z( WXY 3) ) dynamic graph algorithms: incremental/decremental/fully dynamic, amortized/worst-case, update/query time for shortest path and reachability problems

More (Algorithmic) Concepts Decision Trees: O[(n )/% ) for 3SUM (Co-)Nondeterministic Algorithms: O[(n )/% ) for 3SUM Nondeterministic SETH Polynomials and Circuits: Over the integers, or Z ], or AND-OR polynomial multiplication (FFT!), division, interpolation multipoint evaluation

Modern Algorithms Philosophy Fast Matrix Multiplication and Fast Fourier Transform are the only non-trivial algorithmic tools that we have. Whenever you design an algorithm, try to prove a matching conditional lower bound to show optimality.

II. Further Directions 1. Hardness Under Multiple Hypotheses

Hardness Under Multiple Hypotheses so far we identified a reason for the hardness of some problems what about multiple reasons? if a problem Q is SETH-hard and 3SUM-hard and APSP-hard then it is as hard as it gets we can forget about improved algorithms any time soon Q is hard under the following weak conjecture: At least one of SETH or 3SUM-H or APSP-H holds

Complexity Inside P SAT 2 3 3SUM n % APSP n ) NegTriangle n ) ZeroWeightTriangle n ) [Vassilevska-W.,Williams 09] Given a weighted directed graph G Decide whether there are vertices i, j, k s.t. w j, i + w i, k + w k, j = 0 MatchingTriangles n ) Are there d triangles with matchingcolors? Given a directed graph G with colored nodes, and number d Are there colors a, b, c s.t. G contains at least d triangles (i, j, k) where i has color a, j has color b, and k has color c? [Abboud,Vassilevska-W.,Yu 15]

II. Further Directions 2. Ruling out Superpolylogarithmic Improvements

Ruling out Superpolylog Improvements we have seen for LongestCommon Subsequence(LCS): 4 Russians trick: O(n % /log % n) OV-hardness: lower bound Ω(n %&' ) does the polynomialmethod apply? is LCS in time n % /2 Z( WXY 3)? or n % /log K(2) n? how to rule out superpolylogarithmic improvements? SETH/OVH are too coarse! OV has superpolylogarithmic improvements!

SAT F: {0,1} 3 {0,1} Is F satisfiable? F Need Ω(2 3 ) queries, unless we analyze F Hardness of F-SAT depends on our ability to analyze F F given by a... DNF: polytime x 2 x % x 3 formula = circuit over AND/OR/NOT (and maybe XOR/...), where every gate has fanout 1, except for inputs CNF: SETH Turing machine: extremely hard formula: harder than SETH, but still easy to work with no 2 3 /n K(2) -algorithm known, even for F = n V(2)

Formula-SAT Hardness Formula-SAT formula F on n variables size F = n V(2) reduction time 2 3/% n V(2) LCS strings x, y of length 2 3/% n V(2) 2 2&'/% 3 n V 2 algorithm 2 3 /n K 2 algorithm O(n %&' ) algorithm n % /log K(2) n algorithm no 2 3 /n K(2) algorithm known, even for F = n V(2) Thm: LCS has no n % /log K(2) n algorithm [Abboud,Hansen,Vassilevska-W,Williams 16] unless Formula-SAT has an 2 3 /n K(2) algorithm for F = n V(2). this onlyworksfor few problems!

II. Further Directions 3. Hardness Classes

Hardness Classes the field of fine-grained complexity is very problem-centric everything evolves around hard problems what about classes of problems, as in classic complexity? can we prove hardness/completeness of a problem for a class w.r.t. fine-grained reductions?

Hardness Classes class of first-order graph properties: given a graph G with m edges given a first-order formula φ with k + 1 quantifiers check whether φ evaluates to true on G is in time O(m ; ) [Gao,Impagliazzo 16] e.g. u v w: E u, v E v, w E(u, w) does G contain a triangle? u v w: E u, w E w, v does G have diameter=2? Thm: The following are equivalent: [Gao,Impagliazzo 16] - ε, δ > 0: OV in dimension d n I has an O(n %&' ) algorithm ( OVH) - k 2: for any first-order formula φ with k + 1 quantifiers there exists ε { > 0 s.t. φ can be decided in time O(m ;&'} ) on any given graph with m edges

II. Further Directions 4. Multivariate Analysis

Multivariate Analysis LCS is OV-hard: lower bound Ω(n %&' ) what if y = m n = x? How fast can we compute LCS(x, y)? dynamic programming: O(nm) Parameter Setting LCS(β): (0 β 1).. is the LCS problem restricted to strings with m = Θ(n ) what is the best running time n Œ Ž(2) for LCS(β) for any β? Cor: Proof: unless OVH fails, for any β any algorithm for LCS(β) takes time Ω n + n % &Ž(2) = Ω n + m %&Ž(2) for any n, m = n, for any (binary) strings with x, y = m 1: x = x 2 3& } y: = y 2 & } with length x = n y = m where 2 is a fresh symbol LCS(x, y) = LCS(x, y ) + min {n x, m y }

Multivariate Analysis LCS is OV-hard: lower bound Ω(n %&' ) what if y = m n = x? How fast can we compute LCS(x, y)? dynamic programming: O(nm) Parameter Setting LCS(β): (0 β 1).. is the LCS problem restricted to strings with m = Θ(n ) what is the best running time n Œ Ž(2) for LCS(β) for any β? Cor: unless OVH fails, for any β any algorithm for LCS(β) takes time Ω n + n % &Ž(2) = Ω n + m %&Ž(2) Algorithm with time O[(n + m % ) exists! [Hirschberg 77] LCS differs from other similarity measures that take time (nm) 2&Ž(2) [B. 14, B.,Künnemann 15]

Multivariate Analysis Multivariate fine-grained complexity Parameter Setting LCS(β): (0 β 1).. is the LCS problem restricted to strings with m = Θ(n ) what is the best running time n Œ Ž(2) for LCS(β) for any β? Cor: unless OVH fails, for any β any algorithm for LCS(β) takes time Ω n + n % &Ž(2) = Ω n + m %&Ž(2) Algorithm with time O[(n + m % ) exists!

More Parameters for LCS more parameters have been studied for LCS since the 70s: n = x = max { x, y }.. length of longer string m = y = min { x, y }.. length of shorter string L = LCS(x, y).. length of LCS Σ.. size of alphabet Σ Δ = n L.. number of deletions in x δ = m L.. number of deletions in y M = {(i, j) x[i] = y[j]}.. number of matching pairs a b b c a d a 1 1 1 1 1 1 c 1 1 1 2 2 2 d 1 1 1 2 2 3 a 1 1 1 2 3 3 a 1 1 1 2 3 3 b 1 2 2 2 3 3 d 1 2 2 2 3 4

More Parameters for LCS more parameters have been studied for LCS since the 70s: n = x = max { x, y } m = y = min { x, y }.. length of longer string.. length of shorter string a b b c a d a 1 1 1 1 1 1 L = LCS(x, y).. length of LCS c 1 1 1 2 2 2 Σ.. size of alphabet Σ d 1 1 1 2 2 3 Δ = n L.. number of deletions in x a 1 1 1 2 3 3 δ = m L.. number of deletions in y a 1 1 1 2 3 3 b 1 2 2 2 3 3 M = {(i, j) x[i] = y[j]}.. number of matching pairs d 1 2 2 2 3 4 d.. number of dominant pairs = entry (i, j) is dominant if all entries to the top left of it are strictly smaller

O(nm) Known Algorithms [Wagner,Fischer 74] n = max { x, y } L = LCS(x, y) Δ = n L δ = m L m = min { x, y } Σ alphabet size M matching pairs d dominating pairs Õ(n + M) Õ(n + m) Õ(n + Lm) Õ(n + d) Õ(n + ) [Hunt,Szymanski 77] [Hirschberg 77] [Hirschberg 77] [Apostolico 86] [Wu,Manber,Myers,Miller 90] logfactor improvements: [Masek,Paterson 80], [Apostolico,Guerra 87], [Eppstein,Galil,Giancarlo, Italiano 92], [Bille,Farach-Colton 08], [Iliopoulos,Rahman 09] What is the best possible algorithm for any parameter setting?

Parameter Settings n = max { x, y } L = LCS(x, y) Δ = n L δ = m L m = min { x, y } Σ alphabet size M matching pairs d dominating pairs let =( m, L,,,, M, d ) 2 R 7 0 parameter setting LCS(α): is the LCS problem restricted to strings x, y with (n = x ) m = (n m ) L = (n L ) = (n ) etc. we always have L m so α > α is contradictory in this case LCS(α) has only finitely many instances = LCS(α) is trivial We have to understand the interdependencies of parameters first!

Parameter Relations For any strings x, y we have: n = max { x, y } L = LCS(x, y) Δ = n L δ = m L m = min { x, y } Σ alphabet size M matching pairs d dominating pairs L apple m apple n m apple apple n d apple M trivial apple m M n w.l.o.g. every symbol in Σ appears in x and in y L apple d apple Lm apple d apple L 2 d apple 2L( + 1) L 2 / apple M apple 2Ln complex dependencies of the parameters! up to constants, this is a complete list of relations

O(nm) Õ(n + M) Known Algorithms [Wagner,Fischer 74] [Hunt,Szymanski 77] n = max { x, y } L = LCS(x, y) Δ = n L δ = m L m = min { x, y } Σ alphabet size M matching pairs d dominating pairs Õ(n + m) Õ(n + Lm) Õ(n + d) Õ(n + ) [Hirschberg 77] [Hirschberg 77] [Apostolico 86] [Wu,Manber,Myers,Miller 90] parameter relations: apple m apple n d apple M d apple Lm d apple L 2 Best algorithm: Õ(n +min{d, m, })

Parameter Settings n = max { x, y } L = LCS(x, y) Δ = n L δ = m L m = min { x, y } Σ alphabet size M matching pairs d dominating pairs let =( m, L,,,, M, d ) 2 R 7 0 parameter setting LCS(α): is the LCS problem restricted to strings x, y with (n = x ) m = (n m ) L = (n L ) = (n ) etc. a parameter setting is nontrivial if it contains infinitely many instances iff the target values (n, n, n, ) satisfy our parameter relations (for n ) What is the best possible running time n Œ Ž(2) for any nontrivial LCS(α)?

Matching Lower Bound Best algorithm: Õ(n +min{d, m, }) n = max { x, y } L = LCS(x, y) Δ = n L δ = m L m = min { x, y } Σ alphabet size M matching pairs d dominating pairs What is the best possible running time n Œ Ž(2) for any nontrivial LCS(α)? Thm: [B.,Künnemann 16+] Unless OVH fails, for any non-trivial parameter setting LCS(α) any algorithm takes time at least Ω n + min d, δm, δδ 2&Ž(2)

III. Open Problems

Major Open Problems 1) prove conditional lower bounds for more types of problems 2) relate SAT, 3SUM, APSP or show (more) barriers for such relations 3) advance subquadratic approximation algorithms and develop tools for hardness of approximation 4) explain gap between deterministic / randomized algorithms 5) average case hardness? distributed algorithm? other settings? this is a young field of research!

k-longest Common Subsequence (k-lcs) given strings x 2,, x ;, each of length at most n, compute longest string z that is a subsequence of all x F natural dynamic program O(n ; ) reduction SAT k-ov k-lcs yields lower bound of Ω(n ;&' ) but only for strings over alphabets of size Ω(k) [Abboud,Backurs,V-Williams 15] Open Problem: prove conditionallower bound Ω(n ;&' ) for strings over alphabet size O(1), or even 2 Open Problem: which log-factor improvements are possible?

Dynamic Time Warping same setting as for Frechetdistance: DTW is a similarity measure for curves P 2,P % = sequencesover R % 3.2 1.4 0.7 2.6 0.3 1.3 P 1 2.5 0.7 2.2 2.0 0.4 2.2 natural dynamic programming algorithm: O(n % ) 0.8 1.8 2.8 0.5 2.1 3.2 T i, j = DTW(P 2 1.. i, P % 1.. j ) = current distance T i, j = P 2 i P % j + min T i 1, j, T i, j 1, T[i 1, j 1] P 2 last step in P 2 last step in P % last step in both

Dynamic Time Warping same setting as for Frechetdistance: DTW is a similarity measure for curves P 2,P % = sequencesover R % natural dynamic programming algorithm: O(n % ) OV-hardness: lower bound Ω(n %&' ) [B.,Künnemann 15+, Abboud,Backurs,V-Williams 15] slight improvement: O(n % log log log n / log log n) [Gold,Sharir 16] Open Problem: log-factor improvement n % / log n Z 2? Open Problem: n V(2) approximation in time O(n %&' )?

3SUM given sets A, B, C of n integers are there a A, b B, c C such that a + b + c = 0? log-factor improvement: O(n % (WXY WXY 3) ) [Gronlund,Pettie 14] WXY 3 we showed a simplified version: O(n % XW WXY WXY 3 WXY 3 ) Open Problem: n % /2 Z( WXY 3) algorithm?

Dynamic Single Source Reachability we have seen: under OMv, no fully dynamic SSR with update O(n 2&' ), query O(n %&' ) incremental SSR in total update O(m), query O(1) decremental SSR in DAGs in total update O(m), query O(1) decremental SSR in total update O(mn), query O(1) fastest known: decremental SSR in total update O[(m n), query O[(1) Open Problem: faster decrementalssr? or lower bound?

IV. Outro

Oral Exam on a day in September (up to) 30 minutes covers whole lecture and all exercises please mark possible dates for you in this doodle: http://doodle.com/poll/v9bktxdrktv5w98e

End of Course Fast Matrix Multiplication and Fast Fourier Transform are the only non-trivial algorithmic tools that we have. Whenever you design an algorithm, try to prove a matching conditional lower bound to show optimality.