sol5 - Homework#5 solutions IEOR4405 1 1 Let f(j t denote...

Info icon This preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Homework #5 solutions / IEOR4405 1 1. Let f ( j, t ) denote the maximum weight set of jobs that can be completed by time t , using jobs 1 , 2 , ..., j (with j = 1 , 2 , .., 4 and t = 1 , 2 , ..., 10). We use the recurrence f ( j, t ) = max( f ( j - 1 , t ) , f ( j, t - 1) , f ( j - 1 , t - p j ) + w j ) , with the initialization f (0 , t ) = 0 for all t and f ( j, 0) = 0 for all j . The algorithm generates the values for f ( j, t ) given in the table below. They are generated row-by-row and every row is calculated from left to right. The optimal value is 18 and the corresponding schedule is 1-2-4-3. j \ t 0 1 2 3 4 5 6 7 8 9 10 0 0 0 0 0 0 0 0 0 0 0 0 1 0 6 6 6 6 6 6 6 6 6 6 2 6 6 10 10 10 10 10 10 10 10 10 3 0 6 6 10 10 10 12 12 16 16 16 4 0 6 6 10 10 10 13 13 17 17 17 5 0 6 6 10 10 10 13 14 14 17 18 2 Let f ( j, w ) be the minimum deadline d by which you can schedule jobs 1 , 2 , ...j and have the weight of the jobs processed atleast w . In a given state ( j, w ), we have the option to either choose the j th job or skip it. If the j th job is chosen, then we incur a processing time of p j units of time, and we enter state f ( j - 1 , w - w j ). Otherwise, we enter state, f ( j - 1 , w ) since there was no processing involved. Hence, the recursion will have the particular structure, f ( j, w ) = min ( f ( j - 1 , w ) , p j + f ( j - 1 , w - w j )) While filling the table, one can use backward induction and can start filling from the last element of the matrix.(lower right corner). Read the element in the matrix which has the value closest to but less than the specified deadline. Find the corresponding w 0 j
Image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern