Preprocess a planar map S. Given a query point p, report the face of S containing p. Goal: O(n)-size data structure that enables O(log n) query time.



Similar documents
6.7 Network analysis Introduction. References - Network analysis. Topological analysis

Fractal-Structured Karatsuba`s Algorithm for Binary Field Multiplication: FK

Chapter Eight. f : R R

IDENTIFICATION OF THE DYNAMICS OF THE GOOGLE S RANKING ALGORITHM. A. Khaki Sedigh, Mehdi Roudaki

Security Analysis of RAPP: An RFID Authentication Protocol based on Permutation

T = 1/freq, T = 2/freq, T = i/freq, T = n (number of cash flows = freq n) are :

Average Price Ratios

Optimal multi-degree reduction of Bézier curves with constraints of endpoints continuity

ANOVA Notes Page 1. Analysis of Variance for a One-Way Classification of Data

Bayesian Network Representation

Numerical Methods with MS Excel

Chapter 3. AMORTIZATION OF LOAN. SINKING FUNDS R =

ON SLANT HELICES AND GENERAL HELICES IN EUCLIDEAN n -SPACE. Yusuf YAYLI 1, Evren ZIPLAR 2. yayli@science.ankara.edu.tr. evrenziplar@yahoo.

Sequences and Series

The analysis of annuities relies on the formula for geometric sums: r k = rn+1 1 r 1. (2.1) k=0

STATISTICAL PROPERTIES OF LEAST SQUARES ESTIMATORS. x, where. = y - ˆ " 1

Polyphase Filters. Section 12.4 Porat 1/39

Statistical Pattern Recognition (CE-725) Department of Computer Engineering Sharif University of Technology

Speeding up k-means Clustering by Bootstrap Averaging

Simple Linear Regression

On Error Detection with Block Codes

Relaxation Methods for Iterative Solution to Linear Systems of Equations

CH. V ME256 STATICS Center of Gravity, Centroid, and Moment of Inertia CENTER OF GRAVITY AND CENTROID

MDM 4U PRACTICE EXAMINATION

The Digital Signature Scheme MQQ-SIG

1. The Time Value of Money

RUSSIAN ROULETTE AND PARTICLE SPLITTING

CSSE463: Image Recognition Day 27

Luby s Alg. for Maximal Independent Sets using Pairwise Independence

The Gompertz-Makeham distribution. Fredrik Norström. Supervisor: Yuri Belyaev

CIS603 - Artificial Intelligence. Logistic regression. (some material adopted from notes by M. Hauskrecht) CIS603 - AI. Supervised learning

Classic Problems at a Glance using the TVM Solver

Compressive Sensing over Strongly Connected Digraph and Its Application in Traffic Monitoring

A New Bayesian Network Method for Computing Bottom Event's Structural Importance Degree using Jointree

10.5 Future Value and Present Value of a General Annuity Due

Credibility Premium Calculation in Motor Third-Party Liability Insurance

The Time Value of Money

Applications of Support Vector Machine Based on Boolean Kernel to Spam Filtering

On Cheeger-type inequalities for weighted graphs

How To Value An Annuity

n. We know that the sum of squares of p independent standard normal variables has a chi square distribution with p degrees of freedom.

Locally Adaptive Dimensionality Reduction for Indexing Large Time Series Databases

Abraham Zaks. Technion I.I.T. Haifa ISRAEL. and. University of Haifa, Haifa ISRAEL. Abstract

Using Phase Swapping to Solve Load Phase Balancing by ADSCHNN in LV Distribution Network

Curve Fitting and Solution of Equation

Chapter = 3000 ( ( 1 ) Present Value of an Annuity. Section 4 Present Value of an Annuity; Amortization

Constrained Cubic Spline Interpolation for Chemical Engineering Applications

SHAPIRO-WILK TEST FOR NORMALITY WITH KNOWN MEAN

THE McELIECE CRYPTOSYSTEM WITH ARRAY CODES. MATRİS KODLAR İLE McELIECE ŞİFRELEME SİSTEMİ

ECONOMIC CHOICE OF OPTIMUM FEEDER CABLE CONSIDERING RISK ANALYSIS. University of Brasilia (UnB) and The Brazilian Regulatory Agency (ANEEL), Brazil

of the relationship between time and the value of money.

ISyE 512 Chapter 7. Control Charts for Attributes. Instructor: Prof. Kaibo Liu. Department of Industrial and Systems Engineering UW-Madison

Banking (Early Repayment of Housing Loans) Order,

Numerical Comparisons of Quality Control Charts for Variables

Raport końcowy Zadanie nr 8:

OPTIMIZATION METHODS FOR BATCH SCHEDULING

Session 4: Descriptive statistics and exporting Stata results

CHAPTER 2. Time Value of Money 6-1

Optimal Packetization Interval for VoIP Applications Over IEEE Networks

APPENDIX III THE ENVELOPE PROPERTY

Fast, Secure Encryption for Indexing in a Column-Oriented DBMS

The simple linear Regression Model

Finito: A Faster, Permutable Incremental Gradient Method for Big Data Problems

Integrating Production Scheduling and Maintenance: Practical Implications

Lecture 7. Norms and Condition Numbers

Plastic Number: Construction and Applications

A Study of Unrelated Parallel-Machine Scheduling with Deteriorating Maintenance Activities to Minimize the Total Completion Time

Construction of a system scanning the movement of human upper limbs

FINANCIAL MATHEMATICS 12 MARCH 2014

where p is the centroid of the neighbors of p. Consider the eigenvector problem

Conversion of Non-Linear Strength Envelopes into Generalized Hoek-Brown Envelopes

SECTION 1.5 : SUMMATION NOTATION + WORK WITH SEQUENCES

Common p-belief: The General Case

On formula to compute primes and the n th prime

Group Nearest Neighbor Queries

OPTIMAL KNOWLEDGE FLOW ON THE INTERNET

Cyber Journals: Multidisciplinary Journals in Science and Technology, Journal of Selected Areas in Telecommunications (JSAT), January Edition, 2011

DECISION MAKING WITH THE OWA OPERATOR IN SPORT MANAGEMENT

Optimal replacement and overhaul decisions with imperfect maintenance and warranty contracts

Report 52 Fixed Maturity EUR Industrial Bond Funds

Fundamentals of Mass Transfer

STOCHASTIC approximation algorithms have several

ADAPTATION OF SHAPIRO-WILK TEST TO THE CASE OF KNOWN MEAN

Automated Event Registration System in Corporation

Loss Distribution Generation in Credit Portfolio Modeling

Beta. A Statistical Analysis of a Stock s Volatility. Courtney Wahlstrom. Iowa State University, Master of School Mathematics. Creative Component

An Approach to Evaluating the Computer Network Security with Hesitant Fuzzy Information

IP Network Topology Link Prediction Based on Improved Local Information Similarity Algorithm

Transcription:

Computatoal Geometry Chapter 6 Pot Locato 1 Problem Defto Preprocess a plaar map S. Gve a query pot p, report the face of S cotag p. S Goal: O()-sze data structure that eables O(log ) query tme. C p E F pplcato: Whch state s altmore located? swer: Marylad D G Trval Soluto: O() query tme, where s the complexty of the map. (Questo: Why s the query tme oly O()?) 2 1

Naïve Soluto Draw vertcal les through all the vertces of the subdvso. Store the x-coordates of the vertces a ordered bary tree. Wth each slab, sort the segmets separately alog y. Query tme: O(log ). Problem: Too delcate subdvso, of sze ( 2 ) the worst case. (Gve such a example!) 3 The Trapezodal Map Costruct a boudg box. ssume geeral posto: uque x coordates. Exted upward ad dowward the vertcal le from each vertex utl t touches aother segmet. Ths works also for ocrossg le segmets. 4 2

Propertes Cotas tragles ad trapezods. Each trapezod or tragle s determed: y two vertces that defe vertcal sdes; ad y two segmets that defe overtcal sdes. refemet of the orgal subdvso. 5 Notato Every trapezod (or tragle) s defed by Left(): a segmet edpot (rght or left); Rght(): a segmet edpot (rght or left); Top(): a segmet; ottom(): a segmet. 6 3

Complexty Theorem (lear complexty): trapezodal map of segmets cotas at most 6+4 vertces ad at most 3+1 faces. Proof: 1. Vertces: 2 + 4 + 4 = 6 + 4 orgal extesos box 2. Faces: Cout Left(). 2 + + 1 = 3 + 1 left e.p. rght e.p. box Questo: Why does the proof hold for degeerate stuatos? 7 Possbly by DCEL. Map Data Structure alteratve: For each trapezod store: The vertces that defe ts rght ad left sdes; The top ad bottom segmets; The (up to two) eghborg trapezods o rght ad left; (Optoal) The eghborg trapezods from above ad below. Ths umber mght be lear, so oly the leftmost of these trapezods s stored. Note: Computg ay trapezod from the trapezodal structure ca be doe costat tme. 8 4

Search Structure: rachg Rules Query pot q, search-structure ode s. s s a segmet edpot: q s to the rght of s: go rght; q s to the left of s: go left; s s a segmet: q s below s: go rght; q s above s: go left; 9 The DG Search Structure Q 1 P 1 Q 2 S 1 S 3 Q 3 S 1 E S 3 D P 3 Q 3 H J Q 1 F P 1 Q 2 C P S 2 2 G K P 3 P 2 S 3 C S 2 S 2 S 3 D E F G D H J K 10 5

Usg the Search Structure Q 1 P 1 Q 2 S 1 S 3 Q 3 S 1 E S 3 D P 3 Q 3 H J Q 1 F P 1 Q 2 C P S 2 2 G K P 3 P 2 S 3 C S 2 S 2 S 3 D E F G D H J K 11 Search Structure: Costructo Fd a oudg ox. Radomly permute the segmets. Isert the segmets oe by oe to the map. Update the map ad search structure each serto. The sze of the map s (). ) (Ths was prove earler.) The sze of the search structure depeds o the order of serto. 12 6

Updatg the Structures (Hgh Level) Fd the exstg structure the face that cotas the left edpot of the ew segmet. (*) () Fd all other trapezods tersected by ths segmet by movg to the rght. (I each move choose betwee two optos: Up or Dow.) Update the map M ad the search structure D. (*) Note: Sce edpots may be shared by segmets, we eed to cosder ts segmet whle searchg. 13 Update: Smple Case The segmet s cotaed etrely oe trapezod. I M -1 : Splt the trapezod to four trapezods. I D -1 : The leaf wll be replaced by a subtree. T Everythg s P doe O(1) tme. Q P C M -1 Q D S C D 14 7

Update M: : Geeral Case Geeral Case: The th segmet tersects wth k >1 trapezods. Splt trapezods. Merge trapezods that ca be uted. Total update tme: O(k ). 15 Updatg D: : Splt Each er trapezod D -1 s replaced by: S Each outer (e.g., left) trapezod D -1 s replaced by: P S C 16 8

Updatg D: : Merge Leaves are elmated ad replaced by oe commo leaf. Total update tme: O(k ). G H L C KD E F S S S S G H C D E F L K 17 Costructo: Worst-Case alyss Each segmet adds trees of depth at most (4-1=) 3, so the depth of D s at most 3. Query tme (depth of D ): O(), () the worst case. The th segmet, s, may tersect wth O() trapezods (() the worst case)! The sze of D ad ts costructo tme are the bouded from above by O( ) O( 2 ). 1 18 9

Costructo: Worst-Case alyss (cot.) Worst-case example: 19 Costructo: Worst-Case alyss (cot.) Worst-case example: O() 20 10

Costructo: Worst-Case alyss (cot.) Worst-case example: The sze of D ad ts costructo tme s the worst case. 2 1 (1) 1 2 ( ) ( 21 2 ) verage-case alyss We frst look for the expected depth of D. q: pot, to be searched for D. p : The probablty that a ew vertex was created the path leadg to q the th terato. Compute p by backward aalyss: q (M -1 ): The trapezod cotag q M -1. Sce a ew vertex was created, q (M ) q (M -1 ). Delete s from M. p = Prob[ q (M ) q (M -1 )] 4/. (Why?) 22 11

Expected Depth of D x : The umber of vertces created the th terato the path leadg to the leaf q. q The expected legth of the path leadg to q: E 1 x 12 Ex (3p ) O(log ). 1 1 1 23 Defe a dcator Expected Sze of D 1 dsappears from M (, s ) 0 otherwse f s k : Number of leaves created the th step. S : The set of the frst segmets. verage o s: 1 1 E[ k ] (, ) (, ) s s ss M ss M 1 (4 M ) (same backward aalyss) O( ) O(1). s removed 24 12

Expected Sze of D (cot.) k -1: Number of teral odes created the th step. Total sze: O( ) E leaves 1 ( k 1) O( ) E teral 1 k O( ). s 25 Expected Costructo Tme of D 1 O( E(depth )) O(E[ k ( O(log) O(1)) O( log ) 1 ]) Fdg the frst trapezod The rest of the work the th step 26 13

Hadlg Degeeraces What happes f two segmet edpots have the same x coordate? Use a shearg trasformato: x x y y y Hgher pots wll move more to the rght. should be small eough so that ths trasform wll ot chage the order of two pots wth dfferet x coordates. I fact, there s o eed to shear the plae. Comparso rules mmc the shearg. Prove: The etre algorthm remas correct. 27 14