The following algorithm is an example of a greedy algorithm which provides an efficient algorithm for approximately solving the above scheduling problem including the fact that it is desired to select ni programs for each customer i (the viewing appetite).