260 likes | 391 Views
Output-Sensitive Construction of the Union of Triangles. Esther Ezra and Micha Sharir. Definition: Union. T ={ 1 ,…, n } - collection of n triangles in the plane. The union U= i I is defined as all regions in the plane that are covered by the triangles of T.
E N D
Output-Sensitive Construction of the Union of Triangles Esther Ezra and Micha Sharir
Definition: Union T ={1,…, n} - collection of n triangles in the plane. The union U=iIis defined as all regions in the plane that are covered by the triangles of T.
Constructing the Union: Motivation Robot motion planning Construct the forbidden portion of the configuration space. Ray shooting amid semi-algebraic sets in R3 Construct the union of 4-dimensional regions.
Computing the union Constructing the arrangement of the triangles – too slow! O(n2) Output-sensitive algorithm (in terms of the number of edges on the boundary)? unlikely to exist! 3SUM === HOLE-IN-UNION The best known solutions to problems from the 3SUM-hard family require (n2) time in the worst case.
Union of triangles in R2Known results Special cases Union size Ref Fat triangles O(n loglog n) MPSSW-94 Pseudodiscs O(n) KLPS-86 General triangles: Algorithm Running time Ref RIC O(n log n + Θ1) AH-01 DC O(n2) EHS-02 i|Vi| / i Vi – the set of vertices in depthi Performs well in practice
“Output-sensitive” union construction Given a collection T ={1,…, n} of n triangles in the plane, such that there exists a subset S T (unknown to us), of << n triangles with S = T, construct efficiently the union of the triangles in T.
Output Sensitivity: Example II Only 4 triangles determine the boundary of the union = 6
Our Result We show that when there exists a subset S T of << n triangles, such that S = T, the union can be constructed in O*(n4/3 + n) time. Subquadratic when = o*(n)
A Set Cover in a Set System Use a variant of the method of Bronnimann and Goodrich for finding a set cover in a set system of finite VC-dimension Our set system :(V+, T) The set of vertices of A(T) that lie inside the union
Hitting Set in a Set System Dual set system: (T, V*) V* = { Tv : v V+ } Tv consists of all the triangles in T that contain v in their interior. A hitting set: a subset H T , s.t. H has a non empty intersection with every subset member of V*. A hitting set H for (T,V*) is a set cover for (V+,T). H = T
Finding a Hitting Set – general scheme(Bronnimann and Goodrich) • Assign weights to the triangles in T.Initially, all weights are 1. • Net finder:Construct a (1 / 2)-netN for (T,V*) .( guess of a hitting set for (T, V*) with |N| = O( log ) ). • Verifier:If there exists a subset Tv that is not hit by N (there exists a vertex vV+ outside N) ,double the weights of the triangles in Tv. Goto 2.Else N is a hitting set for (T,V*)
Performance of the algorithm A hitting set of size O( log ) is found after O( log (n/)) iterations.
Ideal Setting Problem: The algorithm requires the knowledge of V+. (But we cannot afford to computeV+explicitly). Solution: Variant of the algorithmUse a random subsetR V+instead. |R| = r = (t log n) Lemma: A subset H that covers R, covers most of the vertices of V+, with high probability: The number of remaining uncovered vertices /t H and R are independent! = |V+|
The residual cost of the B-G algorithm How many vertices at positive-depth(in V+) are constructed by the B-G algorithm? O(2 log2 + /t ), with high probability. All remaining uncovered vertices The O( log ) triangles in H (over pessimistic)
Implementation • Net finder • Drawing a sample R • Verifier • The actual construction of the union O( log (n/))times
Simple Implementation Sampling R: O*(r n2 / ) pairs of triangle edges O(r) real vertices. Net-finder: O(n) Verifier: (brute-force) O*(r + n) If = O(n4/3), construct the entire arrangement, and report the union
The actual construction of the union Divide the process into two stages: • Construct the union of all the triangles in H. • Insert all the remaining triangles (covering /t positive-depthvertices).
U is the union of the triangles in H. t1, t2, t3 are the remaining triangles.
The actual construction of the union Divide the set of the remaining triangles into n/( log )subsets, each of size O( log ) . Construct H in O(2 log2) time. For each such subset S, construct A(S). Report all intersections between S and H in an output-sensitive manner. O*(n + / t)
Overall running time O*(n4/3 + r n2 / + r2 + n + / t) r = Ω(t log n) Choose t = k1/2 / O*(n4/3 + n)
Extensions: Simple objects in R2 Implementation: generic and simple. The algorithm can be easily extended to other simple geometric objects in R2: O*(n4/3 + n)
Extensions: Simple objects inR3 If = O(n2), construct the entire arrangement, and report the union Sampling R: O*(r n3 / ) Net-finder: O(n) Verifier: (brute-force) O*(r + n) Actual construction of the union: construct the union, in an output-sensitive manner, on every facet of the input objects separately. O*(n2 + / t). Overall running time: O*(n2). Similar routines as before
Extensions: Simple objects inRd Apply the (d-1)-approach on each facet of the input objects, using induction on d. Overall running time: O*(nd-1).
Earlier variant We used the Disjoint-Cover (DC) algorithm[Ezra, Halperin, Sharir 2002] • Implementation: • more complex. • heavily relies on the geometry of the input objects Less generic. • Less efficient (subquadratic only for a smaller range of ).
Further research Simpler efficient alternative approaches? RIC : fails!