2 votes 2 votes Algorithms algorithms job-scheduling numerical-answers test-series + – bahirNaik asked Jan 14, 2016 • retagged Jul 16, 2022 by makhdoom ghaya bahirNaik 1.2k views answer comment Share Follow See all 7 Comments See all 7 7 Comments reply Show 4 previous comments bahirNaik commented Jan 15, 2016 reply Follow Share See how I approached the problem ,first I arranged the Tasks in ascending order of their deadline. Then Except the T2 I selected the task that would maximize the profit in the respective time slots. for time slot 1 selected T9 --- 20 slot 3 I selected T7 --- 24 slot 4 - T5 --25 slot 5- T 10 - 15 slot 6 - 18 20+24+25+15+18=102 So to get max profit as 129 in slot 2 we select the profit to be 27 @amsar review this ! 0 votes 0 votes Himanshu1 commented Jan 15, 2016 reply Follow Share Firstly we order the tasks according to their profits , not deadlines.. 0 votes 0 votes bahirNaik commented Jan 15, 2016 reply Follow Share I tried that way not getting optimal sol.Seems I am missing some point.pls can you explain a bit more !! thanks 0 votes 0 votes Please log in or register to add a comment.
Best answer 2 votes 2 votes Answer will be 25. Steps - 1- Check whether we even need t3 or not. Solve without t3. if the sum is less than the desired we need t3 in the calcuation. 2-Deadline of t3 is 2. Right now T2 is on the the position 2. So if we want to enter the t3. there are tow places for t3 either 1 or 2 for place 1 the profit of t3 should be less than 22. for getting position 2 the profit should be either 22 or greter. 3- If the place is 1. we can't get the required sum. If we place t3 on position 2 it will make 22 to go on position 1. So now after putting t2 on position 1 solve and u will get 25. Tendua answered Nov 17, 2016 • selected Nov 17, 2016 by vijaycs Tendua comment Share Follow See all 0 reply Please log in or register to add a comment.
2 votes 2 votes x=25 is the answer. Payal Rastogi answered Oct 21, 2016 Payal Rastogi comment Share Follow See all 0 reply Please log in or register to add a comment.
1 votes 1 votes X = 25 is correct answer, as mentioned by Payal earlier. Most probable error we make in this pblm is we consider process t9 in first slot. But eligible ones are t1, t2 and t9. We have to consider 22 profit in slot 1 SudheerM answered Oct 22, 2016 SudheerM comment Share Follow See all 0 reply Please log in or register to add a comment.