A Survey of 3sum-Hard Problems

Similar documents
A Note on Maximum Independent Sets in Rectangle Intersection Graphs

Solving Geometric Problems with the Rotating Calipers *

ON THE COMPLEXITY OF THE GAME OF SET.

Arrangements And Duality

Computational Geometry. Lecture 1: Introduction and Convex Hulls

Shortest Inspection-Path. Queries in Simple Polygons

Questions. Strategies August/September Number Theory. What is meant by a number being evenly divisible by another number?

Shortcut sets for plane Euclidean networks (Extended abstract) 1

Content. Chapter 4 Functions Basic concepts on real functions 62. Credits 11

Kapitel 1 Multiplication of Long Integers (Faster than Long Multiplication)

Geometric Transformations

Math 4310 Handout - Quotient Vector Spaces

Binary Space Partitions

Figure 1.1 Vector A and Vector F

Data Structures for Moving Objects

Investigating Area Under a Curve

Shortest Path Algorithms

Largest Fixed-Aspect, Axis-Aligned Rectangle

Notes on Factoring. MA 206 Kurt Bryan

1 if 1 x 0 1 if 0 x 1

CSE373: Data Structures and Algorithms Lecture 3: Math Review; Algorithm Analysis. Linda Shapiro Winter 2015

Catalan Numbers. Thomas A. Dowling, Department of Mathematics, Ohio State Uni- versity.

Removing Even Crossings

Student Performance Q&A:

Common Core Unit Summary Grades 6 to 8

Triangulation by Ear Clipping

NEW YORK STATE TEACHER CERTIFICATION EXAMINATIONS

Mathematics (MAT) MAT 061 Basic Euclidean Geometry 3 Hours. MAT 051 Pre-Algebra 4 Hours

Mathematical Induction. Mary Barnes Sue Gordon

096 Professional Readiness Examination (Mathematics)

How To Prove The Dirichlet Unit Theorem

Pre-Algebra Academic Content Standards Grade Eight Ohio. Number, Number Sense and Operations Standard. Number and Number Systems

MATH 4330/5330, Fourier Analysis Section 11, The Discrete Fourier Transform

Algebra Unpacked Content For the new Common Core standards that will be effective in all North Carolina schools in the school year.

Chapter 6. Cuboids. and. vol(conv(p ))

The program also provides supplemental modules on topics in geometry and probability and statistics.

Higher Education Math Placement

1 VECTOR SPACES AND SUBSPACES

13.4 THE CROSS PRODUCT

Geometry Course Summary Department: Math. Semester 1

Information Theory and Coding Prof. S. N. Merchant Department of Electrical Engineering Indian Institute of Technology, Bombay

Minnesota Academic Standards

Mathematics Course 111: Algebra I Part IV: Vector Spaces

Essential Mathematics for Computer Graphics fast

Fast Sequential Summation Algorithms Using Augmented Data Structures

Offline sorting buffers on Line

Lecture 15 An Arithmetic Circuit Lowerbound and Flows in Graphs

Data Warehousing und Data Mining

The Ideal Class Group

3. Mathematical Induction

Short Programs for functions on Curves

So let us begin our quest to find the holy grail of real analysis.

3. Interpolation. Closing the Gaps of Discretization... Beyond Polynomials

CSC 180 H1F Algorithm Runtime Analysis Lecture Notes Fall 2015

Everyday Mathematics. Grade 4 Grade-Level Goals CCSS EDITION. Content Strand: Number and Numeration. Program Goal Content Thread Grade-Level Goal

MATHEMATICAL INDUCTION. Mathematical Induction. This is a powerful method to prove properties of positive integers.

Tennessee Mathematics Standards Implementation. Grade Six Mathematics. Standard 1 Mathematical Processes

Persistent Data Structures

(b)using the left hand end points of the subintervals ( lower sums ) we get the aprroximation

The Union-Find Problem Kruskal s algorithm for finding an MST presented us with a problem in data-structure design. As we looked at each edge,

The number of generalized balanced lines

Number Sense and Operations

North Carolina Math 2

Everyday Mathematics CCSS EDITION CCSS EDITION. Content Strand: Number and Numeration

Everyday Mathematics. Grade 4 Grade-Level Goals. 3rd Edition. Content Strand: Number and Numeration. Program Goal Content Thread Grade-Level Goals

Algebra Academic Content Standards Grade Eight and Grade Nine Ohio. Grade Eight. Number, Number Sense and Operations Standard

Algebra 2 Chapter 1 Vocabulary. identity - A statement that equates two equivalent expressions.

Everyday Mathematics GOALS

Thnkwell s Homeschool Precalculus Course Lesson Plan: 36 weeks

The Prime Numbers. Definition. A prime number is a positive integer with exactly two positive divisors.

! Solve problem to optimality. ! Solve problem in poly-time. ! Solve arbitrary instances of the problem. !-approximation algorithm.

Understanding Basic Calculus

Chapter 9. Systems of Linear Equations

of surface, , , of triangle, 548 Associative Property of addition, 12, 331 of multiplication, 18, 433

Vector storage and access; algorithms in GIS. This is lecture 6

GRADES 7, 8, AND 9 BIG IDEAS

Mathematics Review for MS Finance Students

A Turán Type Problem Concerning the Powers of the Degrees of a Graph

God created the integers and the rest is the work of man. (Leopold Kronecker, in an after-dinner speech at a conference, Berlin, 1886)

MATH10212 Linear Algebra. Systems of Linear Equations. Definition. An n-dimensional vector is a row or a column of n numbers (or letters): a 1.

Definition Given a graph G on n vertices, we define the following quantities:

Rotation Rate of a Trajectory of an Algebraic Vector Field Around an Algebraic Curve

Chapter 3. Cartesian Products and Relations. 3.1 Cartesian Products

Mathematical Conventions. for the Quantitative Reasoning Measure of the GRE revised General Test

Scope and Sequence KA KB 1A 1B 2A 2B 3A 3B 4A 4B 5A 5B 6A 6B

Creating, Solving, and Graphing Systems of Linear Equations and Linear Inequalities

KEANSBURG SCHOOL DISTRICT KEANSBURG HIGH SCHOOL Mathematics Department. HSPA 10 Curriculum. September 2007

Mathematical Methods of Engineering Analysis

INTERSECTION OF LINE-SEGMENTS

MA 323 Geometric Modelling Course Notes: Day 02 Model Construction Problem

Geometry of Vectors. 1 Cartesian Coordinates. Carlo Tomasi

2.1 Complexity Classes

IMPROVING PERFORMANCE OF RANDOMIZED SIGNATURE SORT USING HASHING AND BITWISE OPERATORS

Approximation of an Open Polygonal Curve with a Minimum Number of Circular Arcs and Biarcs

Diffuse Reflection Radius in a Simple Polygon

NEW MEXICO Grade 6 MATHEMATICS STANDARDS

The LCA Problem Revisited

Georgia Standards of Excellence Mathematics

Linear Algebra Notes for Marsden and Tromba Vector Calculus

Transcription:

A Survey of 3sum-Hard Problems James King king@cs.ubc.ca December 20, 2004 1 Introduction The 3sum problem is defined as follows: given a set S of n integers, do there exist three elements {a, b, c} S such that a + b + c = 0? This is a linear satisfiability problem. 3sum can be solved using a simple algorithm with Θ(n 2 ) runtime (sort S, then test 3-tuples intelligently) and it is widely believed that Ω(n 2 ) is the lower bound for the worst-case runtime of any solution to the 3sum problem. Gajentaan and Overmars [GO95] relate a number of problems in computational geometry to the 3sum problem. They define a problem to be 3sum-hard if a constant number of 3sum instances can solve the problem via a o(n 2 ) reduction. In section 2 I discuss some of these problems and demonstrate some of the reductions used to prove 3sum-hardness. In section 3 I discuss lower bounds for the time complexity of the 3sum problem. In section 4 I discuss related problems and in section 5 I discuss areas of research where there seems to be potential for progress. 2 3sum-Hard Problems In this section I discuss problems that have been proven to be 3sum-hard. For some of the problems I mention I will include the actual reductions to 3sum. In terms of notation, I will use that of [GO95]. That is, for two problems pr1 and pr2, PR1 f(n) PR2 1

means that every instance of pr1 of size n can be solved using a constant number of instances of pr2, plus O(f(n)) additional time. PR1 == f(n) PR2 means that pr1 f(n) pr2 and pr2 f(n) pr1. A problem pr is called 3sum-hard if and only if 3sum f(n) pr, where f(n) = o(n 2 ). There are too many 3sum-hard problems for me to mention all of them here. This listing includes some of the more significant problems, as well as some of the fundamental 3sum-hard problems discussed in the original paper [GO95]. 3sum Given three sets of integers A, B, and C such that A + B + C = n, are there three numbers a A, b B, and c C such that a + b = c? 3sum is a variation of the original 3sum problem. It is is equivalent in difficulty to the original 3sum problem. The reductions are linear, so 3sum == n 3sum. The reductions consist of building new sets from the originals and modifying them arithmetically and can be found in [GO95]. GeomBase Given n points on horizontal lines given by y = 0, y = 1, and y = 2, is there a non-horizontal line that goes through three points? GeomBase is so named because it is used as an intermediate point for 3sum hardness proofs of many problems in computational geometry, and is essentially the base geometric form of the 3sum problem. 3sum == n GeomBase [GO95], and the reductions are quite simple. To reduce Geom- Base to 3sum, for each integer a A we create a point with coordinates (a, 0). For each b B we create a point with coordinates (b, 2) and for each 2

c C we create a point with coordinates ( c, 1). Now we have an instance of 2 GeomBase. Clearly any non-horizontal line that goes through three points corresponds to some a A, b B, c C such that (a + b)/2 = c/2, or a+b = c. Therefore we have 3sum n GeomBase. We can essentially do the same reduction in reverse to show that GeomBase n 3sum, so we have 3sum == n GeomBase. 3-Points-on-line Given a set S of n points on the plane, are any three of them colinear? Consider the curve given by y = x 3. Simple arithmetic tells us that three points (a, a 3 ), (b, b 3 ), and (c, c 3 ) are colinear if and only if a + b + c = 0. Therefore reducing 3-Points-on-line to 3sum is simply a matter of projecting the numbers from our 3sum instance from the x-axis to the curve y = x 3. This tells us that 3sum n 3-Points-on-line [GO95]. Note that this problem is a special case of the problem of determining whether a set of any type of two dimensional objects in the plane has three elements that can be intersected by a single line. These problems, too, are therefore 3sum-hard. Gomez et al. [GRT97] discuss the problem of finding, removing, then replacing degeneracies in input so as to find exact solutions to problems with degeneracies. This problem is 3sum-hard for many types of degeneracies. Minimum-area-triangle Given a set S of n points on the plane, what is the area of the smallest triangle formed by any three of these points? This problem 3sum-hard because it is at least as hard as 3-Points-online. Clearly a set S of points contains three colinear points if and only if the area of the smallest triangle is 0. 3

Separator Given a set S of n line segments, is there a line that divides S into two nonempty subsets? We can show that Separator is 3sum-hard by reducing it to GeomBase [GO95]. For our reduction we need to create a set of line segments such that gaps between our line segments correspond to points in our instance of GeomBase. For each of our three original lines, we sort the points on it then create line segments between adjacent points such that there is an infinitessimally small gap at each point. After doing this for each line, we can create a cap of extra line segments at each end of our set such that a line can only split the set of segments by passing through three of the gaps that correspond to our original points (see [GO95] for details). Thus Separator solves GeomBase after a O(n log n) time reduction. Therefore 3sum n log n Separator, and Separator is 3sum-hard. Strips-cover-box Given a rectangle and n infinite strips (the space between two parallel lines), does the union of the strips cover the rectangle? 3sum-hardness is proven in [GO95]. Triangles-cover-triangle Given a set S of n triangles and a triangle t, does the union of the triangles in S cover t? 3sum-hardness is proven via a reduction of two instances of Trianglescover-triangle to an instance of Strips-cover-box. The rectangle in the original problem is split in half to turn the instance of Strips-coverbox into two instances of Strips-cover-triangle. Each of these can in turn be solved by an instance of Triangles-cover-triangle by cutting off the irrelevant part of each strip to make a finite rectangle, then splitting each rectangle in half to make two triangles. Strips-cover-box returns True if and only if both instances of Triangles-cover-triangle return true. The 4

reduction is linear, so we have Strips-cover-box n Triangles-covertriangle. Planar-motion-planning Given a set of line segments in the plane and a line segment robot, can the robot be moved from a start configuration to a goal configuration using translation and rotation? This is about as easy as motion planning problems get, so its 3sumhardness is quite significant. It can be proven by reducing it to GeomBase. The reduction is very similar to the reduction of GeomBase to Separator; we build the same construction of line segments, then build large cages of line segments both above our top line and below our bottom line. The starting configuration is inside the upper cage and the goal configuration is inside the lower cage. Our robot is long enough that, because of the cages, the robot can move from the start configuration to the goal configuration only by moving through a triplet of gaps that a line would fit through in Separator. Our reduction is the same as that of GeomBase to Separator, plus constant time, so we have GeomBase nlog n Planar-motion-planning and Planar-motion-planning is 3sum hard. Dihedral-rotation Given a polygonal chain of n edges in 3-space and a dihedral rotation, does the rotation cause the chain to intersect itself? The dihedral rotation problem arises especially when dealing with polymers in physics. A dihedral rotation involves rotating half of the chain rigidly around a given edge by a given angle. Soss et al. [SEO02] prove that preprocessing a static chain of length n and answering n queries is a 3sum-hard problem. They also prove that, for a dynamic chain in which a successful query actually performs the rotation, performing n queries is 3sum-hard, which suggests that no amount of preprocessing can yield sublinear query time. 5

Soss et al. reduce Dihedral-rotation to 3sum by creating a polygonal chain with combs of sharp teeth : one comb with teeth corresponding to elements in A and one with teeth corresponding to elements in C. In between the combs is a staircase created using the elements in B such that certain rotations in the staircase are only legal if 3sum is not satisfied. See [SEO02] for more details. Polygon-containment Given two polygons P and Q, can P be translated such that it lies completely within Q? 3sum-hardness for this problem was proven by Barequet and Har-Peled [BHP99]. In the same paper they offer proofs of 3sum-hardness for variations of this problem, such as when the polygons must be convex but rotation is allowed. Reductions for the proofs use Segments-contain-points as an intermediate problem. That asks, given a set P of n real numbers and a set Q of O(n) disjoint real number intervals, can the points be shifted by some real number v such that, for every number p P, p + v lies in one of the intervals in Q? This problem is 3sum-hard and some polygon containment problems (including the ones given) can be reduced to it in o(n 2 ) time. It should be noted that some of these containment problems actually belong to a harder complexity class [Bar96] of which every 3sum-hard problem is a member. 3 Lower Bounds Lower bounds have not yet been proven for general models of computation. It is widely believed that Ω(n 2 ) is a tight lower bound for the worst-case runtime of any algorithm that solves 3sum, and that there is therefore a similar bound for anything that solves a 3sum-hard problem. 3sum can certainly be solved in O(n 2 ) time, and can even be solved faster in special cases. If all of the numbers are integers in the range ( M, M) for some M, 3sum can be solved in time O(n+M log M). Recall that the same then applies to 3sum, since we know that 3sum == n 3sum. The technique finds the bit vectors representing the three sets A, B, and C, then uses a fast 6

Fourier transform to calculate the integer vector representing the multiset A + B. It then compares that vector to the bit vector of C. This technique is due to Seidel and appears via a personal communication with Erickson in [Eri95]. The problem is that it works only on a restricted subset of 3sum instances. This is problematic not only in theory but also in practice. Also, it uses a fairly powerful model of computation; this fact is not extremely problematic in a practical sense, but does make the result less significant theoretically. Erickson [Eri95] provides a lower bound for any algorithm that solves every instance of 3sum. The bound is the desired tight Ω(n 2 ) bound, but only works in a weak model of computation. This is the algebraic decision tree model with restricted queries. All queries must be based on the sign of a linear combination of three elements of the set. This model of computation is sufficient for solving many 3sum-hard problems. However, some 3sumhard problems, such as Minimum-area-triangle, cannot be solved at all using this model of computation. Minimum-area-triangle can be solved in O(n 2 ) time [CGL83], but all solutions to do so involve more complex queries. Erickson s lower bounds rely on an adversarial argument. He proves that, for any algorithm solving 3sum using the restricted model of computation, there exists an input with Ω(n 2 ) critical 3-tuples. Each critical 3-tuple is a query such that, if the algorithm has not yet performed it, the adversary is in a position where it can change the input such that the answers of previously made queries do not change, but our critical query must be performed to solve the 3sum instance correctly. Since Ω(n 2 ) critical 3-tuples must be tested, the algorithm must run in Ω(n 2 ) time. 4 Related Problems 3sum is actually a linear satisfiability problem for an equation in 3 variables. Closely related is the more general linear satisfiability problem for an equation in r variables for some r. Hernàndez Barrera [Bar96] investigates the complexity class related to this problem for r = 4 rather than r = 3 (essentially the class of 4sum-hard problems). This class includes several 7

geometric problems, notably computing the Minkowski sum of two polygons and Polygon-containment, as defined earlier. Erickson s lower bound for 3sum is a specific case of the more general lower bound he proves. Under the same model of computation mentioned before (though queries are now linear combinations of r elements), the linear satisfyability problem for an equation in r variables cannot be solved faster than Ω(n r/2 ). This bound is tight for all odd r and is within a logarithmic factor for all even r. 5 Open Problems Improved Lower Bounds Though Erickson made significant progress towards proving a lower bound of Ω(n 2 ), it would be a significant achievement to extend his result to a more general model of computation. This would prove a true lower bound of Ω(n 2 ) for all 3sum-hard problems. It is my belief that Erickson s lower bound will gradually be strengthened to include stronger and stronger models of computation. This, however, is a well studied problem and progress towards a better lower bound has been slow since Erickson s result. Seemingly 3sum-Hard Problems There are still many problems that appear to be 3sum-hard, but for which no lower bounds better than Ω(n logn) have been proven. Proving that these problems are 3sum-hard would offer a better lower bound, if only for a weak model of computation, and would open the door for further lower bound improvements. The optimum binary search tree problem, for example, can be solved in O(n 2 ) time [Knu71]. It is widely believed that this is also a lower bound, but no lower bound better than Ω(n log n) has been proven. Knuth s algorithm uses dynamic programming, which is a much more powerful tool than what is required for a O(n 2 ) 3sum algorithm. Also, Knuth s algorithm requires Θ(n 2 ) storage, which is not required to solve 3sum in O(n 2 ) time (no optimum binary search tree algorithm has been found that uses o(n 2 ) space 8

and polynomial time). These facts suggest that the problem is harder than 3sum, though this has not been proven. Optimum binary search tree is just one of many problems that are believed to have Θ(n 2 ) worst-case runtime but are not known to be 3sum-hard. Proving 3sum-hardness would improve the best known lower bounds for these problems. 9

References [Bar96] A. Hernández Barrera. Finding an o(n 2 log n) algorithm is sometimes hard. In Frank Fiala, Evangelos Kranakis, and Jörg-Rüdiger Sack, editors, Proceedings of the 8th Canadian Conference on Computational Geometry (CCCG-96), volume 5 of International Informatics Series, pages 289 294, Carleton University, August 12 15 1996. Carleton University Press. [BHP99] Gill Barequet and Sariel Har-Peled. Polygon-containment and translational min-hausdorff-distance between segment sets are 3sum-hard. In Proceedings of the Tenth Annual ACM-SIAM Symposium on Discrete Algorithms, pages 862 863, N.Y., January 17 19 1999. ACM-SIAM. [CGL83] Bernard Chazelle, Leo J. Guibas, and D. T. Lee. The power of geometric duality. In 24th Annual Symposium on Foundations of Computer Science, pages 217 225, Tucson, Arizona, 7 9 November 1983. IEEE. [Eri95] [GO95] Jeff Erickson. Lower bounds for linear satisfiability problems. In Proceedings of the 6th Annual Symposium on Discrete Algorithms, pages 388 395, New York, NY, USA, January 1995. ACM Press. Gajentaan and Overmars. On a class of O(n 2 ) problems in computational geometry. CGTA: Computational Geometry: Theory and Applications, 5, 1995. [GRT97] Gomez, Ramaswami, and Toussaint. On removing non-degeneracy assumptions in computational geometry. In CIAC: Italian Conference on Algorithms and Complexity, 1997. [Knu71] Donald E. Knuth. Optimum binary search trees. Acta Informatica, 1(1):14 25, January 1971. [SEO02] Michael Soss, Jeff Erickson, and Mark Overmars. Preprocessing chains for fast dihedral rotations is hard or even impossible. April 19 2002. 10