Beruflich Dokumente
Kultur Dokumente
Lecture 4
Lower Bounds for Computational Geometry Problems
Antoine Vigneron
4 Discussion
5 3SUM-hardness
Two techniques:
Topological lower bound.
Reduction from 3-SUM.
References:
Textbook by Preparata and Shamos.
Dave Mount’s lecture notes, Lecture 26.
Ben-Or’s paper.
Gajentaan and Overmars paper.
Antoine Vigneron (KAUST) CS 372 Lecture 4 September 20, 2012 3 / 28
Introduction
Proof (sketch):
Model the algorithm as a binary decision tree.
Each internal node is a comparison, branching to its two children.
There are n! possible outcomes, i.e. permutation of the input.
Hence there are at least n! leaves.
So the tree has height Ω(log(n!)) = Ω(n log n).
In Lecture 2, we showed that it yields the same Ω(n log n) lower bound for
computing a convex hull.
Proof: After mapping a set of numbers to a parabola, the numbers
appear in sorted order along the convex hull.
So the argument holds because a convex hull algorithm outputs a
point sequence.
This argument does not work if the output has constant size.
Examples:
Intersection detection. (Output: a boolean.)
Diameter. (Output: a real number.)
We will give a different technique that yields an Ω(n log n) lower bound for
these two problems, and others.
Node v1 : fv1 := x3 − x1
Node v2 : fv2 := x4 − x2
Example (1)
Node v3 : fv1 ≥ 0?
< Given (x1 , x2 , x3 , x4 ) ∈ R4
≥
v4
such that x1 6 x2 and
fv2 ≥ 0? fv2 ≥ 0? v5
x3 6 x4 , this Algebraic
≥ < ≥ <
Computation Tree (ACT)
fv6 := x2 − x3 YES YES fv8 := x4 − x1
decides whether
[x1 , x2 ] ∩ [x3 , x4 ] 6= ∅.
fv6 ≥ 0? fv8 ≥ 0?
≥ < ≥
<
YES NO YES NO
Node v2 : fv2 := x6 − x2
YES NO
Informally:
Given an input x = (x1 , . . . , xn ) ∈ Rn , the program traverses a path
P(x) from the root to a leaf of T .
√
Along the path, it applies operations +, −, /, ×, · to input numbers
xi or intermediate results obtained at previous nodes along P(x).
It may also branch using a test >, >, =.
At the leaf, it outputs YES or NO.
Definition
Let T be an algebraic computation tree with input x ∈ Rn . Let W ⊂ Rn
be the set of points x ∈ Rn such that T outputs YES. We say that T
decides W .
W + = {(x1 , . . . , xn ) ∈ Rn | ∀i 6= j, xi 6= xj }.
Lemma
The set W + of positive instances of Element Distinctness has exactly n!
connected components.
Proof.
Done in class.
Theorem
In the algebraic computation tree model, the complexity of element
distinctness is Θ(n log n).
Proof.
By Ben-Or’s theorem, since W + has n! connected components, any ACT
solving the element distinctness problem has height Ω(log(n!) − n), which
is Ω(n log n).
Conversely, there is an ACT with depth O(n log n) that solves element
distinctness: First it sorts the input, then checks consecutive values. For
instance, mergesort can be unfolded into a Θ(n log n)-depth ACT.
W − = Rn \ W + .
Theorem
Any ACT that solves the line segment intersection detection problem has
height Ω(n log n). Hence, the complexity of line segment intersection
detection is Θ(n log n) in the ACT model.
Proof.
Suppose T is an ACT that solves the line segment intersection detection
problem. Let (x1 , . . . , xn ) ∈ Rn . We construct an ACT T 0 by plugging
(x1 , 0, x1 , 1, x2 , 0, x2 , 1, . . . , xn , 0, xn , 1) to the input of T . That is, T 0
detects intersection between the segments [(xi , 0), (xi , 1)]. So T 0 solves
the element distinctness problem. Thus height(T 0 ) = Ω(n log n). But by
construction, height(T 0 ) = height(T ) + 4n. Therefore
height(T ) = Ω(n log n).
Theorem
Any ACT that solves the set disjointness problem has height Ω(n log n).
Proof?
Done in class.
Note: The numbers a1 , . . . , an are not necessarily distinct, so a direct
reduction to Element Distinctness fails.
P
diam(P )
Example:
INPUT: 0.5, 2, 5, 4.5, -1
OUTPUT: 2.5
−1 0.5 2 4.5 5
0
Maxgap
y y = ai x
1
pi
y = bj x
Given an instance A, B of set
disjointness, we map A to the
O 1 right side and B to the left
x side of the unit circle,
respectively.
p0j
1
pi
p0j
Proof.
An instance of set disjointness is mapped to the unit circle as follows:
Each ai is mapped to the point pi = (xi , yi ) such that yi = ai xi ,
xi > 0, and xi2 + yi2 = 1.
Each bj is mapped to the point pj0 = (xj0 , yj0 ) such that yj = bj xj ,
xj < 0, and xj2 + yj2 = 1.
Then the diameter of {p1 , . . . , pn , p10 , . . . , pn0 } is 2 iff pi = −pj0 for some
i, j, which means that ai = bj and hence A ∩ B 6= ∅.
Remark: it is crucial in this argument that the coordinates of pi and pi0 can
be computed in constant time by an ACT.
Antoine Vigneron (KAUST) CS 372 Lecture 4 September 20, 2012 22 / 28
Maximum Gap
Theorem
In the ACT model, the maximum gap problem has complexity Θ(n log n).
Proof?
It would seem that the ACT model is not powerful enough, as the lower
bound for maxgap can be broken using the floor function.
However, it is not reasonable to allow the use of the floor function:
It has been proved that the floor function together with +, −, ×, /
allows to solve NP-hard problems in polynomial time.
(Schönhage, On the power of random access machines, ICALP 79.)
Ben-Or’s theorem often gives Ω(n log n) lower bounds for geometric
problems.
Optimal for several fundamental problems. (Intersection detection,
2D-diameter...)
But it often gives the same bound in cases where no near-linear time
algorithm is known.
I Example: 4D diameter, Hopcroft’s problem.
I Does not always give Ω(n log n): it gives Ω(n2 ) for knapsack. But this
problem is NP-hard.
Problem (3SUM)
Given a set S of n real numbers, is there a triple a, b, c ∈ S such that
a + b + c = 0?
Definition (3SUM-hard)
A problem is 3SUM-hard if an o(n2 )-time algorithm for this problem
implies an o(n2 )-time algorithm for 3SUM.
We give an example in the next slide. Other examples can be found in the
paper by Gajentaan and Overmars, for instance.
Theorem
2D degeneracy-testing is 3SUM-hard.
Proof.
Based on the following fact:
For any three distinct numbers a, b, c,
a + b + c = 0 iff the points (a, a3 ), (b, b 3 ), (c, c 3 ) are collinear.