Skip to content
Prev 208128 / 398502 Next

Solving an optimization problem: selecting an "optimal" subset

Dimitri Shvorob <dimitri.shvorob <at> gmail.com> writes:
This is a "subset sum" problem and has been discussed here in December for
integers. For floats it is even more difficult as there is no reliable
stopping criterion.

Can you settle for an approximate solution? If you insist on the true
minimum, you will have to live with the combinatorial explosion searching
through all (appropriate) subsets.

Rcplex: This is a combinatorial problem and cannot be formulated as a
quadratic optimization problem.
It is NP-hard and cannot be solved via Dynamic Programming.
As a combinatorial problem, it also will not yield to GA approaches, at
least not to find the minimum reliably.

Hans Werner

P.S.:   Example (solution maybe is the best possible)

    set.seed(8232)
    x <- runif(100)

    # Find subset that sums up close to 2.0 !
    i <- c(84,54,11,53,88,12,26,45,25,62,96,23,78,77,66,1)
    sum(x[i])
    #=> 2.000451

Thread (17 messages)

Dimitri Shvorob Solving an optimization problem: selecting an "optimal" subset Jan 29 Bart Joosen Solving an optimization problem: selecting an "optimal" subset Jan 30 Dimitri Shvorob Solving an optimization problem: selecting an "optimal" subset Jan 30 Hans W Borchers Solving an optimization problem: selecting an &quot;optimal&quot; subset Jan 30 Dimitri Shvorob Solving an optimization problem: selecting an "optimal" subset Jan 30 Dimitri Shvorob Solving an optimization problem: selecting an "optimal" subset Jan 30 Bart Joosen Solving an optimization problem: selecting an "optimal" subset Jan 30 Dimitri Shvorob Solving an optimization problem: selecting an "optimal" subset Jan 30 Erwin Kalvelagen Solving an optimization problem: selecting an &quot;optimal&quot; subset Jan 30 Hans W Borchers Solving an optimization problem: selecting an &quot;optimal&quot; subset Jan 30 Dimitri Shvorob Solving an optimization problem: selecting an "optimal" subset Jan 30 Dimitri Shvorob Solving an optimization problem: selecting an "optimal" subset Jan 30 Erwin Kalvelagen Solving an optimization problem: selecting an &quot;optimal&quot; subset Jan 30 Hans W Borchers Solving an optimization problem: selecting an "optimal" subset Jan 31 Dimitri Shvorob Solving an optimization problem: selecting an "optimal" subset Jan 31 Dimitri Shvorob Solving an optimization problem: selecting an "optimal" subset Jan 31 Erwin Kalvelagen Solving an optimization problem: selecting an &quot;optimal&quot; subset Jan 31