Top Banner
Output-Sensitive Output-Sensitive Construction of the Construction of the Union of Triangles Union of Triangles Esther Ezra and Micha Esther Ezra and Micha Sharir Sharir
26

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

Dec 10, 2015

Download

Documents

Ella Host
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Output-Sensitive Construction of the Union of Triangles Esther Ezra and Micha Sharir.

Output-Sensitive Construction Output-Sensitive Construction of the Union of Trianglesof the Union of Triangles

Esther Ezra and Micha SharirEsther Ezra and Micha Sharir

Page 2: Output-Sensitive Construction of the Union of Triangles Esther Ezra and Micha Sharir.

Definition: UnionDefinition: Union

T ={T ={11,…, ,…, nn}} - collection of - collection of nn

triangles in the plane.triangles in the plane.

The union The union U=U=ii II is defined is defined

as all regions in the plane as all regions in the plane that are covered by the that are covered by the triangles of triangles of TT..

Page 3: Output-Sensitive Construction of the Union of Triangles Esther Ezra and Micha Sharir.

Constructing the Union: Constructing the Union: MotivationMotivation

Robot motion planningRobot motion planning

Construct the forbidden Construct the forbidden portion of the portion of the configuration space.configuration space.

Ray shooting amid semi-Ray shooting amid semi-algebraic sets in algebraic sets in RR33

Construct the union of 4-Construct the union of 4-dimensional regions.dimensional regions.

Page 4: Output-Sensitive Construction of the Union of Triangles Esther Ezra and Micha Sharir.

Computing the unionComputing the unionConstructing the arrangement of the triangles – too slow! Constructing the arrangement of the triangles – too slow!

O(nO(n22))

Output-sensitive algorithm Output-sensitive algorithm (in terms of the number of edges (in terms of the number of edges

on the boundary)? on the boundary)? unlikely to exist!unlikely to exist!

3SUM === HOLE-IN-UNION3SUM === HOLE-IN-UNION

The best known solutions to problems from the 3SUM-hard The best known solutions to problems from the 3SUM-hard family require family require (n(n22)) time in the worst case. time in the worst case.

Page 5: Output-Sensitive Construction of the Union of Triangles Esther Ezra and Micha Sharir.

Union of triangles in RUnion of triangles in R22

Known resultsKnown resultsSpecial cases Union size Ref Special cases Union size Ref

Fat triangles Fat triangles O(n loglog n)O(n loglog n) MPSSW-94 MPSSW-94

Pseudodiscs Pseudodiscs O(n)O(n) KLPS-86 KLPS-86

General triangles:General triangles:

Algorithm Running time RefAlgorithm Running time Ref

RIC RIC O(n log n + O(n log n + ΘΘ11)) AH-01 AH-01

DC DC O(nO(n22)) EHS-02 EHS-02

Performs well in Performs well in practicepractice

ii |V |Vii| / i| / i

VVii – the set of – the set of

vertices in vertices in depthdepth ii

Page 6: Output-Sensitive Construction of the Union of Triangles Esther Ezra and Micha Sharir.

““Output-sensitive” union Output-sensitive” union constructionconstruction

Given a collection Given a collection T ={T ={11,…, ,…, nn}} of of nn

triangles in the plane, such that there triangles in the plane, such that there exists a subset exists a subset S S TT (unknown to us), (unknown to us),

of of << n << n triangles with triangles with

SS = = TT ,,

construct construct efficientlyefficiently the union of the triangles the union of the triangles in in TT..

Page 7: Output-Sensitive Construction of the Union of Triangles Esther Ezra and Micha Sharir.

Output Sensitivity: Example IOutput Sensitivity: Example I

= 2= 2

Page 8: Output-Sensitive Construction of the Union of Triangles Esther Ezra and Micha Sharir.

= 6= 6

Only 4 triangles Only 4 triangles determine the determine the

boundary of the boundary of the unionunion

Output Sensitivity: Example IIOutput Sensitivity: Example II

Page 9: Output-Sensitive Construction of the Union of Triangles Esther Ezra and Micha Sharir.

Our ResultOur Result

We show that when there exists a subset We show that when there exists a subset S S TT of of << n << n triangles, such that triangles, such that

SS = = TT , ,

the union can be constructed in the union can be constructed in O*(nO*(n4/34/3 + + nn)) time. time.

Subquadratic whenSubquadratic when = o*(n) = o*(n)

Page 10: Output-Sensitive Construction of the Union of Triangles Esther Ezra and Micha Sharir.

A Set Cover in a Set SystemA Set Cover in a Set System

Use a variant of the method of Bronnimann Use a variant of the method of Bronnimann and Goodrich for finding a and Goodrich for finding a set coverset cover in a in a set system of set system of finite VC-dimensionfinite VC-dimension

Our set system :Our set system : (V(V++, T), T)

The set of The set of vertices of vertices of A(T)A(T)

that lie inside the that lie inside the unionunion

Page 11: Output-Sensitive Construction of the Union of Triangles Esther Ezra and Micha Sharir.

Hitting Set in a Set SystemHitting Set in a Set System

Dual set system:Dual set system: (T, V*) (T, V*)V* = { TV* = { Tvv : v : v V V++ } }

TTvv consists of all the triangles in consists of all the triangles in TT that contain that contain vv in in their interior.their interior.

A hitting set: A hitting set: a subset a subset HH T T , s.t. , s.t. HH has a non empty has a non empty intersection with every subset member of intersection with every subset member of V*V*..

A hitting set H for A hitting set H for (T,V*)(T,V*) is a set cover for is a set cover for (V(V++,T).,T). H = H = T T

Page 12: Output-Sensitive Construction of the Union of Triangles Esther Ezra and Micha Sharir.

Finding a Hitting Set – general schemeFinding a Hitting Set – general scheme(Bronnimann and Goodrich)(Bronnimann and Goodrich)

1.1. Assign weights to the triangles in Assign weights to the triangles in TT..Initially, all weights are Initially, all weights are 11..

2.2. Net finder:Net finder: Construct a Construct a (1 / 2(1 / 2)-net)-net NN for for (T,V*) (T,V*) ..( guess of a hitting set for ( guess of a hitting set for (T, V*) (T, V*) with with |N| = O(|N| = O( log log ) ) ). ).

3.3. Verifier:Verifier: If there exists a subset If there exists a subset TTvv that is not hit by that is not hit by N N (there exists a vertex (there exists a vertex vvVV++ outside outside NN) ,) ,

doubledouble the weights of the triangles in the weights of the triangles in TTvv..Goto 2.Goto 2.

Else Else NN is a hitting set for is a hitting set for (T,V*) (T,V*)

Page 13: Output-Sensitive Construction of the Union of Triangles Esther Ezra and Micha Sharir.

Performance of the algorithmPerformance of the algorithm

A hitting set of size A hitting set of size O(O( log log )) is found after is found after O(O( log (n/ log (n/)))) iterations. iterations.

Page 14: Output-Sensitive Construction of the Union of Triangles Esther Ezra and Micha Sharir.

Ideal SettingIdeal Setting

ProblemProblem:: The algorithm requires the knowledge of The algorithm requires the knowledge of VV++..(But we cannot afford to compute(But we cannot afford to compute VV++ explicitly).explicitly).

Solution: Variant of the algorithmSolution: Variant of the algorithm Use a random subsetUse a random subset RR V V++ instead.instead.

|R| = r = |R| = r = (t log n)(t log n)

Lemma:Lemma: A subset A subset HH that covers that covers RR, covers most of the , covers most of the vertices of vertices of VV++ , with high probability:, with high probability:

The number of remaining uncovered verticesThe number of remaining uncovered vertices /t /t

HH and and RR are are independent!independent!

= |V|V++||

Page 15: Output-Sensitive Construction of the Union of Triangles Esther Ezra and Micha Sharir.

The The residual costresidual cost of the B-G of the B-G algorithmalgorithm

How many vertices at How many vertices at positive-depthpositive-depth (in V(in V++) are constructed by the B-G ) are constructed by the B-G algorithm?algorithm?

O(O(22 log log22 + + /t /t ), ), with high probability.with high probability.

The The O(O( log log )) triangles in triangles in HH(over pessimistic)(over pessimistic)

All remaining uncovered All remaining uncovered verticesvertices

Page 16: Output-Sensitive Construction of the Union of Triangles Esther Ezra and Micha Sharir.

ImplementationImplementation

Net finderNet finder Drawing a sample R Drawing a sample R VerifierVerifier

The actual construction of the unionThe actual construction of the union

O(O( log (n/ log (n/)))) timestimes

Page 17: Output-Sensitive Construction of the Union of Triangles Esther Ezra and Micha Sharir.

Simple ImplementationSimple Implementation

Sampling Sampling RR: : O*(r nO*(r n22 / / ) ) pairs of triangle pairs of triangle edgesedges O(r) O(r) real vertices.real vertices.

Net-finder: Net-finder: O(n)O(n)

Verifier: (brute-force) Verifier: (brute-force) O*(rO*(r + n) + n)

IfIf = O(n = O(n4/34/3), construct the ), construct the entire arrangement, and report entire arrangement, and report

the unionthe union

Page 18: Output-Sensitive Construction of the Union of Triangles Esther Ezra and Micha Sharir.

The actual construction of the The actual construction of the unionunion

Divide the process into two stages:Divide the process into two stages:

1.1. Construct the union of all the triangles in Construct the union of all the triangles in HH..

2.2. Insert all the remaining triangles (covering Insert all the remaining triangles (covering /t /t positive-depthpositive-depth vertices).vertices).

Page 19: Output-Sensitive Construction of the Union of Triangles Esther Ezra and Micha Sharir.

U is the union of the triangles in

H.

t1, t2, t3 are the remaining triangles.

Page 20: Output-Sensitive Construction of the Union of Triangles Esther Ezra and Micha Sharir.

The actual construction of the The actual construction of the unionunion

Divide the set of the remaining triangles into Divide the set of the remaining triangles into n/(n/( log log )) subsets, each of size subsets, each of size O(O( log log ) . ) .

Construct Construct H H in in O(O(22 log log22)) time. time.For each such subset For each such subset SS, construct , construct A(S).A(S).Report all intersections between Report all intersections between SS and and

H H in an output-sensitive manner. in an output-sensitive manner.

O*(nO*(n + + / t) / t)

Page 21: Output-Sensitive Construction of the Union of Triangles Esther Ezra and Micha Sharir.

Overall running timeOverall running time

O*(nO*(n4/34/3 + + r nr n22 / / + r + r22 + n + n + + / t) / t)

r = r = ΩΩ(t log n)(t log n)

ChooseChoose t = k t = k1/21/2 / /

O*(nO*(n4/34/3 + + nn))

Page 22: Output-Sensitive Construction of the Union of Triangles Esther Ezra and Micha Sharir.

Extensions: Simple objects in Extensions: Simple objects in RR22

Implementation: generic and simple.Implementation: generic and simple.

The algorithm can be easily extended to other The algorithm can be easily extended to other simple geometric objects in simple geometric objects in RR22: : O*(nO*(n4/34/3 + n + n))

Page 23: Output-Sensitive Construction of the Union of Triangles Esther Ezra and Micha Sharir.

Extensions: Simple objects Extensions: Simple objects inin RR33

Sampling Sampling RR: : O*(r nO*(r n33 / / ))

Net-finder: Net-finder: O(n)O(n)

Verifier: (brute-force) Verifier: (brute-force) O*(rO*(r + n) + n)

Actual construction of the union: construct the union, in an Actual construction of the union: construct the union, in an output-sensitive manner, on every facet of the input output-sensitive manner, on every facet of the input objects separately. objects separately. O*(nO*(n22 + + / t / t).).

Overall running time: Overall running time: O*(n O*(n22 ).).

IfIf = O(n = O(n22), construct the entire ), construct the entire arrangement, and report the unionarrangement, and report the union

Similar routines Similar routines as beforeas before

Page 24: Output-Sensitive Construction of the Union of Triangles Esther Ezra and Micha Sharir.

Extensions: Simple objects Extensions: Simple objects inin RRdd

Apply the Apply the (d-1)(d-1)-approach on each facet of the input -approach on each facet of the input objects, using induction on objects, using induction on dd..

Overall running time: Overall running time: O*(n O*(nd-1d-1 ).).

Page 25: Output-Sensitive Construction of the Union of Triangles Esther Ezra and Micha Sharir.

Earlier variantEarlier variant

We used the Disjoint-Cover (DC) algorithmWe used the Disjoint-Cover (DC) algorithm[Ezra, Halperin, Sharir 2002][Ezra, Halperin, Sharir 2002]

1.1. Implementation: Implementation: 1.1. more complex.more complex.

2.2. heavily relies on the geometry of the input objects heavily relies on the geometry of the input objects Less generic. Less generic.

2.2. Less efficient (subquadratic only for a Less efficient (subquadratic only for a smallersmaller range of range of ))..

Page 26: Output-Sensitive Construction of the Union of Triangles Esther Ezra and Micha Sharir.

Further researchFurther research

Simpler efficient alternative approaches?Simpler efficient alternative approaches?

RIC : fails!RIC : fails!