find the optimal schedule for a set of events