Reference no: EM132697172
Question 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?
Question 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?
Question 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?
Firewalls and host and intrusion prevention systems
: Based on this course objectives of securing resources in a network and describing Firewalls and Host and Intrusion Prevention Systems,
|
Write brief description of functions of operational leaders
: Healthcare organizations must evaluate the strategic cultural foundation, including whether the state of healthcare is sustainable with the recognized shifts.
|
What is Wiley TIE
: Wiley's Wilderness pays 6 percent interest on its outstanding debt, which equals $200,000. The company's sales are $540,000, What is Wiley TIE
|
Discuss the negative effects of advertising on children
: How advertising for products, like cigarettes, marijuana, and/or alcohol, has evolved. Are the restrictions imposed on advertising such products necessary
|
Computer geographics-storage requirement of data structure
: Bound the query time and storage requirement of your data structure. What is the preprocessing time?
|
What were Bailey annual sales and DSO
: Last year, Delightful Desserts had a quick ratio of 1.8, a current ratio of 5.0, What were Bailey annual sales and DSO
|
Establishing a solid foundation of the vision and mission
: The vision, mission, values, and strategic goals are appropriately called directional strategies because they guide healthcare executives at the time of making.
|
Discuss the ethical considerations of businesses promoting
: Discuss the ethical considerations of businesses promoting causes and selling products. For example, can Labatt's have an ad campaign warning people
|
What were WWI sales revenues and net profit margin
: At the end of the year, Water Works International (WWI) had $10,000 in total assets. What were WWI sales revenues and net profit margin
|