MathGroup Archive 2010

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Limitations of Minimize? Time to buy a new PC for Mathematica?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg113077] Re: Limitations of Minimize? Time to buy a new PC for Mathematica?
  • From: Ray Koopman <koopman at sfu.ca>
  • Date: Tue, 12 Oct 2010 13:48:36 -0400 (EDT)
  • References: <i9168c$j14$1@smc.vnet.net>

On Oct 12, 1:29 am, Adrian Boyko <adrianbo... at gmail.com> wrote:
>   Hi,
>
> I'm new to the list and a casual user of Mathematica at home.  So, I
> hope you'll forgive what might be a basic or silly question.
>
> I'm trying to perform linear least squares with constraints (all x's >
> 0) and somebody suggested I might be able to do this with Minimize.
> When I run the following, Mathematica works on it for a very long time
> (not sure how long, since I didn't sit at the computer waiting for it to
> finish) and then finally returns "No more memory available."  Two questions:
>
> Q1: Is this problem just too much to ask of Mathematica or can it be
> solved if I upgrade my low-end PC to something new with 8 or 12 GB of
> RAM?  I don't want to buy a new machine just to discover that no amount
> of RAM will help.
>
> Q2: Is there a more memory-efficient way to solve this sort of problem
> in Mathematica?
>
> Thanks, in advance, for any help or comments!
>
> Minimize[
>     {
>        + (660-x24)^2 + (341-x0-x12-x15-x17-x32)^2 + (528-x0-x15-x24-x33)^2
>        + (266-x24)^2 + (263-x0-x9-x12)^2 + (181-x17)^2 + (353-x14)^2
>        + (120-x0-x12-x15-x33)^2 + (149-x0-x12-x14-x15-x33)^2
>        + (215-x0-x12-x17-x32)^2 + (566-x20)^2 + (777-x0)^2 + (94-x24)^2
>        + (56-x15)^2 + (53-x12)^2 + (351-x24)^2
>        + (426-x0-x12-x15-x17-x24-x33)^2 + (477-x24)^2 + (357-x12)^2
>        + (548-x0-x12-x32)^2 + (210-x17-x24)^2 + (167-x9)^2
>        + (173-x0-x12-x20)^2 + (77-x17-x24)^2 + (173-x20-x38)^2
>        + (218-x0-x12-x14-x15-x20-x38)^2 + (217-x0)^2 + (482-x0-x12)^2
>        + (252-x12)^2 + (312-x24)^2 + (212-x17)^2 + (606-x17)^2
>        + (337-x9)^2 + (831-x0)^2 + (212-x0-x9-x12-x15-x32-x33)^2,
>        {
>           x0 > 0 && x9 > 0 && x12 > 0 && x14 > 0 && x15 > 0 && x17 > 0
> && x20 > 0 && x24 > 0 && x32 > 0 && x33 > 0 && x38 > 0
>        }
>     },
>     {x0, x9, x12, x14, x15, x17, x20, x24, x32, x33, x38}
> ]

See Michael Woodhams' NNLS code at
http://groups.google.ca/group/comp.soft-sys.math.mathematica/browse_frm/thread/707162290f2cb1a2


  • Prev by Date: Re: What is the ESC sequence for the "Matching Double Brakets"? From
  • Next by Date: Re: Generation of polynomials
  • Previous by thread: Re: discrete numerical 2D gradient
  • Next by thread: Version Advisory -- Can I automate?