Page 1 of 2 1 2 LastLast
Results 1 to 20 of 23

Thread: BG Maths Contest !     submit to reddit submit to twitter

  1. #1
    Nidhogg
    Join Date
    Jul 2006
    Posts
    3,999
    BG Level
    7

    BG Maths Contest !

    Well I got a homework problem that is about maximizing and I know shit about it so I just did trial and error and compared with my friends what their total profit was.

    My homework is to optimize the profit per box sold. The highest I got out of 10 tries was $72. Problem involved more math but I did some of it since typing out everything else would be meh.

    Rules

    -No more than 10 of the same nail in a box.
    -No less than 5, of each of at least 3 types of nails in a box
    (meaning they're has to be three different types of nails that have 5 in them) (example: five 4-inch nails, five 3.5 inch nails, five 3 inch nails and the rest of the 15 can be distributed assuming the other rules arent broken)
    -The box cannot weigh more than 20 ounces total
    -Their cannot be more than 30 nails in a box

    4 inch nails = 1 ounce and $4 profit per nail
    3.5 inch nails = .85 and $2.5 profit per nail
    3 inch nails = .7 and $2 profit per nail
    2.5 inch nails = .5 and $1.5 profit per nail
    2 inch nails = .25 and $1.0 profit per nail
    1.5 inch nails = .1 and $0.5 profit per nail

    Whoever beats $72 per box and has the highest one by 11 PM EST Tonight. I'll paypal five real dollars to you (not much but its incentive if your doing this for fun) if you tell me where you allocated each nail and it's within the rules. If multiple people PM me with one higher than $72 per box than the person who PMed me first wins.

    An example of one that I did that works is

    4 inch - 10
    3.5 inch - 10
    3 inch - 0
    2.5 inch - 0
    2 inch - 3
    1.5 inch - 7

    This results in 19.95 which is no more than 20 (20 ounces is the max) so that rule is fine

    30 nails so that rule is fine

    and 4 inch, 3.5 inch, and 1.5 inch are 3 different nails that have at least 5 in them so this rule is fine

    Lastly no more of 10 nails were in any category so that rule is fine.

    edit: Resulting Total Profit in example was 4(10) + 2.5(10) + 1(3) + .5(7) = $71.5

  2. #2
    The Mizzle Fizzle of Nikkei's Haremizzle

    Join Date
    Feb 2006
    Posts
    22,049
    BG Level
    10
    FFXI Server
    Bismarck

    Nice try. I saw the word "contest" and got excited, then I saw it was homework and changed my mind.



  3. #3
    Nidhogg
    Join Date
    Jul 2006
    Posts
    3,999
    BG Level
    7

    Quote Originally Posted by Mizango View Post
    Nice try. I saw the word "contest" and got excited, then I saw it was homework and changed my mind.


    Still a contest because you can wins and I'll give you moneyz >.>

  4. #4
    E. Body
    Join Date
    Jan 2007
    Posts
    2,103
    BG Level
    7

    Quote Originally Posted by Mizango View Post
    Nice try. I saw the word "contest" and got excited, then I saw it was homework and changed my mind.


    We should report him to his teacher, saying that he was attempting to pay us to do his work.

  5. #5
    The Mizzle Fizzle of Nikkei's Haremizzle

    Join Date
    Feb 2006
    Posts
    22,049
    BG Level
    10
    FFXI Server
    Bismarck

    lol

  6. #6
    BG Medical's Student of Medicine
    Join Date
    Oct 2006
    Posts
    34,516
    BG Level
    10

    E-mailing teacher now.

  7. #7
    Sea Torques
    Join Date
    Jul 2009
    Posts
    719
    BG Level
    5

    I'm not sure what your lvl of math is, but the general way to solve an optimization problem is:

    Make base equation to be optimized (in this case your box total)
    Make an equation for each constraint
    apply first and second derivatives
    ???
    Profit!

    this will always give you the optimal solution to any bounds/optimization problem

  8. #8
    Title: "HUBBLE GOTCHU!" (without the quotes, of course [and without "(without the quotes, of course)", of course], etc)
    Join Date
    Jul 2006
    Posts
    3,141
    BG Level
    7

    Since it's homework, we're obviously not going to just solve the problem and post the solution. Try what Cooleko said, or try something else. If you get stuck, tell us what you've done so far, and tell us what math class this is for (we need to know what class this is in order to know what level you're on and how your teacher expects you to solve), show some of your work, and we'll guide you from wherever you're stuck, to a solution.

  9. #9
    I Have The Clap Again
    Join Date
    Oct 2006
    Posts
    5,847
    BG Level
    8

    right now the op is fucking doing a

    http://i57.photobucket.com/albums/g2...m/Faceslap.jpg

  10. #10
    Banned.

    Join Date
    Aug 2007
    Posts
    2,547
    BG Level
    7

    This is the knapsack problem with some extra rules, if anybody cares. It seems to be the right answer to me so far. Grab the most valuable item with the highest value:weight ratio until you can't grab any more, then the next, then the next, then the next.

  11. #11
    Ridill
    Join Date
    Oct 2005
    Posts
    10,210
    BG Level
    9
    FFXI Server
    Asura

    Simple.

    6 types of nails = a,b,c,d,e,f
    total profit = y

    Graph the following on 7-dimensional graph paper:

    y = 4a + 2.5b + 2c + 1.5d + e + 0.5f

    Then draw a line at each boundary, namely where:

    a + b + c + d + e + f = 30
    a + .85b + .7c + .5d + .25e + .1f = 20
    a = 10
    b = 10
    c = 10
    d = 10
    e = 10
    f = 10

    You'll have a 7-dimensional shape with a bunch of lines crisscrossing it. See how far up the y-direction you can go, within that shape and within those lines, and still meet the 5 minimum of 3 types of nails requirement.

  12. #12
    Hydra
    Join Date
    Oct 2007
    Posts
    121
    BG Level
    3

    Did your teacher say there was a larger answer than $72?

    For my optimal solution, I get
    4.0" - 10
    3.5" - 8
    2.5" - 1
    2.0" - 10
    1.5" - 1

    profit = $72

  13. #13
    2k for handjobs is a deal yo
    Join Date
    Apr 2009
    Posts
    764
    BG Level
    5

    gonna cost you more than 5 dollas bub

  14. #14
    Nidhogg
    Join Date
    Jul 2006
    Posts
    3,999
    BG Level
    7

    Quote Originally Posted by Bugpop View Post
    Did your teacher say there was a larger answer than $72?

    For my optimal solution, I get
    4.0" - 10
    3.5" - 8
    2.5" - 1
    2.0" - 10
    1.5" - 1

    profit = $72
    Nope, didn't say what it was. No one beat it though so no winners

  15. #15
    Hydra
    Join Date
    Oct 2007
    Posts
    121
    BG Level
    3

    Quote Originally Posted by Conformity View Post
    gonna cost you more than 5 dollas bub
    The highest I can get is $72.33 using fractions of nails.

    Code:
                                 MOR/LP
    
    Date: 10/18/09                                   Time: 23:00:33
                             C:\MOR\PROBLEM
    
                            MODEL DESCRIPTION
          ****************************************************
    
    
    Max z = 4a+2.5b+2c+1.5d+e+0.5f
    ST a+0.85b+0.7c+0.5d+0.25e+0.1f<=20
    a+b+c+d+e+f>=15
    a+b+c+d+e+f<=30
    a<=10
    b<=10 
    c<=10
    d<=10
    e<=10
    f<=10
    
    
          ****************************************************
    
    
    Simplex Method
    
    
    
    
    
                                ^^^ Optimal Solution ^^^
    
    Z               =     72.3333
    A               =     10.0000
    B               =      8.6667
    C               =      0.0000
    D               =      0.0000
    E               =     10.0000
    F               =      1.3333
     Surpl2         =     15.0000
     Slack5         =      1.3333
     Slack6         =     10.0000
     Slack7         =     10.0000
     Slack9         =      8.6667
    
    
    Compile time:     0.00 (Secs.)
    Run time    :     0.00 (Secs.)

  16. #16
    Ridill
    Join Date
    Oct 2005
    Posts
    10,210
    BG Level
    9
    FFXI Server
    Asura

    Speaking of which, if I can get a $4 profit just by selling a single 4" nail, I'm in the wrong business.

  17. #17
    Ridill
    Join Date
    Aug 2005
    Posts
    22,165
    BG Level
    10

    Quote Originally Posted by LinktheDeme View Post
    $4 profit per nail
    AFK getting into the nail business.

  18. #18
    New Merits
    Join Date
    Oct 2006
    Posts
    209
    BG Level
    4

    Well there wasn't a constraint that you had to use whole nails was there?

  19. #19
    Nidhogg
    Join Date
    Jul 2006
    Posts
    3,999
    BG Level
    7

    Quote Originally Posted by Nyima View Post
    Well there wasn't a constraint that you had to use whole nails was there?
    Well technically no but realistically yes as you can't sell someone half a nail or it'll cease to be a nail lol. Regardless though it was a good effort but 10 minutes after the deadline I would have given it if otherwise though since I didn't list it.

  20. #20
    Hydra
    Join Date
    Oct 2007
    Posts
    121
    BG Level
    3

    Quote Originally Posted by LinktheDeme View Post
    Well technically no but realistically yes as you can't sell someone half a nail or it'll cease to be a nail lol. Regardless though it was a good effort but 10 minutes after the deadline I would have given it if otherwise though since I didn't list it.
    I had to modify the problem a bit to get integer results. I took it for granted that whole nails were desired.

    I can't see how 3 sizes had to have a minimum of 5 nails was a necessary constraint. At best it served as a hint for people using brute force methods. Are you covering linear programming in school?

    Code:
                                 MOR/LP
    
    Date: 10/19/09                                   Time: 21:52:57
                             C:\MOR\problem3
    
                            MODEL DESCRIPTION
          ****************************************************
    
    
    Max z = 400a+250b+200c+150d+100e+50f
    ST 100a+85b+70c+50d+25e+10f<=2000
    a+b+c+d+e+f>=15
    a+b+c+d+e+f<=30
    a<=10
    b<=10 
    c<=10
    d<=10
    e<=10
    f<=10
    integer(a,b,c,d,e,f)
    
          ****************************************************
    
    
    Gomory Cut - Mixed Integer Linear Programming
    
    
    
    
    
                                ^^^ Optimal Solution ^^^
    
    
    
    Integer solution has been obtained
    Z               =   7200.0000
    A               =     10.0000
    B               =      8.0000
    C               =      0.0000
    D               =      1.0000
    E               =     10.0000
    F               =      1.0000
     Slack1         =     10.0000
     Surpl2         =     15.0000
     Slack5         =      2.0000
     Slack6         =     10.0000
     Slack7         =      9.0000
     Slack9         =      9.0000
    
    
    Compile time:     0.00 (Secs.)
    Run time    :     0.00 (Secs.)

Page 1 of 2 1 2 LastLast

Similar Threads

  1. BG Math [Algebra sucks v2.0]
    By SDSD in forum General Discussion
    Replies: 7
    Last Post: 2010-02-04, 02:32
  2. BG MATH I need your help with Statistics.
    By Patb in forum General Discussion
    Replies: 1
    Last Post: 2010-01-26, 13:27
  3. BG Math [Algebra sucks :(]
    By SDSD in forum General Discussion
    Replies: 8
    Last Post: 2010-01-19, 07:18
  4. BG MATH [Real Analysis]
    By SDSD in forum General Discussion
    Replies: 10
    Last Post: 2009-12-05, 15:59
  5. BG Math Contest [Not Someone's Homework]
    By Mojo in forum General Discussion
    Replies: 14
    Last Post: 2009-10-23, 11:43
  6. BG Math/CS Students!
    By bori in forum General Discussion
    Replies: 1
    Last Post: 2009-09-25, 17:49