CS 372: Computational Geometry Lecture 14 Geometric Approximation Algorithms

Similar documents
An efficient approximation for point-set diameter in higher dimensions

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

Give a geometric description of the set of points in space whose coordinates satisfy the given pair of equations.

Approximating the Minimum Closest Pair Distance and Nearest Neighbor Distances of Linearly Moving Points

Approximate Voronoi Diagrams

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

Geometric Optimization Problems over Sliding Windows

Proximity problems in high dimensions

An Algorithmist s Toolkit Nov. 10, Lecture 17

Clustering in High Dimensions. Mihai Bădoiu

CS Algorithms and Complexity

SDP Relaxations for MAXCUT

Algorithms for Streaming Data

MATH 31BH Homework 1 Solutions

Decouplings and applications

Algorithms for Picture Analysis. Lecture 07: Metrics. Axioms of a Metric

Lecture 18: March 15

Optimal compression of approximate Euclidean distances

Geometric optimization and sums of algebraic functions

Good Triangulations. Jean-Daniel Boissonnat DataShape, INRIA

Log1 Contest Round 2 Theta Geometry

2.13 Linearization and Differentials

ATHS FC Math Department Al Ain Revision worksheet

10.1 Three Dimensional Space

Ohio s State Tests ITEM RELEASE SPRING 2018 INTEGRATED MATHEMATICS II

Succinct Data Structures for Approximating Convex Functions with Applications

3. Which of these numbers does not belong to the set of solutions of the inequality 4

Topic Outline for Algebra 2 & and Trigonometry One Year Program

PCA with random noise. Van Ha Vu. Department of Mathematics Yale University

The Not-Formula Book for C2 Everything you need to know for Core 2 that won t be in the formula book Examination Board: AQA

Problem Set 2: Solutions Math 201A: Fall 2016

Motivating examples Introduction to algorithms Simplex algorithm. On a particular example General algorithm. Duality An application to game theory

Throughout these notes we assume V, W are finite dimensional inner product spaces over C.

Grothendieck s Inequality

Uniformly discrete forests with poor visibility

Exam in TMA4215 December 7th 2012

Solutions th AMC 12 A (E) Since $20 is 2000 cents, she pays (0.0145)(2000) = 29 cents per hour in local taxes.

More Approximation Algorithms

Computing the Gromov hyperbolicity of a discrete metric space

(x, y) = d(x, y) = x y.

Algorithms. Outline! Approximation Algorithms. The class APX. The intelligence behind the hardware. ! Based on

U.C. Berkeley CS294: Spectral Methods and Expanders Handout 11 Luca Trevisan February 29, 2016

Chapter 11. Approximation Algorithms. Slides by Kevin Wayne Pearson-Addison Wesley. All rights reserved.

1. The positive zero of y = x 2 + 2x 3/5 is, to the nearest tenth, equal to

Immerse Metric Space Homework

Some Background Material

This means that we can assume each list ) is

Duality of multiparameter Hardy spaces H p on spaces of homogeneous type

A note on the minimal volume of almost cubic parallelepipeds

Practice SAC. Unit 4 Further Mathematics: Geometry and Trigonometry Module

NYS Algebra II and Trigonometry Suggested Sequence of Units (P.I's within each unit are NOT in any suggested order)

Lecture 3. Econ August 12

Lecture: Examples of LP, SOCP and SDP

0, otherwise. Find each of the following limits, or explain that the limit does not exist.

x 1 x 2. x 1, x 2,..., x n R. x n

16.1 Min-Cut as an LP

which has a check digit of 9. This is consistent with the first nine digits of the ISBN, since

Introduction. Chapter 1. Contents. EECS 600 Function Space Methods in System Theory Lecture Notes J. Fessler 1.1

Topological properties of Z p and Q p and Euclidean models

2018 Best Student Exam Solutions Texas A&M High School Students Contest October 20, 2018

REQUIRED MATHEMATICAL SKILLS FOR ENTERING CADETS

1 + lim. n n+1. f(x) = x + 1, x 1. and we check that f is increasing, instead. Using the quotient rule, we easily find that. 1 (x + 1) 1 x (x + 1) 2 =

Improved Approximation Bounds for Planar Point Pattern Matching

Enumeration. Phong Nguyễn

The Ellipsoid Algorithm

GCSE Mathematics Specification (8300/2H)

Lecture Notes 1: Vector spaces

Summer Packet Pre-AP Algebra

Model Counting for Logical Theories

SOUTH AFRICAN TERTIARY MATHEMATICS OLYMPIAD

Chapter 2 Polynomial and Rational Functions

VISHAL BHARTI PUBLIC SCHOOL SUBJECT-MATHEMATICS CLASS-VI ASSIGNMENT-4 REVISION (SEPTEMBER)

arxiv:cs/ v1 [cs.cg] 7 Feb 2006

AFM Midterm Review I Fall Determine if the relation is a function. 1,6, 2. Determine the domain of the function. . x x

Chapter 1. Pigeonhole Principle

Review Topics. MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question.

CSE541 Class 22. Jeremy Buhler. November 22, Today: how to generalize some well-known approximation results

15.081J/6.251J Introduction to Mathematical Programming. Lecture 18: The Ellipsoid method

Mathematical Economics: Lecture 2

MAT 570 REAL ANALYSIS LECTURE NOTES. Contents. 1. Sets Functions Countability Axiom of choice Equivalence relations 9

Chapter 11. Approximation Algorithms. Slides by Kevin Wayne Pearson-Addison Wesley. All rights reserved.

1 The Knapsack Problem

SAMPLE EXAMINATION PAPER FORM 3

25 Minimum bandwidth: Approximation via volume respecting embeddings

DS-GA 1002 Lecture notes 0 Fall Linear Algebra. These notes provide a review of basic concepts in linear algebra.

Algebra II Summer Review To earn credit: Be sure to show all work in the area provided.

Analysis of Algorithms I: Perfect Hashing

Analysis-3 lecture schemes

Z Algorithmic Superpower Randomization October 15th, Lecture 12

Numerical Methods. King Saud University

Reporting Neighbors in High-Dimensional Euclidean Space

WS/FCS NC Math 3 Scope and Sequence Semester Block High School Refer to Unit Planning Organizers for Instructional Guidance

Physics 2210 Fall 2011 David Ailion FINAL EXAM. December 14, 2011

Approximate Clustering via Core-Sets

Class notes: Approximation

Algebra II Honors Final Exam Review

Lecture 17 - The Secrets we have Swept Under the Rug

Blitz, Regional 2015, Page 1

Finite Metric Spaces & Their Embeddings: Introduction and Basic Tools

Midterm 1 Review. Distance = (x 1 x 0 ) 2 + (y 1 y 0 ) 2.

Transcription:

CS 372: Computational Geometry Lecture 14 Geometric Approximation Algorithms Antoine Vigneron King Abdullah University of Science and Technology December 5, 2012 Antoine Vigneron (KAUST) CS 372 Lecture 14 December 5, 2012 1 / 46

1 Introduction 2 The diameter problem 3 A 2-approximation algorithm 4 Approximation scheme 5 Rounding to a grid Antoine Vigneron (KAUST) CS 372 Lecture 14 December 5, 2012 2 / 46

Outline Introduction to geometric approximation algorithms. Example: Computing the diameter of a point-set. Simple 2-approximation algorithm. Two approaches for ε-approximation: Rounding. Projection. References: Sariel Har Peled s book. Paper by T. Chan, Approximating the diameter, width, smallest enclosing cylinder, and minimum-width annulus, Section 2. Antoine Vigneron (KAUST) CS 372 Lecture 14 December 5, 2012 3 / 46

The Diameter Problem P Input: a set P of n points in R d. Antoine Vigneron (KAUST) CS 372 Lecture 14 December 5, 2012 4 / 46

The Diameter Problem a = a b P b Input: a set P of n points in R d. Output: the maximum distance between any two points of P. is called the diameter of P. Antoine Vigneron (KAUST) CS 372 Lecture 14 December 5, 2012 5 / 46

Brute Force Algorithm Computing the distance between two points: If a = (a 1, a 2,..., a d ) and b = (b 1, b 2,..., b d ), then ab = (b 1 a 1 ) 2 + (b 2 a 2 ) 2 + + (b d a d ) 2. It takes O(d) time. Here we assume that d is constant: d = O(1). We are in fixed dimension. Then we can compute ab in O(1) time. Computing the diameter: Brute force: Check all pairs in P 2 and keep the maximum distance. Brute force takes O(n 2 ) time. Antoine Vigneron (KAUST) CS 372 Lecture 14 December 5, 2012 6 / 46

Approximation Algorithms Definition (c-factor approximation) We say that is a c-factor approximation to if c. Definition (c-approximation algorithm) A c-approximation algorithm for a maximization problem is an algorithm that computes a c-factor approximation of the optimum in polynomial time. We will give a 2-approximation algorithm for the diameter problem. That is, we find 0 such that 0 2 0 O(n) time, very simple. Best known exact algorithms are slower and complicated. Antoine Vigneron (KAUST) CS 372 Lecture 14 December 5, 2012 7 / 46

2-Approximation Algorithm P a Pick a point a P. Antoine Vigneron (KAUST) CS 372 Lecture 14 December 5, 2012 8 / 46

2-Approximation Algorithm P b a Pick a point a P. Find b such that ab is maximum. 0 = ab. Antoine Vigneron (KAUST) CS 372 Lecture 14 December 5, 2012 9 / 46

Analysis Pick any point a P. O(1) time. Find b P such that ab is maximum. Just go through the list of points in P and keep the maximum distance to a. It takes O(n) time. Conclusion: This algorithm runs in O(n) time. Antoine Vigneron (KAUST) CS 372 Lecture 14 December 5, 2012 10 / 46

Proof of Correctness We need to prove that 0 is a 2-factor approximation. of. It means 0 2 0. Since (a, b) P 2, clearly, 0 = ab. We also need to prove that 2 0. Let a and b denote two points such that a b =. By definition of b we have aa ab and ab ab. By the triangle inequality = a b a a + ab ab + ab = 2 0. Antoine Vigneron (KAUST) CS 372 Lecture 14 December 5, 2012 11 / 46

Concluding Remark The running time is optimal. If we do not assume d = O(1): This algorithm still works. But the running time has to be written O(dn). It is still optimal as we need Θ(nd) time to read the input. Antoine Vigneron (KAUST) CS 372 Lecture 14 December 5, 2012 12 / 46

(1 + ε)-approximation Algorithms We just found a 2-approximation algorithm. We would like to obtain a better approximation. Let ε > 0 be a real number. In this lecture, we assume ε < 1. ε should be thought of as being small, say ε = 0.1 or ε = 0.01. We want to design a (1 + ε)-approximation algorithm. The result will be such that (1 + ε). In other words, the relative error we allow is ε. So ε = 0.01 means a 1% error. Antoine Vigneron (KAUST) CS 372 Lecture 14 December 5, 2012 13 / 46

Analysis How to analyze a (1 + ε)-approximation algorithm? The running time is expressed as a function of n and ε using O( ) notation. For instance, the last algorithm in this lecture runs in time. O ( n + (1/ε) 3 2 (d 1)) Since d = 0(1), it is polynomial in n and 1/ε. It is an FPTAS (Fully Polynomial Time Approximation Scheme). The running time is linear in n. Problem: exponential in d. These algorithms are only interesting in low dimension d. Antoine Vigneron (KAUST) CS 372 Lecture 14 December 5, 2012 14 / 46

Idea Start with a set P of n points. Transform it into a set P such that: The cardinality P is small. The diameter of P is a good approximation of. Then find by brute force Antoine Vigneron (KAUST) CS 372 Lecture 14 December 5, 2012 15 / 46

Rounding to a Grid P ɛ ɛ Consider a regular grid over R d. The side length of the grid is ɛ, to be specified later. Intuition: we will choose ɛ ɛ, it is the error we allow. Antoine Vigneron (KAUST) CS 372 Lecture 14 December 5, 2012 16 / 46

Rounding to a Grid P Replace each point of P with the nearest grid point. This operation is called rounding. Antoine Vigneron (KAUST) CS 372 Lecture 14 December 5, 2012 17 / 46

Rounding to a Grid P The grid points we obtain form the set P. Antoine Vigneron (KAUST) CS 372 Lecture 14 December 5, 2012 18 / 46

Rounding to a Grid c P d Compute the diameter of P by brute force. Antoine Vigneron (KAUST) CS 372 Lecture 14 December 5, 2012 19 / 46

Intuition P is a d-dimensional point set with diameter. The points are on a grid with side length ɛ ; we will choose it such that ɛ ɛ. So in the worst case, there are about as many points in P as in a (1/ɛ) (1/ɛ) (1/ɛ) grid in R d. There are O((1/ɛ) d ) such points. We can compute by brute force in time O((1/ɛ) 2d ). Antoine Vigneron (KAUST) CS 372 Lecture 14 December 5, 2012 20 / 46

How to Perform Rounding? The grid points have coordinates (k 1 ɛ, k 2 ɛ,... k d ɛ ) where each k i is an integer. Let p = (p 1, p 2,... p d ) P. How can we find the closest grid point p? We need to find the closest integer k i to p i /ɛ. It is given by the formula k i = pi ɛ + 1. 2 p is rounded to p = (k 1 ɛ, k 2 ɛ,... k d ɛ ). It takes O(d) = O(1) time. Antoine Vigneron (KAUST) CS 372 Lecture 14 December 5, 2012 21 / 46

Rounding Error Property Let x R d, and let x be the closest grid point to x. Then xx ɛ d/2. Proof: Apply previous slide formula. Intuition: x is in a hypercube centered at x with side length ɛ. ɛ d ɛ ɛ x x This hypercube diagonal has length ɛ d. Antoine Vigneron (KAUST) CS 372 Lecture 14 December 5, 2012 22 / 46

Approximation Factor Let a and b be the closest grid points to a and b, respectively. Then from previous slide, a a ɛ d/2 and b b ɛ d/2. By the triangle inequality, = a b a a + a b + b b a b + ɛ d + ɛ d. Antoine Vigneron (KAUST) CS 372 Lecture 14 December 5, 2012 23 / 46

Approximation Factor Let c and d be two points of P such that c d =. Let c and d be points of P that have been rounded to c and d, respectively. Then cc ɛ d/2 and dd ɛ d/2. So by the triangle inequality, = c d cd + ɛ d. Of course cd. It follows that + ɛ d Antoine Vigneron (KAUST) CS 372 Lecture 14 December 5, 2012 24 / 46

Approximation Factor We obtained ɛ d + ɛ d. We choose = ɛ d, so + 2ɛ d. We want to make sure that 2ɛ d ɛ /2. Since 0, it suffices that 2ɛ d ɛ 0 /2. So we first compute 0, and then we set ɛ = ɛ 0 /(4 d). It follows that + ɛ /2. Problem: We wanted to show that + ɛ. Antoine Vigneron (KAUST) CS 372 Lecture 14 December 5, 2012 25 / 46

Technical Difficulty Intuition: The relative error is less than ɛ, so it is OK. Proof: We want to prove that + ɛ. We know that + ɛ /2. Then 1 1 ɛ/2 = (1 + ɛ2 + ɛ24 + ɛ38 ) +.... Since ɛ < 1, we get ( ( 1 1 + ɛ 2 + 1 4 + 1 8 + 1 )) 16... = (1 + ɛ). So is a (1 + ɛ)-factor approximation of. Antoine Vigneron (KAUST) CS 372 Lecture 14 December 5, 2012 26 / 46

Cardinality of P 0 Antoine Vigneron (KAUST) CS 372 Lecture 14 December 5, 2012 27 / 46

Cardinality of P r r 0 + ɛ d/2 Antoine Vigneron (KAUST) CS 372 Lecture 14 December 5, 2012 28 / 46

Cardinality of P r B r 0 + ɛ d/2 + ɛ /2 Antoine Vigneron (KAUST) CS 372 Lecture 14 December 5, 2012 29 / 46

Cardinality of P All the points of P are in a sphere with radius 0. So all the points of P are in a sphere with radius 0 + ɛ d/2. To each point p P, we associate a ball b(p) centered at p with radius ɛ /2. These balls are disjoint and contained in a ball B with radius 0 + ɛ ( d/2 + 1/2) 2 0. Antoine Vigneron (KAUST) CS 372 Lecture 14 December 5, 2012 30 / 46

How Many Grid Points are There? The volume of a ball with radius r in dimension d is C d r d, where C d depends only on d. So the number of balls b(p), p P is at most C d (2 0 ) d ( 16 d ) d C d (ɛ /2) d = = O((1/ɛ) d ). ɛ Each point p P is in exactly one ball b(p). So P = O((1/ɛ) d ). Antoine Vigneron (KAUST) CS 372 Lecture 14 December 5, 2012 31 / 46

Summary Compute 0 in O(n) time. Round all the points to a grid with side length ɛ = ɛ 0 /(4 d). It takes O(n) time. There are O((1/ɛ) d ) such points. We denote by P the set of rounded points. Compute the diameter of P by brute force. It takes O((1/ɛ) 2d ) time. ɛ d is a (1 + ɛ)-factor approximation of the diameter of P. Running time: O(n + (1/ɛ) 2d ). Antoine Vigneron (KAUST) CS 372 Lecture 14 December 5, 2012 32 / 46

Grid Cleaning: Example in R 2 ˆb â P â is the lowest point on a vertical line ˆb is the highest point on a vertical line Antoine Vigneron (KAUST) CS 372 Lecture 14 December 5, 2012 33 / 46

Grid Cleaning: Example in R 2 ˆb â P Idea: keep only the highest and the lowest point on each vertical line. Then run the brute-force algorithm. Antoine Vigneron (KAUST) CS 372 Lecture 14 December 5, 2012 34 / 46

Analysis in R 2 Only O(1/ɛ) points remain after grid cleaning. So the algorithm runs in O(n + (1/ɛ) 2 ) time. In higher dimension, same idea. Consider all the points that coincide in their first (d 1) coordinates. Keep only highest and lowest. Then only O((1/ɛ) d 1 ) remain from P. So rounding + grid cleaning yields a running time O(n + (1/ɛ) 2d 2 ). Antoine Vigneron (KAUST) CS 372 Lecture 14 December 5, 2012 35 / 46

Projecting on Lines We measure angles in radian. That is, an angle is in [0, 2π]. Property For any α, 1 α2 2 cos α 1. Idea: We get a relative error ε by choosing α to be roughly ε. Antoine Vigneron (KAUST) CS 372 Lecture 14 December 5, 2012 36 / 46

Projecting on Lines b ɛ a a b l a b ab (1 + ε) a b Antoine Vigneron (KAUST) CS 372 Lecture 14 December 5, 2012 37 / 46

Projecting on Lines Assume that the angle between line ab and line l is at most ɛ. a (resp. b ) is the orthogonal projection of a (resp. b) into l. Then a b ab a b 1 1 ɛ/2 = a b (1 + ɛ2 + ɛ24 + ɛ88 ) +.... Since we assume that ɛ < 1, we obtain a b ab a b (1 + ɛ). In other words, a b is a (1 + ɛ) factor approximation of ab. Antoine Vigneron (KAUST) CS 372 Lecture 14 December 5, 2012 38 / 46

Idea P l obtained by projecting P onto a line l. P a l P l b Compute the diameter of P l. Can be done in O(n) time: Find maximum and minimum along l. Antoine Vigneron (KAUST) CS 372 Lecture 14 December 5, 2012 39 / 46

Idea If the angle between l and a b is less than ɛ, then the diameter of P l is a (1 + ɛ)-factor approximation of. How can we find a line that makes an angle ɛ with ab? Pick several lines. In the plane: Pick direction k ɛ for each k [0, π/ ɛ]. O( ɛ) cones with angular diameter ɛ Antoine Vigneron (KAUST) CS 372 Lecture 14 December 5, 2012 40 / 46

Algorithm in R 2 For any integer k [0, π/ ɛ], we denote by l k a line that makes angle k ɛ with horizontal. l k k ε Project P onto l k, obtaining P lk. The maximum of the diameter of P lk approximation of the diameter or P. over all k is a (1 + ɛ)-factor Antoine Vigneron (KAUST) CS 372 Lecture 14 December 5, 2012 41 / 46

Algorithm in R 2 : Analysis Projecting onto a particular l k takes O(n) time. Computing the diameter of P lk takes O(n) time. There are O(1/ ɛ) such lines. Overall running time O(n/ ɛ). Antoine Vigneron (KAUST) CS 372 Lecture 14 December 5, 2012 42 / 46

Algorithm in R 2 : Proof Let θ be the angle of a b with horizontal. There exists k such that k ɛ θ < (k + 1) ɛ. The angle between a b and l k is at most ɛ. So the diameter of P lk is at least /(1 + ɛ). So the output of the algorithm is at least /(1 + ɛ). On the other hand, the algorithm only looks at distances between two projected points, which are always smaller than. Antoine Vigneron (KAUST) CS 372 Lecture 14 December 5, 2012 43 / 46

Generalization in R d d S Antoine Vigneron (KAUST) CS 372 Lecture 14 December 5, 2012 44 / 46

Generalization in R d Problem: Find a set of directions that approximates well the whole set of directions. Reformulation: Let S be the unit sphere in R d. Find D S with small cardinality such that x S there is a point d D such that dx ɛ. A point d D is associated with the line through the origin and d. d handles a cone of direction with angular radius ɛ. Such a set D with cardinality O((1/ɛ) (d 1)/2 ) can be computed efficiently. So the algorithm runs in time O(n(1/ɛ) (d 1)/2 ). Antoine Vigneron (KAUST) CS 372 Lecture 14 December 5, 2012 45 / 46

Combining the two Techniques Running times: Grid + cleaning: O(n + (1/ɛ) 2d 2 ). Projections: O(n(1/ɛ) (d 1)/2 ). Approach: First round to P and do grid cleaning. We are left with O((1/ɛ) d 1 ) points. Project on lines. Overall running time: O(n + (1/ɛ) 3(d 1)/2 ) Technical problem: the approximation factor is now about 1 + 2ɛ. (how to solve it?) Antoine Vigneron (KAUST) CS 372 Lecture 14 December 5, 2012 46 / 46