What is the running time of the algorithm

Assignment Help Other Subject
Reference no: EM132699581

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?

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: EM132699581

Questions Cloud

Describe the research paradigm in brief : Review your notes from class on the different methodologies and instruments used to measure. Also, review the examples via the links here Approaches Expectation
Write a paper on the future of digital currency litigation : Prepare a 3-5 page paper on the future of digital currency litigation and the implications for taxation. What are the pros and cons? How will this ultimately.
Research project on the surveillance state : Your Research Project on the surveillance state consists of two parts: 750 word research paper with at least 3 sources. There should be no lists.
What actions must be taken in response to security incident : What actions must be taken in response to a security incident? What is computer forensics, and what role does it play in responding to a computer incident?
What is the running time of the algorithm : 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.
Discussion on the topic search engine and optimization : Topic: Search Engine And Optimization (research paper) need to work at least 750 words. Chapter 3 is considered to be the CORE of the research study you will.
Why this oauth is important for your peers to understand : Write 500 words or more explaining why this "OAuth" is important for your peers to understand. Be focused and specific. You should do a deep dive into a topic.
What about services that have largely been ignored : Forecasting provides very useful projections for established products and services, but newly introduced products and services have wildly different success.
Analyze asymmetric and symmetric encryption : You will analyze asymmetric and symmetric encryption. Evaluate the differences between the two of them and which one that you would determine is the most.

Reviews

Write a Review

Other Subject Questions & Answers

  Perform web search on term software usability and navigation

Using your favorite search engine, perform a web search on the terms "software usability and navigation." In a written report, first provide a definition for usability.

  Do you believe that jury consultants are effective

Jury consultants gained notoriety after their involvement with such high-profile cases as OJ Simpson, Casey Anthony, and George Zimmerman. Some have criticized.

  Atticus tells jem not to shoot at mockingbirds

Relating to the part in chapter ten when Atticus tells Jem not to shoot at mockingbirds. How can I take that deeper as to compare that with other parts in the book and the world?

  Do these non-compete clauses fundamentally and necessarily

Secondly, very often the sale of business contains provision that demand that the seller of the business not compete in any like-kind business as a condition of the sale. Do these non-compete clauses fundamentally and necessarily interfere with c..

  Discuss how winner-take-all economy was made

Discuss how the winner-take-all economy was made? Discuss how we can renew Democratic Capitalism and beat the winner-take-all political problem?

  Develop the response plan as a member of the emergency

Develop the response plan as a member of the emergency and crisis management team for your chosen scenario.

  Some states to abandon indeterminate sentence and parole

What were some of the major criticisms that led some states to abandon the indeterminate sentence and parole?

  Write a fictional scenario that describes the emergence

BUGEN 5930 - Business, Society and the Planet - Application of GVV Framework - Develop a fictional scenario that outlines the emergence of an ethical dilemma

  Calculate the standard error for a survey comparing

Calculate the standard error for a survey comparing proportions of cognition-enhancing drug use of fraternity members to non-fraternity members, where

  What are the major soil issues in the choosen area

What are the major soil issues in the choosen area? What conservation efforts have taken place or are in the process for this area?

  Assignment on the statute of frauds

Johnny needs to buy a lawn mower. His lawn is relatively modest, so he began looking for an affordable model.

  Compare the magnitude of healthcare costs

From the second e-Activity, compare the magnitude of healthcare costs in the United States to that of other developed countries.

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