GATE CSE
First time here? Checkout the FAQ!
x
0 votes
94 views

Your final exams are over and you are catching up on watching sports on TV. You have a schedule of interesting matches coming up all over the world during the next week. You hate to start or stop watching a match midway, so your aim is to watch as many complete matches as possible during the week.
Suppose there are $n$ such matches scheduled during the coming week and you know the starting and finishing time for each match.

Develop an algorithm based on dynamic programming to compute the maximum number of complete matches you can watch next week. Analyze the worse-case complexity of your algorithm.

asked in Algorithms by Veteran (283k points)   | 94 views

1 Answer

0 votes

arjun sir, i need ur favour,so that i may solve the problem

Is this problem a bit similar to NON-PRE-EMPTIVE SJF:

where start time of match is same as ARRIVAL TIME of process.

end time of match is same as COMPLETION TIME of process.

  time duration of match is same as BURST TIME  of process.

hate to start & stop is same as non-pre-emption.smiley

 

answered by Boss (8.9k points)  
Yes, it is same. But only issue is we have a fixed time limit within which to finish all the jobs- which is usually not there in process scheduling problem.
ok
Activity selection problem using dynamic programming can be the answer


Top Users Apr 2017
  1. akash.dinkar12

    3660 Points

  2. Divya Bharti

    2580 Points

  3. Deepthi_ts

    2040 Points

  4. rude

    1966 Points

  5. Tesla!

    1768 Points

  6. Debashish Deka

    1614 Points

  7. Shubham Sharma 2

    1610 Points

  8. Prashant.

    1492 Points

  9. Arjun

    1472 Points

  10. Arunav Khare

    1464 Points

Monthly Topper: Rs. 500 gift card

22,086 questions
28,063 answers
63,297 comments
24,169 users