Task Schedulling problem

6 views
Skip to first unread message

Varun Shinde

unread,
Feb 10, 2010, 3:34:10 PM2/10/10
to VANI_GATE_CS_2010
Consider the following task and deadlines
task : t1 t2 t3 t4 t5 t6 t7 t8 t9
profit :15 20 30 18 18 10 23 16 25
deadlines :7 2 5 3 4 5 2 7 3
What is the optimal schedule and the profit earned from optimal
schedule?

i solved it with the approach i know with that i am getting answer as
137..but the answer is 147
options are
a) 147 b) 165 c) 167 d) 175
plz tell the approach..

Mayur Mahrotri

unread,
Feb 10, 2010, 3:52:22 PM2/10/10
to vani_gat...@googlegroups.com
Solve again. I am getting 147.
--
With Regards,
Mayur.

Varun Shinde

unread,
Feb 10, 2010, 11:18:10 PM2/10/10
to VANI_GATE_CS_2010
@mayur
hey plz tell the approach just in short bcoz i tried it but i am not
getting....

On Feb 11, 1:52 am, Mayur Mahrotri <mayurmahro...@gmail.com> wrote:
> Solve again. I am getting 147.
>

Sagar Joshi

unread,
Feb 10, 2010, 11:58:29 PM2/10/10
to vani_gat...@googlegroups.com
make a table:
 
                        ------------------------------------------------
pr. no.     |   |   |   |t5 |t3 |t1 |t8 |
deadl       |   |   |   |   |   |   |   |
            -----------------------------
                            1       2      3      4     5        6     7
 
Start from RHS. Select task with 7 as deadline and max profit. So it is t8.
Now look for tasks with deadline >= 6. Select one with max profit, it is t1.
deadline >= 5. we have t3. deadline >= 4 here opts are t7 and t5. we select t5.
and so forth.
We get sequence as t2,t7,t9,t5,t3,t1,t8.
 
I hope u understand
--
-----------------------------------------------------------

I dont need drugs, I get high with Music!

-----------------------------------------------------------
Reply all
Reply to author
Forward
0 new messages