The optimality of the greedy solution can be seen by the exchange argument as follows. Without loss of generality, suppose that all profits are different and that jobs are sorted in descending order of profit.
S. , .
, S1 - . i I_i:=[0,min(n,deadline(i))] ( ). , i, ( , , ). i I_i.
, .
S S' propoerties.
S' S, .i S i I_i .i S i I_i.S' , S.
, S* . S - , . , S 2 3 . i - , S, S*. pos - i S. pos S*, S* , i, S*. pos S*, i' at pos S* , i, i' pos S. , , i. , i S*, S*.