How do I maximize this system of equations given the initial conditions?

34 Views Asked by At

I am playing a semi-popular online game called Rust. In this game you must "craft" items given some supplies. Some items take multiple different items, that also must be crafted.

In my example I would like to maximize the equation

$$ E = 5M + 10G + 5S $$

Where $G$ is defined by

$$ G = 3C + 2S $$

And I initially have

$$ M = 36000, S = 17000, C=60000 $$

Notice my "issue" is that $S$ is within both equations, forming what I think is a system of linear equations.

How do I go about maximizing $E$ in this case?

1

There are 1 best solutions below

0
On

What you are probably trying to do is to maximize $E$ subject to the constraints $M \le 36000, S \le 17000, C \le 60000$. You get $5$ points for each $M$, $10$ for each $G$, and $5$ for each $S$. A $G$ comes from $3C+2S$.

The only question is how many $G$s to make and the only conflict is over $S$s. You can either use $S$s by themselves, getting $5$ for each one, or make them part of $G$s, getting $10$ for two. Here it doesn't matter, so just have $36000\ M$s and $17000\ S$s for $265000$. Save the $C$s for another day.

It would be different if $G$s gave you more points per $S$ than $S$s did. Now you would want to make all the $G$s you can until you run out of one material. If you run out of $C$s, then keep the remaining $S$s. In any case, use all the $M$s because there is no conflict for them.