A list of fixed time windows creates a selection problem when some tasks may be declined. Choosing the earliest-finishing available window can maximize the number of selected intervals under standard unweighted assumptions, but it need not maximize their total assigned value. A robotics planning prototype must state which objective it represents before adopting that rule. Weighted interval scheduling makes the objective and the required comparisons explicit.

State the exact problem

Each candidate has a fixed start, a fixed finish, and a nonnegative additive weight. Select a subset of mutually nonoverlapping candidates with maximum total weight on one resource. Windows cannot be moved, split, or shortened. This differs from ordering a mandatory collection of jobs whose starting times are decision variables.

Use half-open intervals [s,f), with s < f, so one interval may finish exactly when the next begins. Weights below are dimensionless invented scores, not prices, measured robot productivity, or validated task priorities. Real setup, travel, or handoff time is outside the basic model unless it has been encoded in the compatibility rules.

The Washington reading and Waterloo lecture notes derive include-or-exclude dynamic programming for this problem. The seven candidates and all numerical comparisons below are newly constructed, rather than copies of either source's scheduling example.

Sort seven candidate windows by finish

Use the following ordered records, written as identifier: interval, weight:

A: [0,3), 4.

B: [1,5), 7.

C: [3,6), 6.

D: [5,7), 5.

E: [6,9), 7.

F: [0,10), 16.

G: [7,11), 8.

Finish times are strictly increasing here, so their sorted order is unambiguous. In a general dataset, equal finish times need a reproducible ordering, while the recurrence still uses the stated compatibility relation.

The largest single weight is F's sixteen. Selecting it prevents every other listed interval from joining it. An earliest-finish scan instead selects A, then C, then E, for weight 4 + 6 + 7 = 17. Neither observation proves that seventeen is optimal.

Precompute the compatible predecessor

Number the sorted candidates one through seven. Define p(j) as the largest earlier index whose finish is no later than candidate j's start. Use zero if none exists. This is a boundary index for a prefix of the sorted list, not necessarily an interval that the final solution must select.

For A through G, the predecessor indices are [0,0,1,2,3,0,4]. C can follow A at time three, D can follow B at time five, and E can follow C at time six. G's latest compatible earlier finish is D's seven, giving p(7) = 4.

F starts at zero, so none of its predecessors is compatible. It consequently has p(6) = 0 despite appearing near the end of the finish-sorted list. Sorting by finish does not imply that every earlier candidate can precede the current one.

Evaluate both alternatives

Let M(j) be the maximum weight using only the first j candidates, with M(0) = 0. An optimal subset either excludes j or includes it. Exclusion permits the entire first j - 1 prefix. Inclusion gains w_j and leaves only the first p(j) candidates available. Therefore

M(j) = max(M(j - 1), w_j + M(p(j))).

For the example, the entries M(0) through M(7) are [0,4,7,10,12,17,17,20]. C's inclusion gives six plus M(1), or ten. D's inclusion gives five plus M(2), or twelve. E raises the best total to seventeen by joining an optimal compatible prefix worth ten.

F offers sixteen plus M(0), which loses to the existing seventeen. G offers eight plus M(4), or twenty, beating M(6) = seventeen. This final comparison certifies that both previously described greedy results miss the maximum weighted value.

Recover the chosen records

Begin at j = 7. Inclusion wins, so retain G and jump to p(7) = 4. At D, inclusion wins again; retain D and jump to p(4) = 2. Retain B and jump to zero. The selected set is {B,D,G}, with total 7 + 5 + 8 = 20.

Their windows meet at five and seven without overlap. The recurrence does not imply taking every interval with a locally favorable include decision while scanning forward. Backtracking must follow the predecessor jumps because each selected interval discards an incompatible range of candidates.

Ties can support different optimal subsets. A documented rule such as preferring exclusion on equal values chooses one reproducibly. The numerical maximum remains the same, but the selected identifiers may differ. Save both the optimum value and the recovered subset when an external process needs an inspectable decision.

Changing a weight changes the answer

If F's weight rises from sixteen to twenty-four, the first five prefix values stay unchanged. M(6) becomes twenty-four, and G's inclusion still offers only twenty. The final optimum is then {F}, with value twenty-four. The long window is not intrinsically undesirable; its tradeoff depends on the assigned objective.

This calculation also shows why maximizing count and maximizing weight are different specifications. A large number of accepted windows is not a substitute certificate for the largest total score, and the meaning of the scores must be established separately from solving the recurrence.

Cost and modeling boundaries

Sorting costs O(n log n). Binary search over sorted finish times computes each predecessor in O(log n), after which the value recurrence and backtracking require O(n) time and O(n) storage. Searching backward for every predecessor can instead take O(n^2); storing complete subsets at every prefix also uses more space than retaining decisions.

Multiple simultaneous resources, movable start times, sequence-dependent travel, and uncertain durations change the problem. The computed subset is optimal only for the supplied fixed intervals, compatibility convention, and additive weights. Keeping those inputs alongside the predecessor and value tables makes that limited mathematical conclusion independently checkable.

Sources checked October 24, 2026:

https://courses.cs.washington.edu/courses/cse417/25au/readings/weighted_interval_scheduling.html

https://cs.uwaterloo.ca/~mdtpetri/cs341/DynProg.pdf

Concept illustration: A small desktop robot beside a laptop showing a generic workflow provides robotics context for this analytical model. The image does not depict the article's numerical example, a verified experiment, a product specification, or deployment evidence.