Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

As illustrated in the figure below, you are walking along the X axis back and forth and there are n balloons floating above you. The

As illustrated in the figure below, you are walking along the X axis back and forth and there are n balloons floating above you. The balloons were left by kids who were here earlier. One thing you know is that if two balloons overlap horizontally, then they cannot belong to the same kid (as a kid only releases one balloon at a time). For example, in the figure, the leftmost balloons with labels 1 and 2 cannot belong to the same kid, since their horizontal ranges (along X) marked by their left and right boundaries overlap.

Given balloons each described as a center location and a radius (), you need to infer the minimum number of kids who were here earlier. For example, in the example in the figure, there were at least 3 kids, and each balloon is labeled by the corresponding kid number. Design an efficient algorithm to determine the minimum number of kids, and an assignment of kid number to each balloon. There can be many assignments and you only need to find one of them. Prove its correctness and analyze its complexity.

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_2

Step: 3

blur-text-image_3

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

Object Databases The Essentials

Authors: Mary E. S. Loomis

1st Edition

020156341X, 978-0201563412

More Books

Students also viewed these Databases questions

Question

=+Will the firm need to hire employees with new skills?

Answered: 1 week ago