# Output-Sensitive Construction of the Union of Triangles Esther Ezra and Micha Sharir.

## Presentation on theme: "Output-Sensitive Construction of the Union of Triangles Esther Ezra and Micha Sharir."— Presentation transcript:

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.

Constructing the Union: Motivation Robot motion planning Construct the forbidden portion of the configuration space. Ray shooting amid semi- algebraic sets in R 3 Construct the union of 4- dimensional regions.

Computing the union Constructing the arrangement of the triangles – too slow! O(n 2 ) 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 (n 2 ) time in the worst case.

Union of triangles in R 2 Known 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(n 2 ) EHS-02 Performs well in practice i |V i | / i i |V i | / i V i – the set of vertices in depth i

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, S = T, construct efficiently the union of the triangles in T.

Output Sensitivity: Example I = 2 = 2

= 6 = 6 Only 4 triangles determine the boundary of the union Output Sensitivity: Example II

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*(n 4/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* = { T v : v V + } T v 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 H = T

Finding a Hitting Set – general scheme (Bronnimann and Goodrich) 1. Assign weights to the triangles in T. Initially, all weights are 1. 2. Net finder: Construct a (1 / 2 )-net N for (T,V*). ( guess of a hitting set for (T, V*) with |N| = O( log ) ). 3. Verifier: If there exists a subset T v that is not hit by N (there exists a vertex v V + outside N), double the weights of the triangles in T v. 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 compute V + explicitly). Solution: Variant of the algorithm Use a random subset R V + instead. |R| = r = (t log n) |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 + | = |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 log 2 + /t ), with high probability. The O( log ) triangles in H (over pessimistic) All remaining uncovered vertices

Implementation Net finder Net finder Drawing a sample R Drawing a sample R Verifier Verifier The actual construction of the union The actual construction of the union O( log (n/ )) times

Simple Implementation Sampling R: O*(r n 2 / ) pairs of triangle edges O(r) real vertices. Net-finder: O(n) Verifier: (brute-force) O*(r + n) If = O(n 4/3 ), construct the entire arrangement, and report the union

The actual construction of the union Divide the process into two stages: 1. Construct the union of all the triangles in H. 2. Insert all the remaining triangles (covering /t positive-depth vertices).

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 log 2 ) 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*(n 4/3 + r n 2 / + r 2 + n + / t) r = Ω(t log n) Choose t = k 1/2 / Choose t = k 1/2 / O*(n 4/3 + n )

Extensions: Simple objects in R 2 Implementation: generic and simple. The algorithm can be easily extended to other simple geometric objects in R 2 : O*(n 4/3 + n )

Extensions: Simple objects in R 3 Sampling R: O*(r n 3 / ) 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*(n 2 + / t). Overall running time: O*(n 2 ). If = O(n 2 ), construct the entire arrangement, and report the union Similar routines as before

Extensions: Simple objects in R d Apply the (d-1)-approach on each facet of the input objects, using induction on d. Overall running time: O*(n d-1 ).

Earlier variant We used the Disjoint-Cover (DC) algorithm [Ezra, Halperin, Sharir 2002] 1. Implementation: 1. more complex. 2. heavily relies on the geometry of the input objects Less generic. 2. Less efficient (subquadratic only for a smaller range of ).

Further research Simpler efficient alternative approaches? RIC : fails!

Download ppt "Output-Sensitive Construction of the Union of Triangles Esther Ezra and Micha Sharir."

Similar presentations