CS 372: Computational Geometry Lecture 4 Lower Bounds for Computational Geometry Problems

Similar documents
DRAFT. Algebraic computation models. Chapter 14

Limitations of Algorithm Power

Lecture 21: Algebraic Computation Models

CS 577 Introduction to Algorithms: Strassen s Algorithm and the Master Theorem

Geometric Steiner Trees

CS 372: Computational Geometry Lecture 14 Geometric Approximation Algorithms

Randomized Sorting Algorithms Quick sort can be converted to a randomized algorithm by picking the pivot element randomly. In this case we can show th

Data selection. Lower complexity bound for sorting

P, NP, NP-Complete, and NPhard

Lecture 4 : Quest for Structure in Counting Problems

Computer Science 385 Analysis of Algorithms Siena College Spring Topic Notes: Limitations of Algorithms

Lecture 17: Trees and Merge Sort 10:00 AM, Oct 15, 2018

Analysis of Algorithms I: Asymptotic Notation, Induction, and MergeSort

1 Primals and Duals: Zero Sum Games

Algorithms 6.5 REDUCTIONS. designing algorithms establishing lower bounds classifying problems intractability

Design and Analysis of Algorithms

A Decidable Class of Planar Linear Hybrid Systems

Polynomial-time Reductions

an efficient procedure for the decision problem. We illustrate this phenomenon for the Satisfiability problem.

More NP-Complete Problems

Sorting Algorithms. We have already seen: Selection-sort Insertion-sort Heap-sort. We will see: Bubble-sort Merge-sort Quick-sort

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

NP-Complete Problems. More reductions

Lecture 4: NP and computational intractability

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

Data Structures and Algorithms

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

CS 5114: Theory of Algorithms

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

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

Notes for Lecture 21

BBM402-Lecture 11: The Class NP

NP-Hardness reductions

Essential facts about NP-completeness:

Physical Mapping. Restriction Mapping. Lecture 12. A physical map of a DNA tells the location of precisely defined sequences along the molecule.

CS151 Complexity Theory. Lecture 6 April 19, 2017

Lecture 18: P & NP. Revised, May 1, CLRS, pp

ON THE APPROXIMABILITY OF

Part V. Intractable Problems

Theory of Computation Chapter 9

Easy Problems vs. Hard Problems. CSE 421 Introduction to Algorithms Winter Is P a good definition of efficient? The class P

NP-Complete Reductions 2

arxiv: v2 [cs.ds] 3 Oct 2017

CS 301: Complexity of Algorithms (Term I 2008) Alex Tiskin Harald Räcke. Hamiltonian Cycle. 8.5 Sequencing Problems. Directed Hamiltonian Cycle

b + O(n d ) where a 1, b > 1, then O(n d log n) if a = b d d ) if a < b d O(n log b a ) if a > b d

Reliable and Efficient Geometric Computation p.1/27

1. Introduction Recap

ALGEBRA II CURRICULUM MAP

conp = { L L NP } (1) This problem is essentially the same as SAT because a formula is not satisfiable if and only if its negation is a tautology.

Lecture 15 - NP Completeness 1

Lecture 22: Counting

CS 350 Algorithms and Complexity

CS 350 Algorithms and Complexity

A Nonlinear Lower Bound on Linear Search Tree Programs for Solving Knapsack Problems*

Computational Complexity of Bayesian Networks

On improving matchings in trees, via bounded-length augmentations 1

Analysis of Algorithms - Using Asymptotic Bounds -

CS21 Decidability and Tractability

Lecture 3: Voronoi Diagrams & VCP Preliminaries July 24, 2013

COMP Analysis of Algorithms & Data Structures

Geometric optimization and sums of algebraic functions

NP-Complete Reductions 1

Computational Models Lecture 8 1

CS6901: review of Theory of Computation and Algorithms

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

Algorithms and Complexity Theory. Chapter 8: Introduction to Complexity. Computer Science - Durban - September 2005

Section 1.6. Functions

The Complexity of Computing the Sign of the Tutte Polynomial

Approximate Map Labeling. is in (n log n) Frank Wagner* B 93{18. December Abstract

CMPSCI 311: Introduction to Algorithms Second Midterm Exam

CS Data Structures and Algorithm Analysis

NP-Completeness. Subhash Suri. May 15, 2018

Problems for Putnam Training

15.081J/6.251J Introduction to Mathematical Programming. Lecture 24: Discrete Optimization

NP-Completeness. Andreas Klappenecker. [based on slides by Prof. Welch]

Graduate Algorithms CS F-21 NP & Approximation Algorithms

Design and Analysis of Algorithms

CS6840: Advanced Complexity Theory Mar 29, Lecturer: Jayalal Sarma M.N. Scribe: Dinesh K.

Lower Bounds for Dynamic Connectivity (2004; Pǎtraşcu, Demaine)

Comp487/587 - Boolean Formulas

2.2 Asymptotic Order of Growth. definitions and notation (2.2) examples (2.4) properties (2.2)

Polynomial-time reductions. We have seen several reductions:

Tree Decompositions and Tree-Width

4. How to prove a problem is NPC

Name (NetID): (1 Point)

Graph Theory and Optimization Computational Complexity (in brief)

Lecture 15: A Brief Look at PCP

Chapter 5 The Witness Reduction Technique

CS1802 Week 11: Algorithms, Sums, Series, Induction

BBM402-Lecture 20: LP Duality

NP Completeness and Approximation Algorithms

Computational Models Lecture 8 1

15.083J/6.859J Integer Optimization. Lecture 2: Efficient Algorithms and Computational Complexity

CS 6820 Fall 2014 Lectures, October 3-20, 2014

Complexity Theory Part I

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

Combinatorial Optimization

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

Data Structures in Java

Undecidable Problems. Z. Sawa (TU Ostrava) Introd. to Theoretical Computer Science May 12, / 65

Transcription:

CS 372: Computational Geometry Lecture 4 Lower Bounds for Computational Geometry Problems Antoine Vigneron King Abdullah University of Science and Technology September 20, 2012 Antoine Vigneron (KAUST) CS 372 Lecture 4 September 20, 2012 1 / 28

1 Introduction 2 Algebraic computation trees 3 Topological lower bound 4 Discussion 5 3SUM-hardness Antoine Vigneron (KAUST) CS 372 Lecture 4 September 20, 2012 2 / 28

Outline Hardness results for some geometric problems. Examples: Line segment intersection detection. Diameter of a point-set. Degeneracy testing. 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 In the algorithms course (CS 260), you saw that: Theorem (Lower bound for sorting) Any comparison-based sorting algorithm makes Ω(n log n) comparisons in the worst case. 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). Antoine Vigneron (KAUST) CS 372 Lecture 4 September 20, 2012 4 / 28

Introduction 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. Antoine Vigneron (KAUST) CS 372 Lecture 4 September 20, 2012 5 / 28

Algebraic Computation Trees Node v 1 : f v1 := x 3 x 1 Node v 2 : f v2 := x 4 x 2 Node v 3 : f v1 0? < v 4 f v2 0? f v2 0? v 5 < < f v6 := x 2 x 3 YES YES f v8 := x 4 x 1 f v6 0? f v8 0? < < YES NO YES NO Example (1) Given (x 1, x 2, x 3, x 4 ) R 4 such that x 1 x 2 and x 3 x 4, this Algebraic Computation Tree (ACT) decides whether [x 1, x 2 ] [x 3, x 4 ]. Antoine Vigneron (KAUST) CS 372 Lecture 4 September 20, 2012 6 / 28

Algebraic Computation Trees Node v 1 : f v1 := x 3 x 1 Node v 2 : f v2 := x 6 x 2 Node v 3 : f v3 := f v1 f v2 Node v 4 : Node v 5 : Node v 6 : Node v 7 : Node v 8 : f v4 := x 5 x 1 f v5 := x 4 x 2 f v6 f v7 := f v4 f v5 := f v3 f v6 f v7 > 0? Example (CCW predicate) Given (x 1, x 2, x 3, x 4, x 5, x 6 ) R 6, this ACT decides whether the triangle ((x 1, x 2 ), (x 3, x 4 ), (x 5, x 6 )) is counterclockwise. YES NO Antoine Vigneron (KAUST) CS 372 Lecture 4 September 20, 2012 7 / 28

Algebraic Computation Trees Formal definition from Ben-Or s paper: Definition (Algebraic computation tree) An algebraic computation tree with input (x 1,..., x n ) R n is a binary tree T with a function that assigns: to any vertex v with exactly one child an operational instruction of the form f v := fv 1 fv 2 or f v := c fv 1 or f v := fv 1 where fv i = f vi for an ancestor v i of v, or fv i {x 1,..., x n }, {+,,, /}, and c R is a constant. to any vertex v with two children (branching vertex) a test instruction of the form fv 1 > 0 or fv 1 0 or fv 1 = 0. where f 1 v is f v1 for an ancestor v 1 of v, or f 1 v {x 1,..., x n }. to any leaf an output YES or NO. Antoine Vigneron (KAUST) CS 372 Lecture 4 September 20, 2012 8 / 28

Algebraic Computation Trees Informally: Given an input x = (x 1,..., x n ) R n, the program traverses a path P(x) from the root to a leaf of T. Along the path, it applies operations +,, /,, to input numbers x i 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 R n. Let W R n be the set of points x R n such that T outputs YES. We say that T decides W. Antoine Vigneron (KAUST) CS 372 Lecture 4 September 20, 2012 9 / 28

Topological Lower Bound Theorem (Ben-Or, 1983) Any algebraic computation tree that decides a set W R n has height Ω(log(#W ) n), where #W is the number of connected components of W. Interpretation: The height of an ACT is its worst-case running time. A program can often be unfolded onto an ACT. Then its worst-case running time is at least the height of the ACT. But some operations cannot be simulated by an ACT in O(1) time. Examples: The floor function. Bitwise operations on integers (AND, OR, XOR). Random number generation. Antoine Vigneron (KAUST) CS 372 Lecture 4 September 20, 2012 10 / 28

Element Distinctness Problem (Element Distinctness) Determine whether the elements of a list of numbers are distinct. That is, given (x 1,..., x n ) R n, determine whether x i x j for all i j. Let W + denote the set of positive instances of Element Distinctness: W + = {(x 1,..., x n ) R n i j, x i x j }. Note that an instance of Element Distinctness is modeled as a single point in R n. Hence W + is a subset of R n. How many connected components are there in W +? Antoine Vigneron (KAUST) CS 372 Lecture 4 September 20, 2012 11 / 28

Element Distinctness Lemma The set W + of positive instances of Element Distinctness has exactly n! connected components. Proof. Done in class. Antoine Vigneron (KAUST) CS 372 Lecture 4 September 20, 2012 12 / 28

Element Distinctness 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. Antoine Vigneron (KAUST) CS 372 Lecture 4 September 20, 2012 13 / 28

Element Distinctness Let W denote the set of negative instances of Element Distinctness: W = R n \ W +. How many connected components are there in W? Antoine Vigneron (KAUST) CS 372 Lecture 4 September 20, 2012 14 / 28

Application: Line Segment Intersection Detection 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 (x 1,..., x n ) R n. We construct an ACT T by plugging (x 1, 0, x 1, 1, x 2, 0, x 2, 1,..., x n, 0, x n, 1) to the input of T. That is, T detects intersection between the segments [(x i, 0), (x i, 1)]. So T solves the element distinctness problem. Thus height(t ) = Ω(n log n). But by construction, height(t ) = height(t ) + 4n. Therefore height(t ) = Ω(n log n). Antoine Vigneron (KAUST) CS 372 Lecture 4 September 20, 2012 15 / 28

Set Disjointness Problem (Set Disjointness) Given two sequences (a 1,..., a n ) R and (b 1,..., b m ) R such that m n, determine whether there exists a pair i, j such that a i = b j. Theorem Any ACT that solves the set disjointness problem has height Ω(n log n). Proof? Done in class. Note: The numbers a 1,..., a n are not necessarily distinct, so a direct reduction to Element Distinctness fails. Antoine Vigneron (KAUST) CS 372 Lecture 4 September 20, 2012 16 / 28

Diameter P diam(p ) Problem (Diameter of a Point-Set) The diameter diam(p) of a set P = {p 1,..., p n } of n points is the maximum distance between any two points: diam(p) = max d(p i, p j ). i,j Antoine Vigneron (KAUST) CS 372 Lecture 4 September 20, 2012 17 / 28

Maximum Gap Problem (maximum gap) Given a set of n (unsorted) numbers, the maximum gap problem is to find the largest gap between two consecutive numbers in sorted order. Example: INPUT: 0.5, 2, 5, 4.5, -1 OUTPUT: 2.5 1 0.5 2 4.5 5 0 Maxgap Antoine Vigneron (KAUST) CS 372 Lecture 4 September 20, 2012 18 / 28

Optimization Algorithms The ACT model deals with decision problems: problems with a YES-NO answer. We will abuse notation and use ACTs for optimization problems: The 2D-diameter problem. Maximum gap. In fact, our lower bound argument will be for the associated decision problems: For some δ R, Is the diameter at least δ? Is the maximum gap at most δ? An optimization problem is at least as hard as the corresponding decision problem, because once you have the optimal value, you can compare it with δ in O(1) time. So a lower bound on the decision problem implies a lower bound on the optimization problem. Antoine Vigneron (KAUST) CS 372 Lecture 4 September 20, 2012 19 / 28

Diameter p j O y 1 y = a i x p i y = b j x 1 x Given an instance A, B of set disjointness, we map A to the right side and B to the left side of the unit circle, respectively. Antoine Vigneron (KAUST) CS 372 Lecture 4 September 20, 2012 20 / 28

Diameter y 1 p i O 1 x The diameter is 2 iff two points p i, p j are diametrically opposed, that is a i = b j. p j Antoine Vigneron (KAUST) CS 372 Lecture 4 September 20, 2012 21 / 28

Diameter Theorem In the ACT model, the complexity of the 2D-diameter problem is Ω(n log n). Proof. An instance of set disjointness is mapped to the unit circle as follows: Each a i is mapped to the point p i = (x i, y i ) such that y i = a i x i, x i > 0, and xi 2 + yi 2 = 1. Each b j is mapped to the point p j = (x j, y j ) such that y j = b j x j, x j < 0, and xj 2 + yj 2 = 1. Then the diameter of {p 1,..., p n, p 1,..., p n} is 2 iff p i = p j for some i, j, which means that a i = b j and hence A B. Remark: it is crucial in this argument that the coordinates of p i and p i 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? Problem: there is a simple O(n)-time algorithm. This linear-time algorithm uses the floor-function, hence it cannot be translated into an ACT. Antoine Vigneron (KAUST) CS 372 Lecture 4 September 20, 2012 23 / 28

Discussion 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.) In fact, the ACT model is very powerful: It allows exact computation in constant time per arithmetic operation. Even with high degree polynomials, or square roots. Antoine Vigneron (KAUST) CS 372 Lecture 4 September 20, 2012 24 / 28

Discussion 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. Example: 4D diameter, Hopcroft s problem. Does not always give Ω(n log n): it gives Ω(n 2 ) for knapsack. But this problem is NP-hard. Another approach: show that your problem is harder than some well-known problem, for which no near-linear time algorithm is known. 3-SUM. Best algorithm runs in O(n 2 ). (See following slides.) Hopcroft s problem. Best algorithm runs in roughly O(n 4/3 ). Antoine Vigneron (KAUST) CS 372 Lecture 4 September 20, 2012 25 / 28

3SUM Problem (3SUM) Given a set S of n real numbers, is there a triple a, b, c S such that a + b + c = 0? 3SUM can be solved in O(n 2 ) time. (How?) There is an Ω(n log n) lower bound in the ACT model. (How?) Despite a lot of effort, no better bound is known with usual models of computation. Hence, if we can argue that a problem is harder than 3SUM, it means that an o(n 2 )-time algorithm is currently out of reach. Antoine Vigneron (KAUST) CS 372 Lecture 4 September 20, 2012 26 / 28

3SUM-Hardness Definition (3SUM-hard) A problem is 3SUM-hard if an o(n 2 )-time algorithm for this problem implies an o(n 2 )-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. Antoine Vigneron (KAUST) CS 372 Lecture 4 September 20, 2012 27 / 28

3SUM-Hardness Problem (2D degeneracy-testing) Given a set P of n points in the plane, the 2D degeneracy-testing problem is to decide whether there are three collinear points in P. 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, a 3 ), (b, b 3 ), (c, c 3 ) are collinear. Antoine Vigneron (KAUST) CS 372 Lecture 4 September 20, 2012 28 / 28