Re: Sum of combination
From: Michael Wong (email_at_notvalid.in.here)
Date: 06/10/04
- Next message: Stephen Dunn: "Re: Extract unique values with criteria, and sort them"
- Previous message: Mark Worthington: "Re: Extract unique values with criteria, and sort them"
- In reply to: Dana DeLouis: "Re: Sum of combination"
- Next in thread: Harlan Grove: "Re: Sum of combination"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 10 Jun 2004 19:51:05 +1100
It's getting more and more interesting now.
Thank you very much for the hint, I'll try to play with it.
"Dana DeLouis" <delouis@bellsouth.net> wrote in message
news:eCNJd0qTEHA.2972@TK2MSFTNGP12.phx.gbl...
> It's a little more involved, but when using Solver, the general idea is to
> add the solution back into the constraints. When finding a specific Sum,
> and your Binary data (1's) are in, for example, B1,B3, & B5, you add the
> constraint that B1+B3+B5<=2. Due to Precision, Tolerance...etc when using
> Solver, I will make it <=2.5. Then resolve.
> What this is doing is that if one solution used these 3 cells, then any
> other solution can not use these same 3 cells. Again, it's a little more
> involved, but that's the general idea. It works pretty well, but you have
> to set up Solver correctly.
>
> HTH
> Dana
>
>
> "Michael Wong" <email@notvalid.in.here> wrote in message
> news:ejWBCIpTEHA.3768@TK2MSFTNGP11.phx.gbl...
> > Ummm.... I don't think I can wait this long, will do it by hand, should
be
> > possible to eliminate a subset of the data.
> >
> > Thanks
> >
> > "Harlan Grove" <hrlngrv@aol.com> wrote in message
> > news:isHxc.5474$H4.149@www.newsranger.com...
> > > "Michael Wong" wrote...
> > > >Is there possible to get the others solutions also?
> > > ..
> > >
> > > Possible, yes. Practical, no. First, if your values include both
> positive
> > and
> > > negative values, it may take Solver a very long time to find the first
> > solution.
> > > If you want to find all sums of subsets of N numbers that equal a
given
> > value,
> > > then you'll need to check all 2^N - 1 nontrivial combinations. For N =
> 20,
> > > that's 1,048,575 different subsets/combinations. If you had 50 values,
> > it'd take
> > > the latest model PCs several months doing nothing else to check all
> > possible
> > > combinations. If you had 100 values, it'd take all current computing
> > resources
> > > en masse a few million years to work out all the combinations.
> > >
> > > --
> > > To top-post is human, to bottom-post and snip is sublime.
> >
> >
>
>
- Next message: Stephen Dunn: "Re: Extract unique values with criteria, and sort them"
- Previous message: Mark Worthington: "Re: Extract unique values with criteria, and sort them"
- In reply to: Dana DeLouis: "Re: Sum of combination"
- Next in thread: Harlan Grove: "Re: Sum of combination"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|