Explain how to determine line in o-n lg n time

Assignment Help Data Structure & Algorithms
Reference no: EM1372103

A group of n Ghostbusters is battling n ghosts. Each Ghostbuster is armed with a proton pack, which shoots a stream at a ghost, eradicating it. A stream goes in a straight line and terminates when it hits the ghost. The Ghostbusters decide upon the following strategy. They will pair off with the ghosts, forming n Ghostbuster-ghost pairs, and then simultaneously each Ghostbuster will shoot a stream at his chosen ghost. As we all know, it is very dangerous to let streams cross, and so the Ghostbusters must choose pairings for which no streams will cross. Assume that the position of each Ghostbuster and each ghost is a fixed point in the plane and that no three positions are collinear.

a. Argue that there exists a line passing through one Ghostbuster and one ghost such the number of Ghostbusters on one side of the line equals the number of ghosts on the same side. Describe how to find such a line in O(n lg n) time.

b. Give an O(n^2 lg n)-time algorithm to pair Ghostbusters with ghosts in such a way that no streams cross.

Reference no: EM1372103

Questions Cloud

Find profit-maximizing output and price : A company under monopolistic competition faces the demand curve: P = 500 - 12.5Q. The company's marginal cost is MC = 200 + 5Q.
Erikson stages of development : Explain Erikson's stages of development as each applies to your own personality formation. How did success at one stage make you for meeting the next challenge.
Concept of bureaucracy : Making direct reference to your reading assignments, discuss what is meant by the machine metaphor of modern organizations. How does this machine metaphor of organizations apply to Weber's concept of bureaucracy?
Determine average streaming media data rate : Assume we can accurately forecast set of WAPs that the taxi will visit. Determine average streaming media data rate that we can sustain by downloading prefetched data from WAPs?
Explain how to determine line in o-n lg n time : Explain how to determine such a line in O(n lg n) time. Provide the O(n^2 lg n)-time algorithm to pair Ghostbusters with ghosts in such a way that no streams cross.
Theory of human relations : Consider the following scenario: You're a plant foreperson at a highly-productive and competitive factory. Your manager approaches you with a concern about last month's productivity for the unit for which you are responsible.
Explain about supply chain strategies : Cite industry examples for at least two of the six Supply Chain strategies introduced in class and a brief description is expected for each example.
Write program which translates letter grade into grade : Write a C++ program which translates the letter grade into a number grade. Letter grades are A B C D F, possibly followed by + or -. Their numeric values are 4, 3, 2, 1, and 0.
Develop a bipolar transistor amplifier with a voltage gain : The aim of this experiment is to develop a bipolar transistor amplifier with a voltage gain of minus 25. The amplifier must accept input signals from a source impedance of 1 kW and provide an undistorted output amplitude of 5 V when driving a 560..

Reviews

Write a Review

Data Structure & Algorithms Questions & Answers

  Simplify rsa cryptosystem using prime number

Assume we tried to simplify RSA cryptosystem using just prime p instead of composite modulus N = pq. As in RSA, we would have encryption exponent.

  Determine the mean salary as well as the number of salaries

Determine the mean salary as well as the number of salaries.

  Create a binary search tree program

Creating a Binary Search Tree program - Finding the largest and smallest values in the tree Add two class methods

  Evaluate the average complexity of an enqueue operation

Evaluate the average complexity of an enqueue operation. Determine the average complexity of the dequeue (remove) operation.

  Write adjacency-list representation for complete binary tree

Provide the adjacency-list representation for complete binary tree on 7 vertices. Provide the equivalent adjacency - matrix representation. Suppose that vertices are numbered from 1 to 7 as in binary heap?

  Process of insertion into a heap-implemented priority queue

Explain the process of insertion into a heap-implemented priority queue, and informally explain its complexity and the process of removal from a heap-implemented priority queue, and informally explain its complexity.

  Find shortest path tree by bellman-ford-dijkstra algorithm

Find the shortest path tree from every node to node 1for the graph of following figure using Bellman-Ford and Dijkstra algorithm.

  Find fraction of time during which queue grows

Suppose now there are three users. Find the probability that at a given time, all three users are transmitting simultaneously. Find the fraction of time during which the queue grows.

  Testing item in array of member using sequential search

Look up each test item in array of member items, by using sequential search. What is the worst-case running time of it. (asymptotically, in terms of n and k)?

  Computing minimal length of key-average cracking time given

If Encrypt-It-Rite would like to increase average cracking time to at least 100 years, determine the minimal length of the key?

  Determining hash value of modified file

Determine hash value of modified file look like, as compared with original hash value?

  Explain good algorithms to solve character pathfinding

You are working on the new computer game. One of implementation problems you are trying to solve is character pathfinding. What algorithms would be good to use and explain why?

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