Question

Let {a1,a2,...,ak} be a set of activities, where, a1 has the largest (latest) start time. Prove...

Let {a1,a2,...,ak} be a set of activities, where, a1 has the largest (latest) start time.

Prove there is an optimal solution to the activity selection problem that contains a1.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

As per your requirement the below one is solution please follow it

For the activity selection problem the algorithm is

I) Sort the activities by their finishing time.(if finish time same so choose one smallest start time).

II) Pick up th first activity and include it

III) For all remaining activity check the start time of new activity from the finish time of current activity. If start time is greater or equal to finish time of current include the activity and change the current start time and finish time

to this activity.

a1 largest start time.

Case 1: If finish time of other activitiy/es is smaller than a1 start time both a1 and that activity is included.

Case 2 : If finish time of other activity/es is greater than a1 finish time then a1 is included( that activity excluded) since next activity to be included start time of new activity compared to current finish time

and new activity becomes current.

Add a comment
Know the answer?
Add Answer to:
Let {a1,a2,...,ak} be a set of activities, where, a1 has the largest (latest) start time. Prove...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT