Question

Consider the following greedy strategies for this problem: 1. Select the earliest finishing interval and discard overlapping

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

Solution :-

1.)  Earliest finishing interval is the optimal greedy solution so there is no counter case.

2.)  Take the example of 3 intervals (2,12), (3,5) and (6,9) then using earliest start time algo we can only choose (2,12) but optimal solution will be 2 (choosing (3,5) and (6,9) ).

3.) Take the example of following intervals :- (2,9), (3,6), (8,12), (10,17), (15,19)

using given algorithm we will choose pairs (2,9) and (10,17) because of having minimum gap interval and then discard the others because they are not compatible with these.

But optimal answer is 3. we can choose the intervals (3,6), (8,12) and (15,19).

If you like the solution please give it a thumbs up!! and if have further queries please write in the comment section.

Add a comment
Know the answer?
Add Answer to:
Consider the following greedy strategies for this problem: 1. Select the earliest finishing interval and discard...
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
ADVERTISEMENT