Describe how to build efficient data structure

Assignment Help Science
Reference no: EM132736665

1. In this chapter we have looked at the point location problem with pre- processing. We have not looked at the single shot problem, where the subdivision and the query point are given at the same time, and we have no special preprocessing to speed up the searches. In this exercise and some of the following ones, we have a look at such problems.

Given a simple polygon P with n vertices and a query point q, here is an algorithm to determine whether q lies in P. Consider the ray ρ := {(qx +λ,qy) : λ > 0} (this is the horizontal ray starting in q and going rightwards). Determine for every edge e of P whether it intersects ρ. If the number of intersecting edges is odd, then q ∈ P, otherwise q à∈ P.

Prove that this algorithm is correct, and explain how to deal with degen- erate cases. (One degenerate case is when ρ intersects an endpoint of an edge. Are there other special cases?) What is the running time of the algorithm?

2. Suppose you are given an n-vertex simple polygon, P. Describe how to build an efficient data structure for determining in O(log n) time whether a query point, q, is inside of P or not. What is the space and preprocessing time for your data structure?

3. The ray shooting problem occurs in computer graphics (see Chapter 8). A 2-dimensional version can be given as follows: Store a set S of n non-crossing line segments such that one can quickly answer queries of the type: "Given a query ray ρ-a ray is a half-line starting at some point-find the first segment in S intersected by ρ." (We leave it to you to define the behavior for degenerate cases.) In this exercise, we look at vertical ray shooting, where the query ray must be a vertical ray pointing upwards. Only the starting point need be specified in such a query. Give a data structure for the vertical ray shooting problem for a set S of n non-crossing line segments in general position. Bound the query time and storage requirement of your data structure. What is the preprocessing time?

Reference no: EM132736665

Questions Cloud

Find balance sheet reflect total liabilities associated : Interest at year end, the company's December 31, Year 1 balance sheet should reflect total liabilities associated with the bond issue in the amount of
The scalability and efficacy of existing analytics technique : The scalability and efficacy of existing analytics techniques being applied to big data must be empirically examined.
How much is the potential loss of Indonesia in the event : Next BVI Inc lent the money to Mart Co and Mart Co lent the same amount of money to PT Indoindo. How much is the potential loss of Indonesia in the event
What is the depreciable basis for the machinery : She is taking the maximum limited expensing election on the machinery. What is the depreciable basis for the machinery going forward?
Describe how to build efficient data structure : Describe how to build an efficient data structure for determining in O(log n) time whether a query point, q, is inside of P or not.
Find the annual interest paid to the bondholder : A bond with a face value of $6000 and a 4.2% coupon has a 5 year maturity. Find the annual interest paid to the bondholder
Describe the difference in the characteristics of the costs : Describe the difference in the characteristics of the costs that would belong to the four main types of cost behaviors. The response must be typed.
Which would be the best indicator of relative profitability : While determining the most profitable company from the given number of companies, which of the following would be the best indicator of relative profitability?
Compute the tax payable by Mr Bo Kau Looi for the year : Mr Bo writes songs for Radio Malaysia. Royalties of RM22,500 from the publishing of his songs. Compute the tax payable by Mr Bo Kau Looi for the year

Reviews

Write a Review

Science Questions & Answers

  Transtheoretical model versus the health belief model

Compare (similarities and differences) the theoretical constructs of the Transtheoretical Model and the Health Belief Model.

  Peripheral or semiperipheral

Using information found in our text, discuss ONE PERIPHERAL or SEMIPERIPHERAL NATION through the lens of World Systems Theory. (Optional: you may also use information from other reputable sources in addition to our text.)-- Explain why this nation is..

  What are the therapeutic actions for lidocaine

What are the therapeutic actions for lidocaine and propranolol? What are the indications and pharmacokinetics for diltiazem?

  Women and healthcare 2 issues

Describe a workforce diversity plan using at least three dimensions of diversity. Additionally, explain how it relates to improved health-service delivery.

  Develop method for formulating ethical decisions

Your practice will help you develop a method for formulating ethical decisions.

  Explain african mericancultures view of food

Explain African mericanculture's view of food (gratification, lack of discipline, etc.).

  What is the bioethical issue or decision at hand

Bioethical Analysis Worksheet Scenario: Chang and Fang Yin are a married couple living in China. They have decided to have a child and Fang Yin is at a stage in her pregnancy where the sex of the child can be determined. What is the bioethical iss..

  Determining the semi-major axis

Based on this data, which planet must be more massive? How does the data make this clear?

  Explain the concept of risk-based corrective action

Explain the concept of Risk-Based Corrective Action

  Discuss the facility case management program

Describe and discuss the facility's Case Management program. Identify areas for improvement in the facility's Case Management program,

  What is the difference between presidentialism and thatcheri

What is the difference between Presidentialism and Thatcherism?

  Show the processes of standard gravity fermentation

Compare the processes of standard gravity fermentation and high gravity fermentation discussing the advantages and disadvantages of each.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd