I may be naive or wrong here, but I think it is not too difficult (although not obvious) to see that the algorithm is really optimal.
Suppose you have an optimal list section with a maximum number of subscribers. You may or may not have all the list items, but since adding an item to a valid list also results in valid lists, it can be assumed that any possible βremainingβ item that was not originally assigned to any subscriptions was randomly assigned to one of its related subscriptions; therefore, we have a proper optimal list partition, which we will call P1.
Now let's think about a section that would create a greedy algorithm, say, P2. There are two things that can happen for the first P2 subscriptions:
- It may be the same as the first subscription in P1.
- It may be shorter than the first subscriptions in P1.
In 1. you repeat the argument, starting with the next item after the first sublist. If each subsequent sub-list created by the algorithm is equal to that in P1, then P1 and P2 will be equal.
In 2. you also repeat the reasoning, but now you have at least one βadditionalβ subject. So, the following sublist may:
2.1. Get to the next sublist in P1.
2.2. End before the next sublist in P1.
And repeat. So, in each case, you will have at least as many subscribers as P1. This means that P2 is at least as good as any possible section of the list and, in particular, any optimal section.
This is not a very formal demonstration, but I consider it valid. Please indicate what you think is wrong.
source share