Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2005
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

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

Search the Archive

Re: Optimal number of sheets

  • To: mathgroup at smc.vnet.net
  • Subject: [mg58368] Re: Optimal number of sheets
  • From: Peter Pein <petsie at dordos.net>
  • Date: Tue, 28 Jun 2005 21:57:01 -0400 (EDT)
  • References: <d9r4sh$55f$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Erb, John schrieb:
> Hello,
> 
> On a given occasion, I wish to create different thicknesses of a
> material, ranging
> say, for example, from 1 cm to 25 cm, in increments of 1 cm.
> 
> How can I, using Mathematica, determine the minimum number
> of sheets of material I need?
> The material comes in thicknesses of 1, 2, 3, 4, & 7 cm.
> 
> Thank you,
> John C. Erb
> email:  John_C_Erb at prodigy.net
> 
>

In[1]:= Off[General::spell1];
  thickness = {1, 2, 3, 4, 7};
  count = x /@ Range[Length[thickness]];
In[4]:= MatrixForm[sol =
count /. Last /@
  Minimize[{Total[count],
    count . thickness == #1 && And @@ (#1 >= 0 & ) /@ count &&
    Element[count, Integers]},
  count] & /@ Range[25]]
Out[4]//MatrixForm=
MatrixForm[
  {{1, 0, 0, 0, 0},
   {0, 1, 0, 0, 0},
   {0, 0, 1, 0, 0},
   {0, 0, 0, 1, 0},
   {1, 0, 0, 1, 0},
   {0, 1, 0, 1, 0},
   {0, 0, 0, 0, 1},
   {0, 0, 0, 2, 0},
   {0, 1, 0, 0, 1},
   {0, 0, 1, 0, 1},
   {0, 0, 0, 1, 1},
   {0, 0, 0, 3, 0},
   {0, 1, 0, 1, 1},
   {0, 0, 0, 0, 2},
   {0, 0, 0, 2, 1},
   {0, 1, 0, 0, 2},
   {0, 0, 1, 0, 2},
   {0, 0, 0, 1, 2},
   {0, 0, 0, 3, 1},
   {0, 1, 0, 1, 2},
   {0, 0, 0, 0, 3},
   {0, 0, 0, 2, 2},
   {0, 1, 0, 0, 3},
   {0, 0, 1, 0, 3},
   {0, 0, 0, 1, 3}}]
-- 
Peter Pein
Berlin


  • Prev by Date: Re: Optimal number of sheets
  • Next by Date: Re: Common factors in a list
  • Previous by thread: Re: Optimal number of sheets
  • Next by thread: Re: Optimal number of sheets