Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This is for a activity selection problem for scheduling several competing activities that require exclusive use of a common resource, with a goal of selecting

This is for a activity selection problem for scheduling several competing activities that require exclusive use of a common resource, with a goal of selecting a maximum-size set of mutually compatible activities. Suppose we have a set S = {a1, a2, , an} of n proposed activities that wish to use a common resource. The resource can serve only one activity at a time. Assume that each activity is represented by an interval. For example, the activity aj = [sj, fj) starts at sj and finishes at fj. The length of the activity aj = [sj, fj) is defined as fj - sj.

- Sort all the activities in the increasing order of their interval lengths. Instead of always selecting the first activity to finish, we instead select the activity with the shortest interval that is compatible with all previously selected activities.

- Give a counter example to show that this greedy approach DOES NOT always yield an optimal solution.

- What is the solution given by this greedy approach on the counter example?

- What is the optimal solution of this counter example?

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

More Books

Students also viewed these Databases questions

Question

Develop skills for building positive relationships.

Answered: 1 week ago

Question

Describe techniques for resolving conflicts.

Answered: 1 week ago

Question

Give feedback effectively and receive it appropriately.

Answered: 1 week ago