I'm looking for an online algorithm that takes a stream of elements and preserves the elements that are on the Pareto frontier (e.g. all non-dominated elements).
For instance. Given the following inputs, the retained Pareto frontier set would evolved as follows:
(3,7)
- insert element b/c it's the first element
- pareto set now includes
{(3,7)}
(7,3)
- insert element b/c it's not dominated in the first
- pareto set now includes
{(3,7), (7,3)}
(8,4)
- insert element b/c it's not dominated; remove
(7,3)
which it is dominated in both dimensions - pareto set now includes
{(3,7), (8,4)}
- insert element b/c it's not dominated; remove
(1,1)
- do not insert because it's dominate in both dimensions
- pareto set now includes
{(3,7), (8,4)}
(9,9)
- insert element b/c it's not dominated; remove all other elements because this dominates them in both dimensions
- pareto set now includes
{(9,9)}
In my example I'm using 2-tuples, but I'm looking for an algorithm that could handle N-tuples for "small" N (say <10).
The naive solution is to just to compare each element with all elements currently in the set. In practice the naive approach might not be so bad (e.g. sub $O(n^2)$) because elements will regularly be expelled by the comparison set. But I was wondering if there was a known efficient algorithm for this. I'm interested in efficiency in memory and in computational complexity. (Ha! And as a matter of fact, I'm looking for the set of algorithms that are Pareto optimal with respect to memory and computational complexity.)
My current application of this is in building a Lucene search-document Collector
that doesn't collect the most relevant documents (the typical use case for a search engine), but collects the Pareto optimal documents along specified dimensions.