Interval scheduling: Difference between revisions

Content deleted Content added
m Example: Made table not collapsible
m Example: made writing more clear
Line 72:
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 Example.png|none|thumb|701x701px]]
Here, we start withinput our final vector (where j=9 in this example), and input it into our schedule function infrom the code block above. We perform thesethe 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]] >= M[j-1]</math> requirement. This final schedule is the schedule with the maximum weight.
{| class="wikitable"
!j