MathGroup Archive 2010

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

Search the Archive

Re: how to solve for all integer solutions, linear programming

  • To: mathgroup at smc.vnet.net
  • Subject: [mg109522] Re: how to solve for all integer solutions, linear programming
  • From: Murray Eisenberg <murray at math.umass.edu>
  • Date: Mon, 3 May 2010 06:12:04 -0400 (EDT)

    Reduce[{5 a + 3 b + 2 c + 6 d + 5 e + f == 25,
           a + b + c <= 4,
           d + e + f <= 5,
           a >= 0, b >= 0, c >= 0, d >= 0, e >= 0, f >= 0},
           {a, b, c, d, e, f}, Integers]

On 5/2/2010 5:35 AM, me13013 wrote:
> Howdy,
>
> I have a small linear programming problem that I would like to solve
> for all integer solutions:
>
>    5a + 3b + 2c + 6d + 5e + f = 25
>    a + b + c<= 4
>    d + e + f<= 5
>    a,b,c,d,e,f>= 0
>
> How can I pose this problem to Mathematica?
>
> I have looked at (and fiddled around with) the LinearProgramming
> function, but I don't see how to make ti give me the solution(s) I am
> looking for.
>
> Thanks for any help,
> Bob H
>

-- 
Murray Eisenberg                     murray at math.umass.edu
Mathematics & Statistics Dept.
Lederle Graduate Research Tower      phone 413 549-1020 (H)
University of Massachusetts                413 545-2859 (W)
710 North Pleasant Street            fax   413 545-1801
Amherst, MA 01003-9305


  • Prev by Date: Re: Evaluating a sum from terms generated by the Array
  • Next by Date: Re: Can anyone help?
  • Previous by thread: Re: how to solve for all integer solutions, linear programming
  • Next by thread: Re: how to solve for all integer solutions, linear programming