Activity scheduling problem from the greedy algorithm class: Suppose that different activities earn different amounts of revenue. In addition to their start and finish times si and fi, each activity ai has revenue ri, and our objective is now to maximize the total revenue: