Hacker News new | ask | show | jobs
by chrishaum 5639 days ago
Thanks for your response, skip! SUM is the sum of attributes A, but MEAN is the mean of attributes B, so I don't see how they can be simplified.
1 comments

Oh, I missed this detail. In that case for a deterministic result I think you need to look at every possible combination. However, you can order them by the minimum criterion first, and start searching from the smallest to largest, so then the first group than meets the interval criteria is guaranteed optimal.