Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please explain and show all necessary work. 3. (Intermediate) (20 points) Interval Selection Problem (ISP) a.k.a. Action Selection in Ch 16.1. In ISP, we are

Please explain and show all necessary work.

image text in transcribedimage text in transcribed

3. (Intermediate) (20 points) Interval Selection Problem (ISP) a.k.a. Action Selection in Ch 16.1. In ISP, we are given n intervals (s1 fi), (a2, b2), (am, bm.), and are asked to find a largest subset of intervals that are mutually disjoint. See Ch 16.1. For simplicity, let's assume that all a, b values are distinct. We refer to a and bi as interval i's starting and ending times respectively. Also assume that intervals are ordered in increasing order of their ending times, i.e., b1 b2 bn. In class we learned that the greedy algorithm that repeatedly picks t interval i with the smallest ending time bi is optimal; of course, the newly chosen interval must be disjoint from the intervals we have chosen so far. In this problem, we want to prove the optimality of this greedy algorithm, which we call Earliest Ending (EE) (a) (0 point, just illustration) The greedy algorithm EE first chooses interval 1 since it has the earliest ending time. We claim that there exists an optimal solution that includes interval 1. Towards this end, consider an arbitrary optimal solution which consists of intervals ii, iz, ...,ij: as before, intervals are ordered in increasing order of their ending times. We observe that inte 1, i ...,iL are also mutually disjoint. This is because interval i ends before any of i ...2k starts, and interval 1 ends no later than interval i Hence we 21 obtained an optimal solution including interval 1, proving the desired claim. (b) (15 points) Extend the above argument: Let i2 be the second interval the greedy algo rithm ECE chose. Show that there is an optimal solution that includes intervals 1 and 22

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

Data Access Patterns Database Interactions In Object Oriented Applications

Authors: Clifton Nock

1st Edition

0321555627, 978-0321555625

More Books

Students also viewed these Databases questions

Question

Define the process of communication

Answered: 1 week ago

Question

Explain the importance of effective communication

Answered: 1 week ago

Question

* What is the importance of soil testing in civil engineering?

Answered: 1 week ago

Question

Explain the concept of shear force and bending moment in beams.

Answered: 1 week ago

Question

Question Can any type of stock or securities be used in an ESOP?

Answered: 1 week ago

Question

Question Can a self-employed person adopt a money purchase plan?

Answered: 1 week ago