Complexity Theory of Polynomial-Time Problems Lecture 11: - - PowerPoint PPT Presentation
Complexity Theory of Polynomial-Time Problems Lecture 11: - - PowerPoint PPT Presentation
Complexity Theory of Polynomial-Time Problems Lecture 11: Nondeterministic SETH Karl Bringmann Complexity Inside P 3SUM n 2 SAT 2 n APSP n 3 APSP equivalent Colinearity n 2 OV n 2 Radius n 3 3SUM-hard Negative Triangle n 3 BMM " LCS
Complexity Inside P
SAT 2n EDIT n2 LCS n2 FrΓ©chet n2 diameter n2 OV n2 Colinearity n2 Negative Triangle n3 Radius n3 3SUM-hard APSP equivalent SETH-hard APSP n3 3SUM n2 BMM π" SlidingWindowHD π" BMM-hard
can we relate SAT / 3SUM / APSP / BMM?
Relating Hypotheses
- nly very weak relations are known
e.g. ETH implies that k-SUM has no π#(%) algorithm today we will see a barrier for tighter connections OPEN: SETH implies that 3SUM has no π(π()*) algorithm ?
- I. Nondeterministic SETH
Nondeterministic Algorithms
Turing machine: can choose any applicable transition at any point in time RAM: operation guess() fills a cell with an integer YES-instance: at least one accepting path NO-instance: all paths reject NP: all problems solvable in polytime by a nondet. Turing machine k-SAT algorithm: guess a satisfying assignment, check correctness π(π + π) 3SUM algorithm: guess π, π, π β π΅ and check π + π + π = 0 π(1)/π(π) βguess a short proof of satisfiability and check itβ guesses on an accepting path = proof that we have a YES-instance
Co-Nondeterministic Algorithms
Turing machine: can choose any applicable transition at any point in time RAM: operation guess() fills a cell with an integer YES-instance: all paths accept NO-instance: at least one path rejects co-NP: all problems solvable in polytime by a co-nondet. Turing machine if NP β co-NP, then k-SAT has no π·(po poly(π)) co-nondet. algorithm we believe that NP β co-NP, since otherwise the polynomial hierarchy collapses k-SAT: βguess a short proof of unsatisfiability and check itβ β Is this possible ? guesses on a rejecting path = proof that we have a NO-instance classic computational complexity:
(Co-)Nondeterministic SETH
NSETH implies SETH (without randomization) barely anyone believes that NSETH is true but it formalizes a current barrier NSETH can be used to conditionally rule out reductions not even a π(2 ?)* @) co-nondet. algorithm is known! Nondeterministic SETH: k-SAT has no no π(2 ?)* @) co-nondet. algorithm do not allow randomization! if NP β co-NP, then k-SAT has no π(poly(π)) co-nondet. algorithm
[CGIMPSβ16]
Potential Reduction from SAT to 3SUM
an deterministic algorithm π΅ for k-SAT with oracle access to 3SUM s.t.:
3SUM
total time π (π) size π? reduction instance π½1 size π% instance π½π
β¦ β¦
for any fomula π, algorithm π΅(π) correctly solves k-SAT on π π΅ runs in time π (π) = π(2 ?)E @) for some πΏ > 0 for any π > 0 there is a π β (0, πΏ) s.t. β πK
()* % KL?
β€ 2 ?)N @ Properties:
k-SAT
π variables, π β€ π% clauses fomula π e.g. π = 1 and π? = 2@/(πO, then π?
()* β€ 2 ?)*/( @πO% β€ 2 ?)*/P @
Potential Reduction from SAT to 3SUM
an deterministic algorithm π΅ for k-SAT with oracle access to 3SUM s.t.:
3SUM
total time π (π) size π? reduction instance π½1 size π% instance π½π
β¦ β¦
for any fomula π, algorithm π΅(π) correctly solves k-SAT on π π΅ runs in time π (π) = π(2 ?)E @) for some πΏ > 0 for any π > 0 there is a π β (0, πΏ) s.t. β πK
()* % KL?
β€ 2 ?)N @ Properties:
k-SAT
π variables, π β€ π% clauses fomula π
π(π()*) algorithm π(2 ?)N @) algorithm βΈ
Potential Reduction from SAT to 3SUM
an deterministic algorithm π΅ for k-SAT with oracle access to 3SUM s.t.:
3SUM
total time π (π) size π? reduction instance π½1 size π% instance π½π
β¦ β¦
for any fomula π, algorithm π΅(π) correctly solves k-SAT on π π΅ runs in time π (π) = π(2 ?)E @) for some πΏ > 0 for any π > 0 there is a π β (0, πΏ) s.t. β πK
()* % KL?
β€ 2 ?)N @ Properties:
k-SAT
π variables, π β€ π% clauses fomula π
- nondet. π(π()*) algorithm and
co-nondet. π(π()*) algorithm
- nondet. π(2 ?)N @) algorithm and
co-nondet. π(2 ?)N @) algorithm βΈ
Potential Reduction from SAT to 3SUM
an deterministic algorithm π΅ for k-SAT with oracle access to 3SUM s.t.:
3SUM
total time π (π) size π? reduction instance π½1 size π% instance π½π
β¦ β¦
for each instance π½
R: guess whether it is YES- or NO-instance
if we guessed YES: guess a proof πR that π½
R is a YES-instance
k-SAT
π variables, π β€ π% clauses fomula π if we guessed NO: guess a proof πR that π½
R is a NO-instance
if we guessed correctly: π = (π?,β¦ , π%) forms a proof that π is satisfiable or unsatisfiable algorithm π΅ is the βproof checkerβ
Potential Reduction from SAT to 3SUM
an deterministic algorithm π΅ for k-SAT with oracle access to 3SUM s.t.:
3SUM
total time π (π) size π? reduction instance π½1 size π% instance π½π
β¦ β¦ k-SAT
π variables, π β€ π% clauses fomula π
- nondet. π(π()*) algorithm and
co-nondet. π(π()*) algorithm
- nondet. π(2 ?)N @) algorithm and
co-nondet. π(2 ?)N @) algorithm βΈ no nondet. π(π()*) algorithm or no co-nondet. π(π()*) algorithm no nondet. π(2 ?)N @) algorithm or no co-nondet. π(2 ?)N @) algorithm βΉ =NSETH
Ruling Out Reductions
either 3SUM has strongly subquadratic algorithms
- r 3SUM is hard for a different reason than k-SAT
- r NSETH fails
then there is no deterministic reduction from k-SAT to 3SUM If NSETH holds and 3SUM has a π(π()*) co-nondeterministic algorithm
we will show this
has drawbacks, but this is the only tool for negative results in this area
Co-Nondeterministic Algorithm for 3SUM
Thm: 3SUM has a co-nondeterministic algorithm in time π V(πP/()
[CGIMPSβ16]
3SUM: given set π΅ of integers in {βπY, β¦ , πY}, are there π, π, π β π΅ s.t. π + π + π = 0?
π V hides polylogarithmic factors in n π V π π = \ π π π logO π
O^_
π V π π = π(π π β polylog π)
Co-Nondeterministic Algorithm for 3SUM
Thm: 3SUM has a co-nondeterministic algorithm in time π V(πP/()
[CGIMPSβ16]
1) guess prime π β€ πP/( logπ 2) compute π’ = π,π,π β π΅P | π + π + π = 0 mod π π V(π)
3SUM: given set π΅ of integers in {βπY, β¦ , πY}, are there π, π, π β π΅ s.t. π + π + π = 0?
π V(π)
Recall: 3SUM for Small Numbers
3SUM is in time π π + π V(π) for numbers in {0, β¦, π} define polynomial π π β β πk
kβl
has degree at most π compute π π β π π β π π β π π = (β πk
kβl
)(β πk
kβl
)(β πk
kβl
) what is the coefficient of πn in π (π)? use efficient polynomial multiplication (via Fast Fourier Transform): polynomials of degree π can be multiplied in time π V(π) (πk β πp β πO = πkqpqO) it is the number of (π,π, π ) summing to π
Co-Nondeterministic Algorithm for 3SUM
Thm: 3SUM has a co-nondeterministic algorithm in time π V(πP/()
[CGIMPSβ16]
1) guess prime π β€ πP/( logπ 2) compute π’ = π,π,π β π΅P | π + π + π = 0 mod π π V(π)
3SUM: given set π΅ of integers in {βπY, β¦ , πY}, are there π, π, π β π΅ s.t. π + π + π = 0?
let πΆ β π mod π π β π΅} (in general πΆ is a multi-set!) let π
_ β
π, π, π β πΆP | π + π + π = 0 let π
? β
π, π, π β πΆP | π + π + π = π let π
( β
π, π, π β πΆP | π + π + π = 2π then π’ = π
_ + π ? + π (
universe size π = π
Co-Nondeterministic Algorithm for 3SUM
Thm: 3SUM has a co-nondeterministic algorithm in time π V(πP/()
[CGIMPSβ16]
1) guess prime π β€ πP/( logπ 2) compute π’ = π,π,π β π΅P | π + π + π = 0 mod π 4) guess distinct π?,π?,π? ,β¦ , πn,πn, πn β π΅P such that πK + πK + πK = 0 mod π βπ 3) if π’ > π½ β πP/( logπ: accept 5) check that for all πK, πK, πK we have πK + πK + πK β 0 6) if everything works out: reject (otherwise accept) π V(π) β time π V(πP/() YES-instance: all paths accept NO-instance: at least one path rejects β if we reject then we have a NO-instance β
3SUM: given set π΅ of integers in {βπY, β¦ , πY}, are there π, π, π β π΅ s.t. π + π + π = 0? (constant π½ to be fixed later)
Co-Nondeterministic Algorithm for 3SUM
show that there exists a prime π β€ πP/( logπ such that π’ = π, π,π β π΅P | π + π + π = 0 mod π < π½ β πP/( logπ NO-instance: at least one path rejects: M := # tuples (π, π, π, π) with π, π,π β π΅ and prime π s.t. π + π + π = 0 mod π
3SUM: given set π΅ of integers in {βπY, β¦ , πY}, are there π, π, π β π΅ s.t. π + π + π = 0?
each π + π + π is in β3πY , β¦, 3πY β {0}, so it has at most log(3πY) prime factors thus π β€ πP log 3πY β€ 3π‘ β πP log π by prime number theorem: there are at least πP/(/πΎ primes π β€ πP/( log π thus there is a prime π contained in at most π/(πP/(/πΎ) tuples (π, π, π, π) thus there is a prime π with π’ β€ π/(πP/(/πΎ) β€ 3π‘ β πΎ β πP/( log(π) set π½ β 3π‘ β πΎ
Co-Nondeterministic Algorithm for 3SUM
Thm: 3SUM has a co-nondeterministic algorithm in time π V(πP/()
[CGIMPSβ16]
π V(π) β time π V(πP/() YES-instance: all paths accept NO-instance: at least one path rejects β if we reject then we have a NO-instance β
3SUM: given set π΅ of integers in {βπY, β¦ , πY}, are there π, π, π β π΅ s.t. π + π + π = 0? (constant π½ to be fixed later)
β 1) guess prime π β€ πP/( logπ 2) compute π’ = π,π,π β π΅P | π + π + π = 0 mod π 4) guess distinct π?,π?,π? ,β¦ , πn,πn, πn β π΅P such that πK + πK + πK = 0 mod π βπ 3) if π’ > π½ β πP/( logπ: accept 5) check that for all πK, πK, πK we have πK + πK + πK β 0 6) if everything works out: reject (otherwise accept)
- I. Randomized Nondeterministic SETH
Randomized Nondeterministic SETH
Nondeterministic SETH: k-SAT has no no π(2 ?)* @) co-nondet. algorithm what if we allow randomization? Thm: k-SAT has a randomized co-nondeterministic π(2@/(poly(π)) algorithm with error probability 2)β¬(@) Thm: OV has a randomized co-nondeterministic π(π poly(π,log π)) algorithm with error probability π)β¬(?)
βΈ
[Williamsβ16]
then the hypothesis is wrong!
Tools: Basics on Polynomials
fix field β€β and assume that field operations can be performed in π(1) time univariate polynomials π π = β πKπK
@ KL_
, π π = β πKπK
Ζ KL_
, π β€ π multiplication π π β π (π): π V π (by FFT, without proof) division with remainder: π V π (without proof) π π = π π β π π + π(π), where π(π) has degree < π we write π π = π π mod π π evaluate π(π) at a given point π¦: π(π) Hornerβs method: π π¦ = π_ + π¦ β π? + π¦ β π( + π¦ β β¦
Tools: Multipoint Evaluation on Polynomials
multipoint evaluation: π V π 1) let π π β (π β π¦?)β―(π β π¦@/() and π π β (π β π¦@/(q?)β― (π β π¦@) evaluate π(π) at given points π = π¦?,β¦ , π¦@ 2) let π
β° π β π π mod π(π)
and π
Ε π β π π mod π(π)
3) recursively compute π
β°(π¦?),β¦, π β°(π¦@/() and π Ε (π¦@/(q?),β¦, π Ε (π¦@)
fix field β€β and assume that field operations can be performed in π(1) time univariate polynomial π π = β πKπK
@ KL_
π π = π π β π π + π
β°(π)
π π¦K = π π¦K β π π¦K + π
β° π¦K
= 0 for π β€ π/2 polynomial division: π π = 2π π/2 + π V π = π V π = π
β° π¦K
Tools: Multipoint Evaluation on Polynomials
computing π π β (π β π¦?)β―(π β π¦@/(): fix field β€β and assume that field operations can be performed in π(1) time univariate polynomial π π = β πKπK
@ KL_
(π β π¦K) π
K,R π : = β’ π β π¦% R %LK
computes canonical polynomials πYβ (Ε½q?, Yq? (Ε½ π defined by straight-forward binary tree logπ in layer π: π/2K multiplications of polynomials of degree 2K total time π V π
Tools: Polynomial Interpolation
polynomial interpolation: π V π given pairs π¦?,π§? ,β¦ , (π¦@, π§
@) find a polynomial π(π) with π π¦K = π§K for all π
fix field β€β and assume that field operations can be performed in π(1) time univariate polynomial π π = β πKπK
@ KL_
Lagrangeβs formula: π π = β’ π§K β β’ π β π¦R π¦K β π¦R
RβK K
Caveat: βdivision by π¦β in β€β means multiplication with the inverse π¦)? extended Euclidean algorithm: computes π‘,π’ with π‘ β π¦ + π’ β π = gcd π¦, π = 1 modulo π: π‘ β π¦ = 1 so π‘ = π¦)? is the inverse of π¦
Tools: Polynomial Interpolation
1st goal: compute π π = β’ π§K
β β β’ π β π¦R RβK K
- π§K
β β β’ π β π¦R RβK K
=
- π§K
β β
- π β π¦R
?βRβ@/( RβK ?βKβ@/(
β π π recursion: +
- π§K
β β
- π β π¦R
@/(β’Rβ@ RβK @/(β’Kβ@
β π π (for π§K
β:= π§K β β ? βΛ)ββ’ RβK
) let π π β (π β π¦?)β―(π β π¦@/() and π π β (π β π¦@/(q?)β― (π β π¦@)
Tools: Polynomial Interpolation
2nd goal: compute factors π‘K = β’ 1 π¦K β π¦R
RβK
π β π = β’β’ π β π¦R
RβK K
= β’ π β πKπK)?
@ KL_
compute the derivative of can compute π β π in time π V π π π β β’ π β π¦K
@ KL?
= β’ πKπK
@ KL_
then we have π β π¦% = β’ β’ π¦% β π¦R
RβK K
= β’ π¦% β π¦R
Rβ%
= π‘%
)?
compute all π β π¦% for π = 1, β¦ ,π in time π V π by multipoint evaluation
Tools: Polynomial Interpolation
polynomial interpolation: π V π given pairs π¦?,π§? ,β¦ , (π¦@, π§
@) find a polynomial π(π) with π π¦K = π§K for all π
fix field β€β and assume that field operations can be performed in π(1) time univariate polynomial π π = β πKπK
@ KL_
Lagrangeβs formula: π π = β’ π§K β β’ π β π¦R π¦K β π¦R
RβK K
can be computed in time π V π !
Tools: Arithmetic Circuits
arithmetic circuits are a (succinct) representation of (multivariate) polynomials fix field β€β and assume that field operations can be performed in π(1) time
Γ + Γ 42 π? π( + Γ πP 7
input gates labeled with variables π?,β¦, π%
- univariate if π = 1
each other gate is a β+β or βΓβ (unbounded fanin)
- r a βββ (fanin 1)
- r a constant (fanin 0)
fanout is unbounded
- ne output gate
given an input π¦?,β¦ ,π¦% β β€β (no cyclic dependencies) the output π·(π¦?,β¦ ,π¦%) is the number computed
42 + π?π( π?π( βπ( πP + πP β 7
β
by the output gate (in β€β) = 7 = 1 = 1 = β2 = 7 = 8 = β1 = β2 = 40 = 42 = 640
Tools: Arithmetic Circuits
fix field β€β and assume that field operations can be performed in π(1) time
Γ + Γ 2 π + 3
1 + 2π 2π 3 β π
β 1
β4πP + 10π( + 6π =
π Γ 6 10 β4
representation as circuit is not unique
+ Γ + Γ
circuit = unstructured, succinct polynomial = structured, verbose
Tools: Arithmetic Circuits
fix field β€β and assume that field operations can be performed in π(1) time
2
working modulo π is necessary
- ver β€ numbers can get very large:
Γ Γ Γ Γ Γ Γ = 2(
Tools: Arithmetic Circuits
fix field β€β and assume that field operations can be performed in π(1) time
Γ + Γ 42 π? π( + Γ πP 7
42 + π?π( π?π( βπ( πP + πP β 7
β
size π‘ = number if wires π inputs degree(input gate) = 1 degree(constant gate) = 0 degree(βββ gate) = degree of child degree(β+β gate) = maximum of degrees of children degree(βΓβ gate) = sum of degrees of children degree of circuit = degree(output gate) degree π = βlargest degree of any monomial assuming no cancelationsβ 1 1 1 1 1 1 2 2 6
Tools: Evaluation of Circuits
fix field β€β and assume that field operations can be performed in π(1) time size π‘ = number if wires π inputs
Γ + Γ 2 π + 3
1 + 2π 2π 3 β π
β 1
evaluating a circuit at given input: π(s) degree π
Tools: Identity Testing
fix field β€β and assume that field operations can be performed in π(1) time size π‘ = number if wires π inputs given two circuits π·?,π·(, do they represent the same polynomial over β€β? degree π assume that π·?,π·( are univariate and assume π β₯ 2π this has a randomized π V(π‘)-time algorithm with error probability 1 β π‘)β¬(?) this problem is called polynomial identity testing 1) for logπ‘ rounds: 2) pick random π¦ β β€β 3) if π·?(π¦) β π·((π¦): return βnot identicalβ 4) return βidenticalβ π·? π β π·((π) is a poly- nomial π (π) of degree π if π·?(π) β π·((π) then π (π) is not the 0-polynomial and thus has at most π roots with probability β₯ 1/2 we pick a non-root π¦ Schwarz-Zippel-Lemma:
Tools: Evaluation of Circuits
fix field β€β and assume that field operations can be performed in π(1) time size π‘ = number if wires π inputs
Γ + Γ 2 π + 3
1 + 2π 2π 3 β π
β 1
evaluating a circuit at given input: π(s) no near-linear time algorithm known converting a univariate circuit to a polynomial: π V(s β d) degree π (write each gate as a degree polynomial) multipoint evaluation (at π points): trivial algorithm: π(π β s) conversion + multipoint evaluation for polynomials = multipoint evaluation for univariate circuits in π V(s β d + π + π) (for multivariate: degree π polynomial has up to π + π + 1 π monomials βΉ)
OV as Multipoint Evaluation on Circuits
circuit π·(π, π) for testing orthogonality of π, π: Given sets π΅,πΆ β 0,1 Β€ of size π Decide whether there are π β π΅, π β πΆ such that π β₯ π OV: π·(π, π) = β’(1 β πKπK)
Β€ KL?
Γ + Γ 1 π? π? β 1 β¦ β Γ πΒ€ πΒ€ β
OV as Multipoint Evaluation on Circuits
circuit π·(π) for testing orthogonality of π with any π β πΆ: Given sets π΅,πΆ β 0,1 Β€ of size π Decide whether there are π β π΅, π β πΆ such that π β₯ π OV: π·(π) = β’ π·(π, π)
pβΒ¦
= β’ β’(1 β πKπK)
Β€ KL? pβΒ¦
+ β¦
for each π β πΆ
π·(π, π) β¦
- π inputs (for the coordinates of π)
- size π(ππ)
- degree β€ 2π
- for any π β {0,1}Β€: 0 β€ π·(π) β€ π
- pick prime π β₯ π and work modulo π, i.e., over field β€β
(Co-)Nondet. Multipoint Evaluation on Circuits
Given circuit π· on inputs π?,β¦ ,π% with size π‘ and degree π over β€β can assume π β₯ 2ππ, π β€ πΒ§(?) Given inputs π¨?,β¦ ,π¨@ β β€β
%
want to evaluate π· on each π¨R = (π¨R 1 , β¦, π¨R π ) 1) compute polynomials π? π , β¦, π%(π) such that πK π = π¨R[π] by polynomial interpolation π V(ππ) new goal: evaluate univariate circuit π·β π = π·(π? π , β¦, π%(π)) on π = 1, β¦ ,π 2) guess a polynomial π π of degree at most ππ 3) check that π π = π·(π? π , β¦ ,π%(π)) by βpolynomial identity testingβ π(ππ) π V(π‘ + ππ + ππ) 4) multipoint evaluate π π on π = 1, β¦, π and return these values π V(ππ) π·β has size β€ π(π‘ + ππ) and depth β€ ππ
Co-Nondet. Algorithm for OV
5) ACCEPT if β π (π)
@ RL?
β₯ 1 1) compute polynomials π? π , β¦, π%(π) such that πK π = π¨R[π] by polynomial interpolation π V(ππ) new goal: evaluate univariate circuit π·β π = π·(π? π , β¦, π%(π)) on π = 1, β¦ ,π 2) guess a polynomial π π of degree at most ππ 3) check that π π = π·(π? π , β¦ ,π%(π)) by βpolynomial identity testingβ, if not: ACCEPT π(ππ) π V(π‘ + ππ + ππ) 4) multipoint evaluate π π on π = 1, β¦, π and return these values π V(ππ) π·β has size β€ π(π‘ + ππ) and depth β€ ππ use circuit π·(π) for testing orthogonality of π with any π β πΆ β {0,1}Β€ evaluate π·(π) at each π β π΅ π inputs, size π(ππ), degree β€ 2π π V(ππ) YES-instance: all paths accept NO-instance: at least one path rejects ...with high probability
Co-Nondet. Algorithm for OV
5) ACCEPT if β π (π)
@ RL?