Content deleted Content added
→Weighted: Clarified code and fixed a typo |
→Example: fixed the display of a latex image to use \ge instead of >= |
||
Line 71:
If we have the following 9 vectors sorted by finish time, with the weights above each corresponding interval, we can determine which of these vectors are included in our maximum weight schedule which only contains a subset of the following vectors.
[[File:Weighted Interval Scheduling.png|none|thumb|872x872px]]
Here, we input our final vector (where j=9 in this example) into our schedule function from the code block above. We perform the actions in the table below until j is set to 0, at which point, we only include into our final schedule the encountered intervals which met the <math display="inline">w[j]+M[p[j]]
{| class="wikitable"
!j
!Calculation
!<math display="inline">w[j]+M[p[j]]
(i.e. This vector is included in the final schedule)
!Set j to
|