CPKit
v1.6.1

Job Sequencing

GreedyMedium

Schedule jobs before deadlines to maximize revenue profit yields.

Alt+Shift+J

Configuration Panel

Deadline Slot Allocations (1D sequence)

Time Complexity

O(N^2) / O(N log N) with DSU optimized

Space Complexity

O(MaxDeadline) slots memory
Conceptual Overview

The Job Sequencing problem schedules jobs on a single machine where each job has a deadline and profit, assuming each job takes exactly 1 unit of time.

Greedy Choice Property

Sort jobs by profit descending. For each job, schedule it in the latest possible free slot before its deadline. If no slots are available, skip the job.

Optimal Substructure

An optimal sequence of jobs contains the highest profit job scheduled in its latest slot plus the optimal schedule for the remaining subset of jobs.

Proof Idea / Correction

Proof by exchange: if an optimal schedule does not select the highest profit job when a slot is free, swapping a lower profit job with it increases total profit, preserving scheduling rules.

Source: CP-Algorithms greedy reference