So I just got out of an exam, and one of the problems basically just killed me. It had to do with linear programming and the simplex method.

I know how to do the simplex method really well (like a pro), but for the life of me I couldn't formulate a linear system from the problem that was given to us!

Here is the problem (don't worry the exam is over for all students so I can talk about the problem just fine):

It is a linear programming maximization problem. I need to first form a linear system out of it, and then use the simplex method to solve....but I no matter how hard I tried I couldn't form a linear system.We have a factory that makes Medicine 1 and Medicine 2. There are 3 chemicals that go into these medicines: A, B, and C. The factory has 10 units of A, 6 units of B, and 7 units of C in stock. To use a unit of A, B, or C it costs $10, $20, and $30 respectively. One unit of Medicine 1 takes 1 unit of A and one unit of B. One unit of Medicine 2 takes one unit of A and one unit of C. Medicine 1 thus costs $30 to make, and Medicine 2 thus costs $40 to make. Each medicine is then sold at a price of $50.

What is the maximum profit that factory can make?

Here is what I tried:

We are maximizing profit, so I said:

max: p = 50x - 30y - 40z

Because we want to maximize profit (p) where x is the number of medicine units we sell total, y is the units of medicine 1 produce, and z is the units of medicine 2 produced. Does that seem correct, or did I do that wrong?

Then after thinking about for about 30 minutes, I put these constraints in:

x <= 10

y <= 7

z <= 6

But even after adding those constraints....it just doesn't seem right.

Does anyone else here have an idea on how to form the correct linear system?