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

  Journal of pharmaceutical sciences

This journal is a scientific publication of Indian Pharmaceutical Association and highlights various bright points of it.

  Optical fibres

This document discuss about the main attributes and characteristics of optical fibres.

  Micro organisms

This project report reveals the fact and proves a specific objective mentioned to be studied upon.

  Describing histology of an organ

The discussion of the technique should include a literature review on the evolution of the technique.

  Interpret the sensitivity of mammography

Calculate and interpret the sensitivity of mammography. Diagnostic test with Sensitivity 50%, Specificity 50% and prevalence 50%. Crude mortality rate. Damage caused by motor vehicle accidents.

  Discuss the role that science plays in your daily life

Role that science plays in your daily life and Integrity, Intensity, Innovation, and involvement in scientific field

  Prepare a flexible budget gator divers

Prepare a Flexible Budget Gator Divers is a company that provides diving services such as underwater ship repairs to clients in the Tampa Bay area.

  Neurological disorders

Designing a neuroprosthesis for the neurological disorders

  Complexity of cell surfaces

Lipid rafts provide another example of the complexity of cell surfaces in both their structural character and biologic functionality. Please explain the nature of these structures and their functionality.

  Exploratory activity on bird beaks

Describe how natural selection and evolution are demonstrated by this activity

  Spatial and temporal variation of heat content in the upper

In this study the temporal and spatial variation of heat content in the upper 70m layer of the Arabian Sea was for a period of 1991 to 2008 have been attempted.

  Earthquake databases

Earthquake Databases

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