I have a set of pairs of numbers each associated with a benefit.
for example:
(x,y)|benefit
S={(2,3)|4,(4,5)|6,(6,7)|1,(8,9)|3}
and let B(X) be a function that sum all the benefits in the set
for example B(S)=4+6+1+3=14
and let R(X) be a function of the actual benefit of the set. the actual benefit can only be a combination of a partioned sum of its benefits.
for example, R(X) could equal to 4,6,1,3,4+6,4+1,4+3,6+1,1+3,4+6+1+4...etc and it also can equal to 0.
the function is hidden. However we can use it to measure the benefit of a set.
Givin the following relation
R(X)≤B(X)
let A be a proper subset of X.
then R(X-A)<B(X)
Let Z={(1,3)|5}
then R(Z)=B(Z)=5. a set of one element has the benefit of its element.
I need to design an algorithm that finds the best (highest benefit) combination of pairs in a set U.
so Let S=U
then {(1,2),(3,4)} is a combination of pairs
the R(X) function is similar to a function that get the best fit line of the pairs in X. and add up the benefits of those that has less than 1 residual.
one thing that can be noticed is that if a combination A is not equal to B(A) then any combination that contains A is not a solution.