Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Somewhere around the Mediterranean, a group of n Roman legionaries is fight- ing against n Carthaginian solders. Each Roman carries special arch, which can

 

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.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Statistical Inference

Authors: George Casella, Roger L. Berger

2nd edition

0534243126, 978-0534243128

More Books

Students also viewed these Programming questions

Question

10. What is amyloid-b and how does it relate to Alzheimers disease?

Answered: 1 week ago