Somewhere around the Mediterranean, a group of n Roman legionaries is fight- ing against n Carthaginian...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Somewhere around the Mediterranean, a group of n Roman legionaries is fight- ing against n Carthaginian solders. Each Roman carries special arch, which can throw an arrow that kills the enemy immediately. The arrow goes in a stright line and stops when it hits the enemy. The Romans decide to pair off with the Carthaginians, forming n pairs, and then each Roman will shoot an arrow at his chosen enemy. Arrows cannot cross directions, so the Romans must choose no crossing lines to hit the enemy. Assume the position of each Roman legionary and each Carthaginian is a fixed point in the plane and no three positions are colinear. 1. Argue that there exists a line passing through one Roman and one Carthaginian such that the number of Romans on one side of the line equals the number of Carthaginians on the same side. Describe how to find such a line in O(n log n) time. 2. Give an O(n log n)-time algorithms to pair Romans with Carthaginians in such a way that no fire lines cross. Somewhere around the Mediterranean, a group of n Roman legionaries is fight- ing against n Carthaginian solders. Each Roman carries special arch, which can throw an arrow that kills the enemy immediately. The arrow goes in a stright line and stops when it hits the enemy. The Romans decide to pair off with the Carthaginians, forming n pairs, and then each Roman will shoot an arrow at his chosen enemy. Arrows cannot cross directions, so the Romans must choose no crossing lines to hit the enemy. Assume the position of each Roman legionary and each Carthaginian is a fixed point in the plane and no three positions are colinear. 1. Argue that there exists a line passing through one Roman and one Carthaginian such that the number of Romans on one side of the line equals the number of Carthaginians on the same side. Describe how to find such a line in O(n log n) time. 2. Give an O(n log n)-time algorithms to pair Romans with Carthaginians in such a way that no fire lines cross.
Expert Answer:
Related Book For
Posted Date:
Students also viewed these programming questions
-
Managing Scope Changes Case Study Scope changes on a project can occur regardless of how well the project is planned or executed. Scope changes can be the result of something that was omitted during...
-
Portray in words what transforms you would have to make to your execution to some degree (a) to accomplish this and remark on the benefits and detriments of this thought.You are approached to compose...
-
Prepare an adjusted trial balance on May 31. Wildhorse's Hotel opened for business on May 1, 2022. Its trial balance before adjustment on May 31 is as follows. Account Number 101 126 130 140 141...
-
A signal has a wavelength of 1m in air How far can the front of the wave travel during 1000 periods?
-
A jet fighters position on an aircraft carriers runway was timed during landing: where x is the distance from the and of the carrier. Estimate (a) Velocity (dx/dt) and (b) Acceleration (d/dt) using...
-
The probability that a wafer contains a large particle of contamination is 0.01. If it is assumed that the wafers are independent, what is the probability that exactly 125 wafers need to be analyzed...
-
Paul Smith is opening a plumbing supply store in University City. He plans to sell plumbing parts and materials to both wholesale and retail customers. Since contractors (wholesale customers) prefer...
-
During COVID, the government provided low-income families with a child tax credit. That policy had a major impact on child poverty in the United States. Now that the credit is going away, child...
-
In this mini-case you will perform some procedures required as a part of audit planning. For ease your audit manager has already organized the workpapers and completed several of the required...
-
Marvel Inc., a registered charity, has received four contributions during the past year: - a delivery van with a value of $30,000 and a useful life of 5 years (with no salvage value); the charity...
-
A piano wire with mass 3.35 g and length 78.0 cm is stretched with a tension of 32.0 N. Awave with frequency 115 Hz and amplitude 1.90 mm travels along the wire Part A Calculate the average power...
-
1. Find the moment of the 500 N force shown about Point A. Write your answer using 2 significant digits. 200 mm B A 30 250 mm F = 500 N
-
a company's net sales are $12.3 million this year, and the gross margin is expected to be 76%. What is the cash full impact if the business experience is a 74% gross margin instead? Explain
-
Search Engine Advertising: Paid Clicks vs. Organic clicks (10 points) Nancy, a micro-entrepreneur, operates an online store that sells gardening items. She is considering employing paid search...
-
Description You have been asked to draft an Employment Contract for a Marketing Specialist role at XBA Marketing Solutions Inc. (hereinafter "XBA"), a small company which assists clients in marketing...
-
In a pipeline, water is flowing. A manometer is used to measure the pressure drop for the flow through the pipe. The difference in level was found to be 20 cm. If the manometric fluid is CCI4, find...
-
If the joint cost function for two products is C(x, y) = xy2 + 1 dollars (a) Find the marginal cost (function) with respect to x. (b) Find the marginal cost with respect to y.
-
Let X1,..., Xn be iid negative binomial(r, p). We want to construct some approximate confidence intervals for the negative binomial parameters. (a) Calculate Wilks' approximation (10.4.3) and show...
-
Suppose that random variables Yij are observed according to the overparameterized oneway ANOVA model in (11.2.2). Show that, without some restriction on the parameters, this model is not identifiable...
-
Suppose that 5% of men and .25% of women are color-blind. A person is chosen at random and that person is color-blind. What is the probability that the person is male? (Assume males and females to be...
-
A typical muscle fiber is 2.0 cm long and has a cross-section area of 3.1 10-9 m 2 . When the muscle fiber is stimulated, it pulls with a force of 1.2 mN. What is the work done by the muscle fiber...
-
You are pulling a child in a wagon. The rope handle is inclined upward at a 60 angle. The tension in the handle is 20 N. How much work do you do if you pull the wagon 100 m at a constant speed?
-
A wind turbine works by slowing the air that passes its blades and converting much of the extracted kinetic energy to electric energy. A large wind turbine has 45-m-radius blades. In typical...
Study smarter with the SolutionInn App