You are given a sequence of jobs. The no. of days which each job takes
to complete is also provided.
You are also given the penalty amount to be paid per day each day a
job left done. Give an optimal ordering
among jobs to minimize penalty. There are no concurrent jobs.

eg:
Jobs:                                  J1 J2 J3
no. of days to complete:       1  10  4
Penalty incurred each day    1000 30 40
the job is pending

output:
Schedule is J1 J3 J2
hence, J1 goes for 1st day. J3 for subsequent 4 days. J2 for the next
10 days.

Penalty incurred = (delay for job i ) * (penalty per day of job i) =
                        = (0)(1000) + (1)(40) + 5(30) = 190




-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to