Complexity Theory of Polynomial-Time Problems Lecture 6: 3SUM Part - - PowerPoint PPT Presentation
Complexity Theory of Polynomial-Time Problems Lecture 6: 3SUM Part - - PowerPoint PPT Presentation
Complexity Theory of Polynomial-Time Problems Lecture 6: 3SUM Part I Karl Bringmann 3SUM given sets ,, of integers are there , , such that + + = 0 ? (we assume that we can
3SUM
given sets π΅,πΆ,π· of π integers are there π β π΅, π β πΆ,π β π· such that π + π + π = 0? (we assume that we can add/subtract/compare input integers in constant time) trivial algorithm: π(π/) well-known: π(π1) Conjecture: no π π123 algorithm β 3SUM-Hardness
[Gajentaan,Overmarsβ95]
More Known Algorithms
trivial: π(π/) well-known: π(π1) using Word RAM bit-tricks: π(π1 β
789:; ; ), π(π1 β (789 789 <): 789:<
) no bit-tricks: π(π1 β
(789 789 <): 789 <
)
[Baran,Demaine,Patrascuβ05] [Gronlund,Pettieβ14]
we prove a simplified version: Thm: Without bit-tricks, 3SUM is in time π(π1 β
=87> 789 789 < 789 <
) using FFT: π(π + π polylogπ) for numbers in {βπ, β¦, π} (cell size π₯ = Ξ©(logπ), each number fits in a cell)
Equivalent Variants
given sets π΅,πΆ,π· of π integers are there π β π΅, π β πΆ,π β π· such that π + π + π = 0? 1) given a set π of π integers are there π¦, π§, π¨ β π such that π¦ + π§ + π¨ = 0? 4) given sets π΅,πΆ,π· of π integers and target π’ are there π β π΅, π β πΆ,π β π· such that π + π + π = π’? 3) given sets π΅,πΆ,π· of π integers are there π β π΅, π β πΆ,π β π· such that π + π = π? 2) replace π· by π β π’ π β π·} β π + π β π = 0 β π + π + (π β π’) = 0 replace π· by βπ π β π·} β: set π΅, πΆ, π· β π β: set π β π + 4π | π β π΅ βͺ πΆ βͺ {π β 4π | π β π·} where π΅,πΆ,π· β {βπ,. . , π}
Outline
1) algorithm for small universe 2) quadratic algorithm 3) small decision tree 4) logfactor improvement 5) some 3SUM-hardness results
Algorithm for Small Numbers
add π to each number, then numbers are in {0,. . , 2π} and π(π + π polylogπ) for numbers in {βπ, β¦, π} we want π β π΅, π β πΆ,π β π· such that π + π + π = 3π define polynomials π\ π¦ β β π¦^
^β\
and similarly π_ π¦ , π` π¦ have degree at most 2π compute π π¦ β π\ π¦ β π_ π¦ β π` π¦ = (β π¦^
^β\
)(β π¦b
bβ_
)(β π¦c
cβ`
) what is the coefficient of π¦/d in π(π¦)? use efficient polynomial multiplication (via Fast Fourier Transform): polynomials of degree π can be multiplied in time π(π polylogπ) (π¦^ β π¦b β π¦c = π¦^fbfc) it is the number of (π, π, π) summing to 3π
Outline
1) algorithm for small universe 2) quadratic algorithm 3) small decision tree 4) logfactor improvement 5) some 3SUM-hardness results
Quadratic Algorithm
given a set π΅ of π integers are there π, π, π β π΅ such that π + π + π = 0? sort π΅ in increasing order: π΅ = {πg,β¦ , π<} for each π β π΅: check whether there are π, π β π΅ s.t. π + π + π = 0 πg π1 π/ π< β¦ πg π1 π/ π< β¦ initialize π = π,π = 1 while π > 0 and π β€ π: if πm + π
n = βπ: return (πm, π n,π)
if πm + π
n > βπ: π β π β 1
if πm + π
n < βπ: π β π + 1
return βno solutionβ
Quadratic Algorithm
πg π1 π/ π< β¦ initialize π = π,π = 1 while π > 0 and π β€ π: return βno solutionβ given a set π΅ of π integers are there π, π, π β π΅ such that π + π + π = 0? sort π΅ in increasing order: π΅ = {πg,β¦ , π<} for each π β π΅: check whether there are π, π β π΅ s.t. π + π + π = 0 if πm + π
n = βπ: return (πm, π n,π)
if πm + π
n > βπ: π β π β 1
if πm + π
n < βπ: π β π + 1
πg π1 π/ π< β¦
Quadratic Algorithm
πg π1 π/ π< β¦ initialize π = π,π = 1 while π > 0 and π β€ π: return βno solutionβ given a set π΅ of π integers are there π, π, π β π΅ such that π + π + π = 0? sort π΅ in increasing order: π΅ = {πg,β¦ , π<} for each π β π΅: check whether there are π, π β π΅ s.t. π + π + π = 0 if πm + π
n = βπ: return (πm, π n,π)
if πm + π
n > βπ: π β π β 1
if πm + π
n < βπ: π β π + 1
πg π1 π/ π< β¦
Quadratic Algorithm
πg π1 π/ π< β¦ initialize π = π,π = 1 while π > 0 and π β€ π: return βno solutionβ given a set π΅ of π integers are there π, π, π β π΅ such that π + π + π = 0? sort π΅ in increasing order: π΅ = {πg,β¦ , π<} for each π β π΅: check whether there are π, π β π΅ s.t. π + π + π = 0 if πm + π
n = βπ: return (πm, π n,π)
if πm + π
n > βπ: π β π β 1
if πm + π
n < βπ: π β π + 1
πg π1 π/ π< β¦
Quadratic Algorithm
πg π1 π/ π< β¦ initialize π = π,π = 1 while π > 0 and π β€ π: return βno solutionβ given a set π΅ of π integers are there π, π, π β π΅ such that π + π + π = 0? sort π΅ in increasing order: π΅ = {πg,β¦ , π<} for each π β π΅: check whether there are π, π β π΅ s.t. π + π + π = 0 if πm + π
n = βπ: return (πm, π n,π)
if πm + π
n > βπ: π β π β 1
if πm + π
n < βπ: π β π + 1
πg π1 π/ π< β¦
Quadratic Algorithm
πg π1 π/ π< β¦ initialize π = π,π = 1 while π > 0 and π β€ π: return βno solutionβ given a set π΅ of π integers are there π, π, π β π΅ such that π + π + π = 0? sort π΅ in increasing order: π΅ = {πg,β¦ , π<} for each π β π΅: check whether there are π, π β π΅ s.t. π + π + π = 0 if πm + π
n = βπ: return (πm, π n,π)
if πm + π
n > βπ: π β π β 1
if πm + π
n < βπ: π β π + 1
πg π1 π/ π< β¦
Quadratic Algorithm
πg π1 π/ π< β¦ initialize π = π,π = 1 while π > 0 and π β€ π: return βno solutionβ given a set π΅ of π integers are there π, π, π β π΅ such that π + π + π = 0? sort π΅ in increasing order: π΅ = {πg,β¦ , π<} for each π β π΅: check whether there are π, π β π΅ s.t. π + π + π = 0 if πm + π
n = βπ: return (πm, π n,π)
if πm + π
n > βπ: π β π β 1
if πm + π
n < βπ: π β π + 1
πg π1 π/ π< β¦
Quadratic Algorithm
πg π1 π/ π< β¦ initialize π = π,π = 1 while π > 0 and π β€ π: return βno solutionβ given a set π΅ of π integers are there π, π, π β π΅ such that π + π + π = 0? sort π΅ in increasing order: π΅ = {πg,β¦ , π<} for each π β π΅: check whether there are π, π β π΅ s.t. π + π + π = 0 if πm + π
n = βπ: return (πm, π n,π)
if πm + π
n > βπ: π β π β 1
if πm + π
n < βπ: π β π + 1
πg π1 π/ π< β¦
Quadratic Algorithm
πg π1 π/ π< β¦ initialize π = π,π = 1 while π > 0 and π β€ π: return βno solutionβ given a set π΅ of π integers are there π, π, π β π΅ such that π + π + π = 0? sort π΅ in increasing order: π΅ = {πg,β¦ , π<} for each π β π΅: check whether there are π, π β π΅ s.t. π + π + π = 0 if πm + π
n = βπ: return (πm, π n,π)
if πm + π
n > βπ: π β π β 1
if πm + π
n < βπ: π β π + 1
πg π1 π/ π< β¦
Quadratic Algorithm
πg π1 π/ π< β¦ initialize π = π,π = 1 while π > 0 and π β€ π: return βno solutionβ time π(π) per π β π΅ time π(π1) overall given a set π΅ of π integers are there π, π, π β π΅ such that π + π + π = 0? sort π΅ in increasing order: π΅ = {πg,β¦ , π<} for each π β π΅: check whether there are π, π β π΅ s.t. π + π + π = 0 if πm + π
n = βπ: return (πm, π n,π)
if πm + π
n > βπ: π β π β 1
- therwise: π β π + 1
πg π1 π/ π< β¦
Outline
1) algorithm for small universe 2) quadratic algorithm 3) small decision tree 4) logfactor improvement 5) some 3SUM-hardness results
Decision Tree Complexity
Thm: 3SUM has a decision tree of depth π(π//1 logπ)
Decision Tree Complexity
where you have seen this: Thm: Any decision tree for Sorting π numbers has depth Ξ©(π logπ) Thm: Any comparison-based Sorting algorithm takes time Ξ©(πlog π) problem π on input π¦g,β¦, π¦< decision tree complexity of π = minimal depth of any decision tree for π Decision Tree: each inner node is a comparison: π¦m β€ π¦n more generally any linear combination: β π½m
m
π¦m β₯ 0 all instances reaching the same leaf have the same result π(π¦g,β¦ ,π¦<) π¦g β€ π¦1 π¦1 β€ π¦/ π¦g β€ π¦/
- utgoing edges are labeled 1/0 = true/false
1 1 β¦ β¦ β¦ 1 yields a lower bound for running time of any algorithm (that uses only comparisons, no bit-tricks)
Decision Tree Complexity
alternative interpretation: think of π¦g,β¦ ,π¦< as physical entities we may specify factors π½m we can perform experiments: the outcome of the experiment tells us whether β π½m
m
π¦m β₯ 0 experiments are very costly, computation is cheap what is the minimal number of experiments to decide π(π¦g,β¦ ,π¦<)?
βexperimentβ or βcostly comparisonβ
= decision tree complexity
Decision Tree Complexity
alternative interpretation II: RAM with two types of cells: special and standard input numbers π¦g,β¦ ,π¦< are stored in special cells special standard Stores: e.g. real number π(log π) bit number Operations: add, subtract, compare (result of comparison can be stored in standard cell) all standard arithmetic and logical operations and comparisons usual RAM cost model: each operations takes constant time decision tree cost model: comparisons of special numbers cost 1 all other operations are for free
Decision Tree Complexity
Thm: 3SUM has a decision tree of depth π(π//1 logπ) why study decision tree upper bounds? rules out quadratic lower bound in decision tree model
- ften small decision trees yield lower order improvements
Thm: Without bit-tricks, 3SUM is in time π(π1 β
=87> 789 789 < 789 <
)
Small Decision Tree
sort π΅ in increasing order partition π΅ into π/π groups: π΅g, β¦, π΅</u (all elements of π΅m are smaller than all elements of π΅mfg) sort πΈ β β π΅m β π΅m
</u mxg
= π β π βπ: π, π β π΅m} given a set π΅ of π integers, are there π, π, π β π΅ such that π + π + π = 0? write π΅m = {πm,g,β¦, πm,u} i.e., build a list π| containing all (π, π, π) with π β 1,β¦ , π/π , π, π β {1, β¦ ,π} sorted by πm,n β πm,~ ascendingly this preprocessing allows to compare any πm,n β πm,~ and πmβ’,nβ’ β πmβ’,~β’ without any costly comparisons Fredmanβs trick: πm,n + πmβ’,nβ’ β€ πm,~ + πmβ’,~β’ βΊ πmβ’,nβ’ β πmβ’,~β’ β€ πm,~ β πm,n so this preprocessing allows to compare any πm,n + πmβ’,nβ’ and πm,~ + πmβ’,~β’ without any costly comparisons: π πΈ log πΈ = π(ππ log(ππ)) comparisons π(π logπ) comparisons πm,n + πmβ’,nβ’ β€ πm,~ + πmβ’,~β’ βΊ (πβ’,πβ’,πβ’) appears before (π, π, π) in π| any numbers in π΅m,mβ’ β π΅m + π΅mβ’ = π + π π β π΅m, π β π΅mβ’}
Small Decision Tree
sort π΅ in increasing order for each π β π΅: check whether there are π, π β π΅ s.t. π + π + π = 0 π΅g π΅1 π΅</u β¦ π΅g π΅1 π΅</u β¦ initialize π = π/π,π = 1 while π > 0 and π β€ π/π: if βπ β π΅m,n: return βsolution foundβ if min π΅m + max (π΅
n) > βπ: π β π β 1
- therwise: π β π + 1
return βno solutionβ partition π΅ into π/π groups: π΅g, β¦, π΅</u (all elements of π΅m are smaller than all elements of π΅mfg) sort πΈ β β π΅m β π΅m
</u mxg
= π β π βπ: π, π β π΅m} given a set π΅ of π integers, are there π, π, π β π΅ such that π + π + π = 0? for all π, πβ’: sort π΅m,mβ’ β π΅m + π΅mβ’ = π + π π β π΅m, π β π΅mβ’} π πΈ log πΈ = π(ππ log(ππ)) comparisons π(π logπ) comparisons no comparisons!
Small Decision Tree
sort π΅ in increasing order for each π β π΅: check whether there are π, π β π΅ s.t. π + π + π = 0 π΅g π΅1 π΅</u β¦ π΅g π΅1 π΅</u β¦ initialize π = π/π,π = 1 while π > 0 and π β€ π/π: if βπ β π΅m,n: return βsolution foundβ if min π΅m + max (π΅
n) > βπ: π β π β 1
- therwise: π β π + 1
return βno solutionβ partition π΅ into π/π groups: π΅g, β¦, π΅</u (all elements of π΅m are smaller than all elements of π΅mfg) sort πΈ β β π΅m β π΅m
</u mxg
= π β π βπ: π, π β π΅m} given a set π΅ of π integers, are there π, π, π β π΅ such that π + π + π = 0? for all π, πβ’: sort π΅m,mβ’ β π΅m + π΅mβ’ = π + π π β π΅m, π β π΅mβ’} π πΈ log πΈ = π(ππ log(ππ)) comparisons π(π logπ) comparisons no comparisons!
Small Decision Tree
sort π΅ in increasing order for each π β π΅: check whether there are π, π β π΅ s.t. π + π + π = 0 π΅g π΅1 π΅</u β¦ π΅g π΅1 π΅</u β¦ initialize π = π/π,π = 1 while π > 0 and π β€ π/π: if βπ β π΅m,n: return βsolution foundβ if min π΅m + max (π΅
n) > βπ: π β π β 1
- therwise: π β π + 1
return βno solutionβ partition π΅ into π/π groups: π΅g, β¦, π΅</u (all elements of π΅m are smaller than all elements of π΅mfg) sort πΈ β β π΅m β π΅m
</u mxg
= π β π βπ: π, π β π΅m} given a set π΅ of π integers, are there π, π, π β π΅ such that π + π + π = 0? for all π, πβ’: sort π΅m,mβ’ β π΅m + π΅mβ’ = π + π π β π΅m, π β π΅mβ’} π πΈ log πΈ = π(ππ log(ππ)) comparisons π(π logπ) comparisons no comparisons!
Small Decision Tree
sort π΅ in increasing order for each π β π΅: check whether there are π, π β π΅ s.t. π + π + π = 0 initialize π = π/π,π = 1 while π > 0 and π β€ π/π: if βπ β π΅m,n: return βsolution foundβ if min π΅m + max (π΅
n) > βπ: π β π β 1
- therwise: π β π + 1
return βno solutionβ partition π΅ into π/π groups: π΅g, β¦, π΅</u (all elements of π΅m are smaller than all elements of π΅mfg) sort πΈ β β π΅m β π΅m
</u mxg
= π β π βπ: π, π β π΅m} given a set π΅ of π integers, are there π, π, π β π΅ such that π + π + π = 0? for all π, πβ’: sort π΅m,mβ’ β π΅m + π΅mβ’ = π + π π β π΅m, π β π΅mβ’} π πΈ log πΈ = π(ππ log(ππ)) comparisons π(π logπ) comparisons no comparisons! π π/π iterations π log(π1) = π(logπ) comparisons using binary search π iterations in total: π((ππ + π1/π)log π) comparisons = π(π//1 logπ) for π β π
Decision Tree Complexity
Thm: 3SUM has a decision tree of depth π(π//1 logπ) Thm: Without bit-tricks, 3SUM is in time π(π1 β
=87> 789 789 < 789 <
)
Outline
1) algorithm for small universe 2) quadratic algorithm 3) small decision tree 4) logfactor improvement 5) some 3SUM-hardness results
Converting Decision Tree to Algorithm
sort π΅ in increasing order for each π β π΅: check whether there are π, π β π΅ s.t. π + π + π = 0 initialize π = π/π,π = 1 while π > 0 and π β€ π/π: if βπ β π΅m,n: return βsolution foundβ if min π΅m + max (π΅
n) > βπ: π β π β 1
- therwise: π β π + 1
return βno solutionβ partition π΅ into π/π groups: π΅g, β¦, π΅</u (all elements of π΅m are smaller than all elements of π΅mfg) sort πΈ β β π΅m β π΅m
</u mxg
= π β π βπ: π, π β π΅m} given a set π΅ of π integers, are there π, π, π β π΅ such that π + π + π = 0? for all π, πβ’: sort π΅m,mβ’ β π΅m + π΅mβ’ = π + π π β π΅m, π β π΅mβ’} π πΈ log πΈ = π(ππ log(ππ)) comparisons and time π(π logπ) comparisons and time no comparisons! π( π/π 1 β π1 log(π1)) time π π/π iterations π log(π1) = π(logπ) comparisons and time using binary search π iterations in total: π(π1 log(π1)) time βΉ
Converting Decision Tree to Algorithm
for all π,πβ’: sort π©π,πβ’ β π©π + π©πβ’ = π + π π β π©π,π β π©πβ’} write π΅m = {πm,g,β¦, πm,u} make π΅m,mβ’ totally ordered: replace π΅m by πm,n β 2π 1 + π 1 β€ π β€ π} replace π΅mβ’ by πmβ’,n β 2π 1 + π β 2π 1 β€ π β€ π} then no π β π©π, π β π©πβ’ and πβ² β π©π, πβ² β π©πβ’ sum up to the same value simplification: and from the new π΅m + π΅mβ’ we can recover the old π΅m + π΅mβ’ implement this step faster!
Converting Decision Tree to Algorithm
for all π,πβ’: sort π©π,πβ’ β π©π + π©πβ’ = π + π π β π©π,π β π©πβ’} write π΅m = {πm,g,β¦, πm,u} consider any permutation π = πg,πg , π1,π1 ,β¦ , πu:,πu:
- f 1, . ., π Γ{1, β¦, π}
this is the correct sorted ordering of π΅m,mβ’ if and only if: π corresponds to this ordering of π΅m,mβ’: (πm,β’β’ + πmβ’,ββ’ πm,β’: + πmβ’,β: β¦ πm,β’β + πmβ’,ββ) πm,β’β + πmβ’,ββ < πm,β’βββ’ + πmβ’,ββββ’ for all 1 β€ π < π1 by Fredmanβs trick, this is equivalent to: πmβ’,ββ β πmβ’,ββββ’ < πm,β’βββ’ β πm,β’β for all 1 β€ π < π1 construct vectors: (πmβ’,ββ β πmβ’,ββββ’)gβ’~βu: (πm,β’βββ’ β πm,β’β)gβ’~βu: we say that vector π¦ dominates vector π§ if π¦m > π§m for all π
Dominance Reporting
Dominance Reporting problem: given sets π΅,πΆ of (integer-valued) vectors in βΛ, π΅ + πΆ = π report all pairs π β π΅, π β πΆ where π dominates π Thm: Dominance Reporting is in time π π logπ Λ + outputsize
Converting Decision Tree to Algorithm
for all π,πβ’: sort π©π,πβ’ β π©π + π©πβ’ = π + π π β π©π,π β π©πβ’} write π΅m = {πm,g,β¦, πm,u} for each permutation π = πg,πg , π1,π1 ,β¦ , πu:,πu:
- f 1, . ., π Γ{1, β¦, π}:
construct sets: (πmβ’,ββ β πmβ’,ββββ’)gβ’~βu: (πm,β’βββ’ β πm,β’β)gβ’~βu: π΅ = { πΆ = { | 1 β€ πβ’ β€ π/π } | 1 β€ π β€ π/π } solve Dominance Reporting on π΅,πΆ for each reported pair (π, πβ’): the sorted ordering of π΅m,mβ’ is given by π: (πm,β’β’ + πmβ’,ββ’ πm,β’: + πmβ’,β: β¦ πm,β’β + πmβ’,ββ) time for sorting all π΅m,mβ’: π π1 ! β (π/π)(logπ/π)u: + π/π 1
- ne vector
for each of π/π groups π1 ! iterations vectors have dimension π1 total
- utputsize
π/π 1 time π(π logπ Λ + outputsize)
Converting Decision Tree to Algorithm
for all π,πβ’: sort π©π,πβ’ β π©π + π©πβ’ = π + π π β π©π,π β π©πβ’} write π΅m = {πm,g,β¦, πm,u} for each permutation π = πg,πg , π1,π1 ,β¦ , πu:,πu:
- f 1, . ., π Γ{1, β¦, π}:
construct sets: (πmβ’,ββ β πmβ’,ββββ’)gβ’~βu: (πm,β’βββ’ β πm,β’β)gβ’~βu: π΅ = { πΆ = { | 1 β€ πβ’ β€ π/π } | 1 β€ π β€ π/π } solve Dominance Reporting on π΅,πΆ for each reported pair (π, πβ’): the sorted ordering of π΅m,mβ’ is given by π: (πm,β’β’ + πmβ’,ββ’ πm,β’: + πmβ’,β: β¦ πm,β’β + πmβ’,ββ) time for sorting all π΅m,mβ’: π π1 ! β (π/π)(logπ/π)u: + π/π 1 time π(π logπ Λ + outputsize) setting π β 0.1 β log π/ loglog π π1 ! β€ π1
u: β€ (logπ)u:β€ logπ ( . g 789 <)/789 789 < = π . g
(logπ/π)u:β€ logπ u: β€ π . g = π π/π 1
Converting Decision Tree to Algorithm
sort π΅ in increasing order for each π β π΅: check whether there are π, π β π΅ s.t. π + π + π = 0 initialize π = π/π,π = 1 while π > 0 and π β€ π/π: if βπ β π΅m,n: return βsolution foundβ if min π΅m + max (π΅
n) > βπ: π β π β 1
- therwise: π β π + 1
return βno solutionβ partition π΅ into π/π groups: π΅g, β¦, π΅</u (all elements of π΅m are smaller than all elements of π΅mfg) sort πΈ β β π΅m β π΅m
</u mxg
= π β π βπ: π, π β π΅m} given a set π΅ of π integers, are there π, π, π β π΅ such that π + π + π = 0? for all π, πβ’: sort π΅m,mβ’ β π΅m + π΅mβ’ = π + π π β π΅m, π β π΅mβ’} π πΈ log πΈ = π(ππ log(ππ)) comparisons and time π(π logπ) comparisons and time no comparisons! π( π/π 1 β π1 log(π1)) time π π/π iterations π log(π1) = π(logπ) comparisons and time using binary search π iterations in total: π(π1 log(π)/π) time for π β 0.1 β log π/ loglog π: π(π1 =87> 789 789 <
789 <
) time
Decision Tree Complexity
Thm: 3SUM has a decision tree of depth π(π//1 logπ) Thm: Without bit-tricks, 3SUM is in time π(π1 β
=87> 789 789 < 789 <
)
Dominance Reporting
Dominance Reporting problem: given sets π΅,πΆ of (integer-valued) vectors in βΛ, π΅ + πΆ = π report all pairs π β π΅, π β πΆ where π dominates π Thm: deciding whether there is a dominating pair (π, π) is OV-hard so we do not expect an π(poly π π123) algorithm OV is in time π(2Λπ) the theorem βgeneralizesβ this OV-algorithm to Dominance Reporting Dominance Reporting is in time π π logπ Λ + outputsize
Dominance Reporting
Dominance Reporting problem: given sets π΅,πΆ of (integer-valued) vectors in βΛ, π΅ + πΆ = π report all pairs π β π΅, π β πΆ where π dominates π if π = 0: report all pairs π΅ΓπΆ
- therwise:
find median π¦ of π-th coordinates of all points in π΅ βͺ πΆ - time π(π) assume all coordinates to be different π΅Β‘ β π β π΅ πΛ < π¦} and π΅Β’ β π΅\π΅Β‘ πΆΒ‘ β π β πΆ πΛ < π¦} and πΆΒ’ β πΆ\πΆ
Β‘
recursively solve π΅Β’, πΆΒ’ ,(π΅Β‘, πΆ
Β‘ ), and (π΅Β‘,πΆΒ’ )
remove π-th coordinates! πΛ π β€ 2πΛ π/2 + πΛ2g π + π Thm: Dominance Reporting is in time π π logπ Λ + outputsize
Dominance Reporting
πΛ π β€ 2πΛ π/2 + πΛ2g π + π π π = πΛ 1 = 0 Excluding cost of output: πΛ π β€ π log2π Λ β π Inductively prove that: πΛ π β€ 2 π 2 logπ Λ β π 2 + π log2π Λ2g β π + π = π (log2π) β 1 Λ + π (log2π)Λ2gβπ = π (log 2π)Λ 1 β 1/ log2π Λ + π (log2π)Λ2gβπ β€ π (log 2π)Λ 1 β 1/ log2π + π (log2π)Λ2gβπ = π (log 2π)Λ β π
Dominance Reporting
Dominance Reporting problem: given sets π΅,πΆ of (integer-valued) vectors in βΛ, π΅ + πΆ = π report all pairs π β π΅, π β πΆ where π dominates π Thm: Dominance Reporting is in time π π logπ Λ + outputsize Thm: Without bit-tricks, 3SUM is in time π(π1 β
=87> 789 789 < 789 <