Re: Sum of combination

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Michael Wong (email_at_notvalid.in.here)
Date: 06/10/04


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.
> >
> >
>
>



Relevant Pages

  • Re: A mechanical way to obtain source independence re SOL
    ... >>> You don't need coherrent light to play with mirrors. ... >> Yeah, but I like the pretty colours. ... > Hint Hint :-) ... Electrons in TV tubes love to flaunt 377 ohms. ...
    (sci.physics.relativity)
  • Re: A mechanical way to obtain source independence re SOL
    ... >>> You don't need coherrent light to play with mirrors. ... >> Yeah, but I like the pretty colours. ... > Hint Hint :-) ...
    (sci.physics.relativity)
  • request for code : Py Tic Tac Toe in action
    ... I wrote a script that plays optimal tic-tac-toe. ... I'm learning Python in order to analyze a game that I invented ... mod 8 to the outside cells and flipping by subtracting the outside ... Since you wrote a Python program to play tic-tac-toe optimally, ...
    (comp.lang.python)
  • Re: Just cant hear enough about Cells?
    ... efficient order, with B being updated exactly once, after A. ... can you give some hint how this works? ... How does the queue processing work? ... Cells: http://common-lisp.net/project/cells/ ...
    (comp.lang.lisp)
  • WTS/WTT: IBM RS/6000-860 Notebook, loaded
    ... I don't have the time anymore to play around with it ... hardware, so this one has to go... ... Cells are commonly available at the usual places, ... Be caught in a commonplace way. ...
    (comp.sys.ibm.ps2.hardware)