Jump to content
BrainDen.com - Brain Teasers
  • 0

Whether to produce desks, tables, or chairs


Go to solution Solved by BobbyGo,

Question

Resource Desk Table Chair Availability

Lumber 8 board ft 6 board ft 1 board ft 48 board ft

Finishing 4 hours 2 hours 1.5 hours 20 hours

Carpentry 2 hours 1.5 hours 0.5 hours 8 hours

Selling Price $60 $30 $20

Given the constraints listed in terms of time and wood available, how many of each object should be produced to maximize revenue?

  • Upvote 1
  • Downvote 1
Link to post
Share on other sites

9 answers to this question

Recommended Posts

  • 0
  • Solution

If you're interested, I ran a bit of code to find the answer...

This is kind of like cheating... you're not a cheater, are you?

Okay, fine. The maximum revenue is produced by making 2 desks, 0 tables, and 8 chairs for a total of $280.

double d, t, c, d1, t1, c1, money=0;

int main()
{
    for(d=0; d<5; d++)
    {
        for(t=0; t<7; t++)
        {
            for(c=0; c<15; c++)
            {
                if(d*2 + t*1.5 + c*.5 <= 8 and d*4 + t*2 + c*1.5 <= 20 and d*8 + t*6 + c*1 <=48 and d*60 + t*30 + c*20 > money)
                {
                    money = d*60 + t*30 + c*20;
                    d1 = d;
                    t1 = t;
                    c1 = c;
                }
            }
        }
    }

    cout<<d1<<" desks, "<<t1<<"  tables, and "<<c1<<" chairs makes: $"<<money<<endl;
	return 0;
}

Edited by BobbyGo
Link to post
Share on other sites
  • 0

8d+6t+c<=48

4d+2t+1.5c<=20

2d+1.5t+.5c<=8

maximize 6d+3t+2c

can't use all available resources because attempting to do so yields t=-12

You don't need to use all just find the optimal solution

Link to post
Share on other sites
  • 0

8d+6t+c<=48

4d+2t+1.5c<=20

2d+1.5t+.5c<=8

maximize 6d+3t+2c

can't use all available resources because attempting to do so yields t=-12

You don't need to use all just find the optimal solution

That's why I just called it "setup"; I ran it with = instead of <=, and that yielded a clearly nonsensical solution, so I included that note.

Link to post
Share on other sites
  • 0

8d+6t+c<=48

4d+2t+1.5c<=20

2d+1.5t+.5c<=8

maximize 6d+3t+2c

can't use all available resources because attempting to do so yields t=-12

You don't need to use all just find the optimal solution

That's why I just called it "setup"; I ran it with = instead of <=, and that yielded a clearly nonsensical solution, so I included that note.

My apologies, sometimes my english isn't the best. :blush:

Link to post
Share on other sites
  • 0

8d+6t+c<=48

4d+2t+1.5c<=20

2d+1.5t+.5c<=8

maximize 6d+3t+2c

can't use all available resources because attempting to do so yields t=-12

You don't need to use all just find the optimal solution

That's why I just called it "setup"; I ran it with = instead of <=, and that yielded a clearly nonsensical solution, so I included that note.

My apologies, sometimes my english isn't the best. :blush:

No problem, just clarifying that that wasn't an answer, just providing the initial setup

Link to post
Share on other sites
  • 0

don't know how to solve 3 variable inequalities but

from carpentary eqn we can deduce that the 1st'eqn can be reduced to 8d+6t+c<=32. So By making few cases, one can find that max revenue is when d=1,t=1,c=9. But don't know hw to do w/o making cases

With that reduction, can't even try treating as equalities rather than iniqualities--2 equations for 3 variables

EDIT:

Also, that means there are leftovers of multiple resources: d=1 subbed into the equations, treating them as equalities, yields fractional t and c.

there are 25 board feet and half an hour of finishing time left over, with all carpentry time used.

Edited by ShadowAngel7
Link to post
Share on other sites
  • 0

If you wanted to do it manually, i included a screenshot using the direct "enter the basis approach" (utilizing linear algebra)

post-53485-0-59487100-1368829535_thumb.p

so where you see the ones in the columns among the zeroes is the 'solutions' Z value is on top that is the maximum revenue, find the x1 score of one then read all the way across to find its quantity, etc. You will notice the extra variables (s1, s2, s3) these variables are the slack variables, that is the extra resources that will be left even in the optimal situation. IN this case s1 (the amount of boards will have leftovers) but the other two constraints will be fully exhausted

Edited by BMAD
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...