- #1

- 16

- 0

## Main Question or Discussion Point

Let's say there is a set of n elements, S. P is a subset of S, with m elements, and satisfies some conditions, i.e. c1 < f(P) < c2 and g(P) < c3, where f and g are some functions on the elements of P and c1, c2 and c3 are constants.

For practical purposes, S is represented as a sorted array of n floating point numbers.

The objective is to find which elements satisfy the above conditions.

My current approach is rather brute force, i.e. exhaustively trying out combinations. I'm wondering whether there is some more efficient way.

For practical purposes, S is represented as a sorted array of n floating point numbers.

The objective is to find which elements satisfy the above conditions.

My current approach is rather brute force, i.e. exhaustively trying out combinations. I'm wondering whether there is some more efficient way.