# What are easy examples from daily life of constrained optimization?

A standard example of motivating constrained optimization are examples where the setup is described in a lot of lines, e.g., when you own a company and the company is making some products out of resources and are mixed in a certain ratio, etc.

Are there more easy (i.e., to explain and to understand) examples from daily life which motivate constrained optimization?

The examples should be nonlinear if possible, they don't have to be solvable, but it should be clear how to translate daily life language into the problem.

A great answer should also explain the need of constrained optimization tools (i.e., the constrains should not be solvable explicitly) and maybe also demonstrate that the gradient is not zero without calculating everything, but from the (first) view of the example.

Note: This question is related to Optimization problems that today's students might actually encounter?, where more advanced problems should be discussed.

Bankruptcy problems ask for how to "fairly" distribute \$E to honest claimants whose claims exceed the amount \$E. For example, $A$ claims \$30,$B$claims \$50 and $C$ claims \$120 and there is only \$160 to distribute. There are two methods dating back to "medieval" times associated with Moses Maimonides.

a. Try to equalize the amount given (gain) to each claimant but without giving the claimant more than the claimant asks for.

b. Try to equalize the loss to each claimant but without asking the claimant to subsidize the settlement by adding money to E to make this possible.

Each of these approaches to being fair leads to a constrained optimization problem. There are other approaches to being fair here in addition to the two approaches above, for example, one could give each claimant an amount proportional to his/her claim.

Determine the minimum distance from a parametric equation $(x(t), y(t))$ to a given point $(x_0, y_0)$.

Eg. at which point should a person leave a road (described by the parametric equation), such that the walking distance to the point $(x_0, y_0)$ from the road is minimized?

The problem is then: Minimize $\sqrt{(x-x_0)^2 + (y - y_0)^2}$ subject to $x = x(t)$ and $y = y(t)$.

• Thanks for your answer! I can't figure out where the constraint of your optimization problem is? Apr 14 '14 at 8:31
• The constraint is that the point is in a feasible region. In this case on the road, but it could also be on an implicitly defined function (circle / ellipse). Apr 14 '14 at 8:36

This example is maybe the most easy, but in my opinion it does not highlight the necessity to use methods of constrained optimization since the constrained equation is explicitly invertible.

A gardener has 20 meters of fence-material and wants to fence a rectangle shaped area with maximal area.

The problem reads then as: Maximize $f(a,b)=a\cdot b$ subject to $2a+2b=20$.

• There is also the risk that the student looks at the problem, says "I know, the answer must be a square!" by applying simple geometry, and then entirely neglects the algebra. Feb 11 '18 at 16:52

Following on the example above by Markus Klein:

A gardener has 20 meters of fence-material and wants to fence a rectangle shaped garden with maximal area. Furthermore, the garden will be located next to the house such that the house will serve as one of the four walls.

The problem then reads: Maximize $$f(a,b) = a*b$$ subject to $$2a + b = 20$$.

The answer $$(a = 5, b = 10)$$ is not so obvious to students.

(I realize this should probably be just a comment, but I am new here and don't yet have the ability to comment.)

• This is a commonly given exercise (I typically give it to my precalculus students every year), but I question its nature as a problem from daily life. Who actually does this? Don't most people first figure out what area they want to fence, then go to the hardware store and buy twice as much fencing as they actually need, just to be sure? Oct 1 '20 at 12:31
• @XanderHenderson I agree - still not a question people seem to often ask themselves. In fact I would often go to the hardware store and buy an extra 25% of fence to anticipate some kind of screw-up or other need. The main point of this is that a trivial change in the statement leads to a problem without an obvious answer. Oct 12 '20 at 3:42
• @user1027 I like the mirror idea. In practice I often mix things up with more complicated house / wall constraints like building the garden onto the corner of the house. Oct 12 '20 at 3:43