Optimization problems that today's students might actually encounter?



Our students are not fencing in farm fields, cutting wires and folding them, or designing windows, so they are often uninspired by the optimization problems we give them. They seem like something that "someone, somewhere" might use, but the examples feel distant.

What are good examples of constrained optimization problems (perhaps not simple!) that today's students might actually encounter in their lives?

If your goal is to find problems that are more easily accessible, see also the sister question What are easy examples from daily life of constrained optimization?

Chris Cunningham

Posted 2014-04-11T14:42:13.387

Reputation: 9 708

1I wonder how Dr. Pangloss would answer. We live in the best of all possible worlds, but there is not a really good answer to this question. But Calculus of Variations is a really cool subject!user52817 2015-05-11T18:31:07.207

@JackM: re: I'm not going to get out a notebook and calculate an optimal route just to save myself twelve seconds of walking every morning Sounds like someone who's into bounded rationality! (Or at least someone wiser and more cognisant of the finiteness of lifespan than me. You wouldn't believe the number of pennies I've salvaged for the price of a pound (each) or my love of premature optimisation.) Incidentally, if you would save 12 seconds each time as opposed to saving on (i.e., part of) 12 seconds, and if there are enough instances of it, I might think the savings to be worth it.Vandermonde 2015-11-25T03:40:13.660

1Whoops.... I stopped myself doing a cost-benefit comparison and estimating the minimal number of days required to break even, and subsequently almost did a cost-benefit analysis of cost-benefit analyses.Vandermonde 2015-11-25T03:43:11.600

Since you are asking for examples related to calculus, the following discrete examples are only a comment: 1. Planning a trip in a city where there are mulitple ways by bus/subway/train to get from A to B. 2. Almost irrelevant, but something I encountered as a problem as a teen: Given a record tape of 2x45mins and some songs of different lengths (which aren't all required to be on the tape) - what's the best way to put songs on the tape with as few empty space at the end?Roland 2014-04-11T15:05:53.520

9There aren't any. There may be situations where it's possible to apply optimization to solve a problem you've encountered, but in none of these cases is it honestly worth the effort of solving the problem analytically. I optimize path lengths every day when I walk across the grass on my way to classes, but I'm not going to get out a notebook and calculate an optimal route just to save myself twelve seconds of walking every morning. Mathematics beyond basic arithmetic is simply not useful in ordinary life. But I'm not sure if that's exactly what you mean.Jack M 2014-04-11T15:45:16.667

14@JackM That's an extremely depressing way to think about mathematics, and I'm sorry you think that way.Chris Cunningham 2014-04-11T16:07:39.287

10@ChrisCunningham What's depressing is the notion that mathematics has to be relevant to practical life in order to be interesting.Jack M 2014-04-11T16:52:56.033

5I think you've misjudged my agenda here. Mathematics is beautiful on its own, but optimization problems could additionally be relevant. It sounds like someone once told you that the purpose of mathematics is to apply to the world, and you were very displeased. I don't think anyone here is advocating such a position -- I'm certainly not!Chris Cunningham 2014-04-11T19:00:49.853

@JackM, The simple act of catching a thrown object is something we can easily find in our daily lives, and involves a whole bunch of math... but our brains are hard-wired to perform those calculations without thinking about them (and without even necessarily knowing how to perform the math formally)Brian S 2014-04-11T20:47:08.623

I think there are a lot of great points made and it's is great that conversations like these are had regarding math and application. As one user pointed out, a lot of optimization problems have no "real-world" application and it is difficult getting a student on board and excited about math with these problems. However, I think the point with these problems and with math in general is it gives us valuable critical thinking and problem-solving skills. [Mod note: see below for the rest.]James S. 2017-09-26T18:28:42.780

[Continuing the comment above converted from an answer] So although the actual problem and topics may not have significance to the "real-world", what is significant is the cognitive development and asssociated skills gained from performing these problems.quid 2017-09-27T10:42:14.253

I agree with James. I'm not some super design engineer but have a pretty good applied background (from conversation here, more than most of the forum). And I benefited from simple optimization problems. For one thing just the intuitive drive to THINK about optimzation is helpful. So many people don't have a feel for equilibrium points. FWIW, it's not clear to me if Chris was looking for optimization like calculus of variations, like linear programming, or just a min/max calculus problem. Regardless, I think there are plenty of physical and economic examples. I wouldn't stress over slight simplguest 2017-09-27T04:07:33.507

(1) First of all, people do ring in fences, make windows, and do mechanical things. There is a tendency in academia to think everyone works for Google, but the US has been having a manufacturing renaissance in general and in particular in oil, gas, and chemicals. (2) Something good about these examples is they are intuitive. If your example involves something hard to understand as a topic such as maybe circuits than that is not as helpful if you do something that everyone can easily visualize such as a fence. (P.s. quid's continuation above was of James's comment, not of mine.)guest 2017-12-08T20:02:48.060

@ChrisCunningham Ok, done.user11235 2014-04-19T20:22:25.823



Bad Optimization Problems

I thought that Jack M made an interesting comment about this question:

There aren't any. There may be situations where it's possible to apply optimization to solve a problem you've encountered, but in none of these cases is it honestly worth the effort of solving the problem analytically. I optimize path lengths every day when I walk across the grass on my way to classes, but I'm not going to get out a notebook and calculate an optimal route just to save myself twelve seconds of walking every morning. Mathematics beyond basic arithmetic is simply not useful in ordinary life. But I'm not sure if that's exactly what you mean. – JackM

To some extent, I agree with this comment. With few exceptions, mathematics beyond basic arithmetic is simply not useful in everyday life. Students know this, and you'll have trouble convincing them otherwise.

Because of this, I've always found "everyday"-style calculus problems a little artificial. Consider the following problem from Stewart's Calculus: Concepts and Contexts.

A fence 8 ft tall runs parallel to a tall building at a distance of 4 ft from the building. What is the length of the shortest ladder that will reach from the ground over the fence to the wall of the building?

The proper response to this question is: who cares? Is there any reason to calculate this length precisely? Why would anyone ever use calculus to compute this? If you have an actual building and an actual ladder, you could just try it and see if the ladder fits. If you don't have a specific ladder in mind (e.g. you are buying a ladder), the thing to do would be to draw the situation on paper and then use a ruler to estimate the minimum length. Of course, it's neat that you can use calculus to solve this problem precisely, but this is more of a curiosity than a legitimate application.

Chris specifically mentions the farmer fence problem, the wire-cutting problem, and the Norman window problem as not relevant to the students' lives. I agree—none of these problems are relevant. But it's not because the students aren't farmers, or wire-cutters, or architects. Even in a class full of future farmers, the fence problem would still be bad, because farmers don't use calculus to plan their fences.

Good Optimization Problems

What calculus is useful for is science, economics, engineering, industrial operations, finance, and so forth. That is, it's useful for all the things that make our society run. Most students who take calculus at a university are planning to go into one of these fields, so calculus will be relevant in their lives—specifically in their future studies and in their professions.

Here's something that's closer to a real-life optimization problem:

When a critically damped RLC circuit is connected to a voltage source, the current $I$ in the circuit varies with time according to the equation $$ I \;=\; \biggl(\frac{V}{L}\biggr)te^{-Rt/(2L)} $$ where $V$ is the applied voltage, $L$ is the inductance, and $R$ is the resistance (all of which are constant).

Suppose an RLC circuit with a resistance of 30.0 volt/amp and an inductance of 0.400 volt·sec/amp is attached to a 12.0-volt voltage source. Find the maximum current that will occur in the circuit.

This is at least close to something that a physics or engineering student might actually come across in their future studies. It's real in a way that the farmer fence problem isn't, and even students who don't plan to study physics can sense that this is a legitimate application. (By the way, if you have good students, you might even ask them to come up with a formula for the maximum current, without giving them specific numbers for $V$, $L$ and $R$. This has the advantage that it can't simply be solved using a graphing calculator.)

Of course, this isn't actually a constrained optimization problem—it's just an optimization problem. I'm not actually aware of any place in science that simple constrained optimization problems arise, although there are examples from economics (maximizing utility), finance (optimal portfolios), and industrial design (e.g. shape of a can type problems). When I cover constrained optimization in calculus, I usually stick to industrial-type problems (best cans, best shipping crates/boxes, best pipeline across a river, etc.), but that's probably just because I don't know enough about economics or finance to make up problems that involve them.

Finally, I should mention that I've never found the optimization portion of Calculus I particularly compelling. It's good to introduce the idea of optimization, but setting the derivative equal to zero isn't actually a very useful optimization technique by itself. It only really works for simple formulas—for anything complicated it just replaces one essentially numerical problem (finding the maximum of a function) with another (finding roots of a function). I agree that it should be covered, but it's far from the most important application of calculus.

Jim Belk

Posted 2014-04-11T14:42:13.387

Reputation: 6 186

7Let's turn the table a bit. Suppose that it takes you 2 minutes to calculate that grass-field path that will save you 12 seconds every time you walk through the field. Then after 10 days of classes it'll pay off. You can reap the benefits for years to come. I jest but this is the kind of thing optimization problems are good for. You take the time to calculate the optimization once and you continuously benefit from it from then on.Alexander Vlasev 2014-04-30T04:00:20.307


Here's the example I had which inspired me to post the question in the first place:

The game League of Legends was the most-played PC game, in number of hours played, in North America and Europe in 2012. There is a good chance that League of Legends is a part of many of your students' daily life, especially if you are teaching engineering calculus. It doesn't have any sexual or deviant themes -- it is a game about teams of "champions" fighting in an arena -- so I've found it to be reasonable to bring it up in class. The reason to go this route is that many of your students might actually be encountering this optimization problem every day. Here's the problem:

In League of Legends, a player's Effective Health when defending against physical damage is given by $E = \frac{H(100+A)}{100}$, where $H$ is health and $A$ is armor.

(1) Health costs 2.5 gold per unit, and Armor costs 18 gold per unit. You have 3600 gold, and you need to optimize the effectiveness E of your health and armor to survive as long as possible against the enemy team's attacks. How much of each should you buy?

You can actually go further if you want to make it more complicated (and more accurate to what actually happens in the game!)

(2) Ten minutes into the game, you have 1080 health and 10 armor. You have only 720 gold to spend, and again Health costs 2.5 gold per unit while Armor costs 18 gold per unit. Again the goal is to maximize the effectiveness E. Notice that you don't want to maximize the effectiveness of what you purchase -- you want to maximize the effectiveness E of your resulting health and armor. How much of each should you buy?

And the last one is much more challenging, but it is something that even professional players of League of Legends (these exist!) can get incorrect:

(3) Thirty minutes into the game, you have 2000 health and 50 armor. You have 1800 gold to spend, and again Health costs approximately 2.5 gold per unit while Armor costs approximately 18 gold per unit. Again the goal is to maximize the effectiveness E of your resulting health and armor. How much of each should you buy?

My favorite part of this problem is that the game is actually more complicated than this -- in reality you need to defend against both physical and magic damage by buying both armor and magic resistance, which adds another variable. So the "punchline" of the exercise is that you can't actually play the most popular PC game properly until you understand Lagrange multipliers. I'll see you in Multivariable Calculus.

Instructors answers (not student solutions!):

(1) You do not spend equal money on A and H: $E = 3H - \frac{1}{720}H^2$ so the maximum is at $H = 1080$, plug back in for $A = 50$.

(2) One way to do this is to realize from number 1 that we know an optimal configuration is $H = 1080$ and $A = 50$, so right now we have way too much health and not enough armor. The answer to this is that we should spend all the money on 40 armor, to get exactly back to the optimized answer to #1.

(3) If H and A are the amount they plan to buy, the effectiveness is $E = \frac{(H + 2000)(100 + (50 + A))}{100}$ since they started with 2000 and 50 respectively. The critical point appears at H = -100, so the maximum actually occurs at one of the endpoints, not at the critical point at all. Again the player should spend all the money on armor.

Chris Cunningham

Posted 2014-04-11T14:42:13.387

Reputation: 9 708

3(1/4) It's true, and important to keep in mind, that League of Legends players skew heavily male [1], but I'm not so confident in the generalization that "PC games are, in general, played much more by the male students." Almost exactly half of PC gamers in the US are women, although that proportion may change when you specialize to university students [2].Vectornaut 2015-05-10T01:07:38.660

3(2/4) Gender demographics can vary wildly from game to game. For example, in 2009, women of age 25 and older accounted for more than half of play minutes in World of Warcraft, although they were outnumbered by male players in the same age group [3]. Around the same time, women made up only a fifth of EverQuest 2 players [4].Vectornaut 2015-05-10T01:08:14.967

2(3/4) More to the point, I'd bet there are at least a few games that involve nice math and also have pretty balanced gender distributions. One candidate is FarmVille, whose mechanics seem like a great source of optimization problems, and whose audience is a bit over half female [5].Vectornaut 2015-05-10T01:09:46.527

1Yes. Find the games that women like. I'd like to know which they are. I don't play those sorts of games myself, but I might be willing to, if I knew I could make a good optimization problem from it that would wow my students.Sue VanHattum 2015-05-10T03:44:20.517

17I'd like to point out a disadvantage of this example: PC games are, in general, played much more by the male students, so this could have the effect of exacerbating any preexisting notions that math and science classes are "boys' clubs." I'm not sure how important this is, but it is worth considering.Chris Cunningham 2014-04-11T19:07:21.520

6Both PC games and math have these preexisting notions and both are to a great extend true, so by disregarding one you should disregard both notions or disregard neither and accept both. Oh well, either way, a lot of examples in mathematics are about building stuff, but I haven't seen anybody complain yet that construction is a male thing to do (and the gender ratio is even far more strongly male in construction work than it is in gaming or maths)David Mulder 2014-04-11T22:49:22.247

15Additionally let me add that I think gaming is one of the greatest possible cases mathematics can use. Why? Because it has simpler models than (useful) physics, yet complex and relevant enough models to be useful for students. True, a part of the students will be quite alienated by the cases, but on average I think students tend to apply their mathematics skill by far the most in games (you would be surprised what crazy spreadsheets highschoolers are able to construct if it is to win some game)David Mulder 2014-04-11T22:51:44.643

1@ChrisCunningham - It's good to be thinking about that. In this case, I would say that it's fine, especially among engineering students. Just provide a variety of examples from different areas.. you are right on that most students will put WAY more effort into game optimization than other tasks, and see game optimization as much more relevant to their lives.Ian 2014-04-12T19:17:40.527


This is from a post of mine on Math Stackexchange.

When I was in college, I owned three lamps and had a dark apartment. I kept trying to position them in different areas of the room, but it was still dark. Then I decided to model the problem with math: given three light sources of equal strength in a rectangular solid of a room, where can you place them to maximize the average value of the amount of light reaching a point in the solid?

Then I realized that the asymptotes at the light bulbs themselves would make the average diverge.

Recently, I thought of a reformulation:

Given three light sources in a rectangular solid of a room (assume height of ten feet, width of 15 and length if 25),all at height 6 ft., where should they be placed to maximize the average value (Edit: Minimum value) of the intensity of the light on the plane at height 3.5 ft.? (Since the couches are that height).

Alternatively, if someone can give a more accurate reformulation of this problem (perhaps involving reflections of the wall) and solve it, that would be much cooler.

Brian Rushton

Posted 2014-04-11T14:42:13.387

Reputation: 5 998

5To illustrate what I said in the comments, although this is certainly an interesting problem, and easy for a student to relate to their own life, what I think would be actually harmful is telling a student that being able to solve a problem like this would be actually useful to them (although I don't think that's what the answerer is saying). Say it's interesting, but don't say with a straight face that it's useful - the student isn't that stupid, and you'll only lower their opinion of you, and cement their point of view that math is pointless.Jack M 2014-04-11T18:36:41.060

8@JackM Unfortunately, you are wrong. I had struggled with this problem with weeks, and after getting an answer on MathSE, I implemented their solution and significantly improved my lighting. My wife and I use it as a guide every time we rearrange furniture.Brian Rushton 2014-04-11T18:55:43.190

5No student is going to consider "you'll slightly (or even significantly) improve your lighting one day", or anything similar, as enough of a justification for soldiering through a class that they hate for another four years. It's better to simply try to communicate to them that the most interesting aspects in mathematics aren't in how it can solve real-world problems. Problems inspired by reality can be useful for that, but it seems counterproductive to take the attitude that the problems are interesting because they're useful.Jack M 2014-04-11T19:03:54.107

2@jack-m, the problems are interesting because they are useful somewhere. Some are interesting in "real life", even simple, or simplified, math can shed light on daily real problems. Those quite interest me, they seem to interest a few other people here, Chris that started this question, Brian in this reply, and so on. And I bet it interested them, as it did me, when I was a student. So simply because they do not interest you, don't extrapolate that 'no students' will enjoy them. Some will, many, or a few, I don't know, but some will for sure.Rolazaro Azeveires 2014-04-14T02:07:25.473


An answer depends on what you mean with their lives. I think, it is more likely that students will face such problems in their working (not academic) life.

The Netflix Prize example

My example is the Netflix Prize, which was awarded by Netflix in the mid 2000s. At that time, Netflix was a DVD rental service and users did rate the movies they have seen. Netflix had some algorithm which gave recommendations which movies a particular user could like and awarded 1 mio $ to the team which improved the algorithm by 10%.

The rating was as follows: For all users $u\in U$ and all movies $m\in M$, there is a (possible) rating $r(u,m)\in\lbrace 0,1,2,3,4,5\rbrace$. There is a subset $K\subset U\times M$, for which the rating function is known. Netflix did a partition of $K$ into $K_{\text{known-to-everyone}}$ and $K_{\text{known-to-netflix}}$. The problem was then:

Find an approximating rating function $r_{\text{appr}}$ such that $\Vert r_{\text{appr}}(u,m)-r(u,m)\Vert_{K_{\text{known-to-netflix}}}$ subject to $r_{\text{appr}}(u,m)=r(u,m)$ on $K_{\text{known-to-everyone}}$.

That means, everyone got the known data and should make some model to make good predictions (depending on a specific given norm) on unknown data only known to Netflix (who by that data found out which algorithm was good).

The documentation of the best algorithm is published; some other teams published their approach as well and used methods from constrained optimization. I was attending a talk where someone presented his solution which uses a low rank approximations and optimization methods on manifolds.

Why could that be important to students in their future lives?

The prize was awarded and the million is gone. But I can image that such "data fitting" task are common in insurance economy where they have a lot of data and want to find models in order to derive unknown data, which will be important for the insurance company to model their prices.

Markus Klein

Posted 2014-04-11T14:42:13.387

Reputation: 5 854


As I mentioned in my other answer, it highly depends what is meant by their lives. Here is a every day problem which I, at least, often encounter:

If you do the dishes and finish, there is a lot of foam in your sink. Arrange the position and strength of the water-tap in order to let the foam disappear as fast as possible.

The problem sounds easy, but is indeed an optimal control problem with partial differential equations (Navier-Stokes) and boundary control, which is not very easy to solve :)

Markus Klein

Posted 2014-04-11T14:42:13.387

Reputation: 5 854

1Ha! This is amazing. Maybe I should remove the calculus tag from my question to encourage more such answers.Chris Cunningham 2014-04-11T19:03:07.257

3Not at all relevant to the question, but there is a non-mathematical answer to your foam problem. Dissolve one or two Gas-X tablets in the dish water. The simethicone in the Gas-X is an anti-foaming agent. It will prevent formation of foam, and it will make any existing foam disappear quickly.Tristan 2014-04-11T19:51:05.047

Or sprinkle some salt on top.JPBurke 2014-04-12T20:56:23.280


The original classic real-life example is to lay out a shop floor with multiple workstations and workers, so as to minimize travel distance of the work piece given a required sequence of operations. This can be generalized to consider a standard work load distributed amongst more than one type of workpiece, with different sequences of operations, and different times spent at each workstation.

Some links:

Any number of additional links could probably be found by Googling "Lean Kai-Zen" and "optimizing shop floor layout"

A second classic example is the optimization of paper-flow through an accounting department. Two other examples were these techniques were used to great effect in WWII are noted here (my emphasis):

While performing an analysis of the methods used by RAF Coastal Command to hunt and destroy submarines, one of the analysts asked what colour the aircraft were. As most of them were from Bomber Command they were painted black for night-time operations. At the suggestion of CC-ORS a test was run to see if that was the best colour to camouflage the aircraft for daytime operations in the grey North Atlantic skies. Tests showed that aircraft painted white were on average not spotted until they were 20% closer than those painted black. This change indicated that 30% more submarines would be attacked and sunk for the same number of sightings.[19] As a result of these findings Coastal Command changed their aircraft to using white undersurfaces.

A Warwick in the revised RAF Coastal Command green/dark grey/white finish Other work by the CC-ORS indicated that on average if the trigger depth of aerial-delivered depth charges (DCs) were changed from 100 feet to 25 feet, the kill ratios would go up. The reason was that if a U-boat saw an aircraft only shortly before it arrived over the target then at 100 feet the charges would do no damage (because the U-boat wouldn't have had time to descend as far as 100 feet), and if it saw the aircraft a long way from the target it had time to alter course under water so the chances of it being within the 20-foot kill zone of the charges was small. It was more efficient to attack those submarines close to the surface when the targets' locations were better known than to attempt their destruction at greater depths when their positions could only be guessed. Before the change of settings from 100 feet to 25 feet, 1% of submerged U-boats were sunk and 14% damaged. After the change, 7% were sunk and 11% damaged. (If submarines were caught on the surface, even if attacked shortly after submerging, the numbers rose to 11% sunk and 15% damaged). Blackett observed "there can be few cases where such a great operational gain had been obtained by such a small and simple change of tactics".[20]

Pieter Geerkens

Posted 2014-04-11T14:42:13.387

Reputation: 199


When someone swallows a dose of a drug, it doesn't go into their bloodstream all at once. What will the drug's peak blood concentration be, and when will it be reached?

If the drug is caffeine, which is absorbed and eliminated by first-order kinetics, its blood concentration $c$ rises and falls over time along the curve $$c(t) = \tfrac{D}{1-\beta/\alpha}\left(e^{-\beta t} - e^{-\alpha t}\right),$$ where $\alpha$ is the absorption rate, $\beta$ is the elimination rate, and $D$ is the size of the dose. The expression for the time of the peak is very pretty. Once you work it out, you can check your answer on p. 108 of this study, where the authors use it to help interpret their data.

For alcohol, which is eliminated by zeroth-order kinetics, the differential equation for the blood concentration curve $c(t)$ is simple enough for a first-year calculus student to solve: $$c'(t) = D\alpha e^{-\alpha t} - \beta.$$ After checking your work against Equation 1 from this study, you can find the peak time as before.

In case the study links break, here they are for the record:

  • Seng et al. Population pharmacokinetics of caffeine in healthy male adults using mixed-effects models. Journal of Clinical Pharmacy and Therapeutics (2009).
  • Uemura et al. Individual differences in the kinetics of alcohol absorption and elimination: A human study. Forensic Science, Medicine, and Pathology (2005).

Although finding the blood concentration curve for caffeine is probably beyond first-year calculus students, it might be a fun exercise for differential equations students. It's given by the linear system $$\left[ \begin{array}{r} s' \\ c'\end{array} \right] = \left[ \begin{array}{r} -\alpha & 0 \\ \alpha & -\beta \end{array} \right] \left[ \begin{array}{r} s \\ c\end{array} \right],$$ where $s$ is the concentration of caffeine in the drinker's digestive tract.


Posted 2014-04-11T14:42:13.387

Reputation: 261


Edit (4/29/14): A popular media piece in the New York Times on rent division gives a great example of how Sperner's Lemma can be used for fair division problems (as related to cake cutting, the history of which can be found in a pasted excerpt at the end of my response here). The AMM article drawn upon is:

Su, F. E. (1999). Rental Harmony: Sperner's Lemma in Fair Division. American mathematical monthly, 106(10), 930-942. Link (no paywall).

A March 2014 PLOS paper describes a mathematical model using optimal control theory and a system of ODEs to build an app that combats jet-lag. A popular media piece can be found here, with the headline: A new mathematical model can cut jet-lagged time in half. Even if the details elude students, this is certainly a problem that today's students might run into; moreover, they can now take part in testing the app to determine if it works.

Excerpt from the latter link:

[Biological mathematician] Forger admits that the schedules his model spits out may sometimes seem counterintuitive, but intuition, he says, is not the point.

"We're trying to move the science beyond your grandmother's advice of 'wake up late' or 'avoid carbohydrates' to something that can be rigorously tested," he said. "All I know is these schedules are optimal according to the mathematics."

Forger spent 10 years building his model based on data collected from sleep studies done at Harvard and the University of Michigan. He had no idea what type of schedules the model would come up with when he first started, so he was pleasantly surprised that according to the math, the best way to beat jet lag is to adjust the time of your dawn and dusk each day.

See more in the LA Times write-up or in the methods section (p. 10) of the actual paper.

In case the cake-division discussion below does not suffice, there is the question of how one physically carries out the division for a different food: matzah.

See the short Wired article here, and perhaps the question of how to break matzah optimally (for two people: in half) can provide a real-life optimization problem.

I would probably start by looking to literature on mathematical modeling. An example source is the COMAP book "For All Practical Purposes" which includes sections on optimal entry (in elections), optimal production policies, and optimal schedules. There are plenty of other problems that don't have the word "optimal" in their name (e.g., bin packing). The book provides a wealth of examples; another nice one is fair division, which can be applied to scenarios ranging from company mergers to inheritance to organ transplant policies. Some of these are probably a bit removed from students' daily lives, but others are run into frequently. For instance, you could read over the literature on cake-division.

For three cake eaters, there is the Steinhaus Proportional Procedure; for four or more, there is the Banach-Knaster proportional procedure. The book contains a sixty-year history of cake cutting. I have pasted an image of this below (written up as p. 421 in the eighth edition); the word "California" is, for some reason, omitted between the two columns:

enter image description here

I have included only one actual excerpt here, but I recommend this book - and other materials on mathematical modeling, e.g., COMAP's Mathematical Modeling Handbook - as sources for optimization problems encountered (either literally, such as when you want to divide up a cake, or mathematically, when you see another problem to which you can apply these models/methods).

Benjamin Dickman

Posted 2014-04-11T14:42:13.387

Reputation: 14 735

On a similar note, it may be a good idea to provide students with an open-ended mathematical modeling problem which seeks the maximal or minimal value of some quantity. Students will ultimately be forced to use calculus to determine the maximum or minimum of this function.Shivam Sarodia 2014-04-12T03:49:07.443

2This answer is turning into an incredible resource. Thanks so much for this.Chris Cunningham 2014-04-29T14:34:14.610

1@ChrisCunningham Surprising to see fair-division problems repeatedly cropping up: cake-division, then matzah-division, now rent-division. (The Baader-Meinhof Phenomenon in action...) If I start to accrue other (non-division) examples, then I may have to post another response in order to keep this one from becoming unwieldy!Benjamin Dickman 2014-04-29T14:43:05.300


Here's a problem that I found interesting: I listen to audiobooks. When you import them from CD, you get lots of tiny chapters (often 2 or 3 minutes) which is not very practical. Also, audiobooks can be very long - some are 30 hours - which is also not very practical. I prefer audiobooks to be split into individual volumes of not more than 8 hours, and chapters around 10 minutes. Assume that you can combine consecutive chapters into one chapter (chapters are indivisible), and that you can combine consecutive chapters into volumes.

Problem 1: Define an optimisation problem. Find a function that, if minimised, produces audiobooks in the way that I (or you) prefer them. I'd want volumes as long as possible, but never more than 8 hours (unless a chapter is longer than 8 hours and it becomes unavoidable), and volumes of approximately equal length. I'd want chapter length around ten minutes, and preferably equal lengths. Defining a function to minimise is not trivial.

Problem 2: Find an optimal solution according to the function to be minimised. Decide how important execution speed is (hint: Actually creating an audiobook according to the solution takes a long time). Obviously the way you combine chapters affects the possible lengths of volumes.

Problem 3: Does the optimal solution actually match my/your preferences? If not, is it because finding a good solution was hard, or because the optimisation problem wasn't chosen well? If needed, go back to problem 1.


Posted 2014-04-11T14:42:13.387

Reputation: 481

1+1 For adding Problem 3, that's a very important part of "real world" optimization that often gets left out of exercises.Ian 2014-04-12T19:13:18.287

How critical is it that the chapters stay in the correct order? I wouldn't want an audiobook that jumps from chapter 3 to chapter 10.Nzall 2014-04-14T12:08:19.457


Here's an optimisation problem that really should have solutions readily available, but hasn't: Consider a SatNav that tells you the best way to get from A to B. Now assume the distance is quite long, and you won't be able to get from A to B without going to a petrol station. So what I want: Find the shortest way from A to B visiting any petrol station within X miles of my current location. They all are capable of showing you nearby petrol stations, but that's not what I want if I'm 200 miles away from B and have fuel for 150 miles in the tank.

By the way: Finding the shortest path from A to B is actually an interesting problem in itself. SatNavs (at least the cheap ones that you will tend to use) are not capable of actually finding what I would consider good solutions, which take into account time, fuel consumption, wear and tear on the car, driver stress. (For example a short journey with many turns where I have to give way to other drivers means I stop and accelerate a lot and have more stress).


Posted 2014-04-11T14:42:13.387

Reputation: 481

Even more interesting, find me a petrol station between A and B taking into account the cost of petrol at each station, how much petrol/time is used to get to the station, how much petrol I have at present and how a full tank reduces MPG.Ian 2014-04-19T13:11:51.127


A lot of examples exist in industry.

  • Manufacturing plants use optimization to figure out how to best run their machinery, buy raw materials, ship finished goods, etc.
  • Airlines and other passenger transportation services use optimization to determine their schedules.
  • The cargo transportation industry (trucking, trains, etc.) uses optimization to determine how to transport goods as quickly and inexpensively as possible.

I had an entire series of classes in my undergraduate program centered around an example of optimization in transportation. (I was part of a program that combined computer science and business, so the administrators had a lot of leeway designing classes that went together.) We had to write a program for a fictitious train company that determined how to transport orders in the cheapest way possible using the simplex algorithm. We had to write our own implementation of the simplex solver in a programming class and learned about the algorithm in detail in a math-heavy business course.


Posted 2014-04-11T14:42:13.387

Reputation: 161

+1 for mentioning that you found an example rich and compelling enough to build a series of classes around. Creating good problems is as much a writing task as it is a mathematical one. I imagine it's pretty easy to come up with dry, boring examples of linear programming problems, but those are worse than useless from an educational point of view.Vectornaut 2015-05-10T03:19:53.567


Can't believe no one's mentioned the coke-can problem!

You are the designer of drinks cans for Coke, how can you make them the most money?

Pretty quickly it comes out that you want a cylinder of volume 330ml with minimal surface area (use the least metal possible to enclose your beverage).

It's a classic problem and one kids can very easily relate to on all number of levels, especially if you hype it a little bit.

The interesting punchline is that Coke cans don't look at all like your design (which is predictably as close to a cube as a cylinder can get), for reasons that transpire to be aesthetic. But paint cans totally do though... This is because the metal must be significantly thicker in this case.

Tom Boardman

Posted 2014-04-11T14:42:13.387

Reputation: 161


Finance has lots of good examples. Here is one version of the portfolio optimization problem.

Suppose two assets have mean excess returns $\mu, \mu'$, standard deviations $\sigma, \sigma'$ and a correlation $\rho$. You have cash to distribute among these two assets in proportions $a, a'$ where $a+a'=1$. What values of $a,a'$ maximize the Sharpe ratio of your investment: $$\frac{a\mu + a'\mu'}{\sqrt{a^2 \sigma^2 + a'^2\sigma'^2 + 2\rho\, aa'\sigma\sigma'}}?$$


Posted 2014-04-11T14:42:13.387



Creating a timetable, all students should understand the issues. However mathematical solutions don’t work as well as computer sci solutions.

Choosing a set of options, so as to get a degree while having the lease dead time, the dead time being when you are waiting for the next activity to start, but don’t have long enough to do someone useful.

In the US when degrees can take a undefined number of years, deciding how much part time work to do, so as to minimise the debt level at age 30. More part time work, increase the time to get the degree, but decreases the debt earn per year. Completing the degree sooner, allows the repayment of the debts to start sooner.


Posted 2014-04-11T14:42:13.387

Reputation: 131


A real-life optimization problem: It takes about 20 clicks and 2 minutes to shoot a wolf. 200 dead wolves will get you enough experience points to get to the next level. It takes about 50 clicks and 10 minutes to steal gold from a palace. 50 burglaries will get you enough experience points to get to the next level. However, you would get carpal tunnel syndrome after 3000 clicks which would force you to stop playing for a day. What is the shortest possible time you can get to the next level?


Posted 2014-04-11T14:42:13.387

Reputation: 817

I imagine that people who farm gold for a living face some version of this problem every day, and that the solutions they find can have a serious effect on their quality of life.Vectornaut 2015-05-10T03:11:56.553


The concept of impedance matching is one that is occurring in your daily life right now if you're using a wired internet connection. There are more sophisticated and less sophisticated examples of impedance matching. A very conceptually simple one is the following. Suppose that a fixed voltage is applied to resistors $x$ and $y$, which are in series. The resistance $y$ is fixed. You are free to choose any value of $x$ in order to maximize the power dissipated in $x$. The power is $V^2x/(x+y)^2$.

Another example from everyday life is that you want to throw a baseball as far as possible. The range is $R=(2v^2/g)\sin\theta\cos\theta$, where $v$ is the fixed speed at which you can throw, and $\theta$ is the angle at which you throw the ball, relative to the horizontal. At what angle should you throw?

Ben Crowell

Posted 2014-04-11T14:42:13.387

Reputation: 6 200

1The baseball problem feels pretty contrived to me, but when you replace the baseball with a cannonball, it becomes a problem that was studied intensely by the military engineers of 18th-century Europe. I'd guess that the maximum range of a cannon falls far short of the one you'd compute this way, because air resistance apparently has a big effect on cannon shots, but this computation at least gives you an easy upper bound. Chapter 13 of Steele and Dorland's The Heirs of Archimedes looks like a great resource for this.Vectornaut 2015-05-14T22:12:22.840


Profit maximation!

It's easy to understand, not so hard to calculate and even testable. Let them sell lemonade or whatever at the next school festival and see, if they can find the optimal price for the lemonade.


Posted 2014-04-11T14:42:13.387

Reputation: 3 108

1This isn't really a math problem, as it involves a lot of knowledge about customer habits and preferences.Jack M 2014-04-11T18:38:22.073

@JackM That's no reason not to apply a mathematical model. And there are easy enough models usable for constrained optimization problems.Toscho 2014-04-11T19:09:01.067

Sure. I'd be interested in a longer answer if you have any specific ideas.Jack M 2014-04-11T19:12:13.710

2The most simple, usable model is:

$\text{Numbers sold}=f(\text{price})$ with a linear function $f$ with negative linear coefficient. The result will be quadratic function $\text{Profit}=g(\text{price})$ with negative main coefficient. – Toscho 2014-04-11T19:15:39.743


How about figuring out the dimensions of a cylindrical can of a specific volume that will minimize the surface area (and therefore minimize the amount of metal material needed to make up the can)?

If you've taught calculus, you probably recognize this as one of the classic textbook optimization examples along with fences against barns and picture frames and the like, but the cylindrical can example seems to me the most practically relevant out of those classics.

Note that a rectangular prism shape would make the optimization solution too boring, and any variation in which a container has an open top just seems too contrived, since stuff is never shipped in a container with an open top.

Frank Newman

Posted 2014-04-11T14:42:13.387

Reputation: 377


No one has mentioned shopping directly, although various economic optimization problems have appeared in this thread.

You have $20 to spend for your breakfast budget. See how oatmeal (or your favorite breakfast option) is packaged at different prices, whether by single serving envelope, small container at one price, large container at another. What is your quantity to optimize, and how will it affect your purchase? Flavor, convenience, wastage are some factors to consider, but even if the oatmeal is the same in each packaging, one of them will have the lowest ratio of price to pound. One can take this example in many directions and still keep to the shopping domain.

Gerhard "Come See My Shoe Collection" Paseman, 2015.05.11

Gerhard Paseman

Posted 2014-04-11T14:42:13.387

Reputation: 2 316


Since you didn't explicitly ask for problems that students should be able to solve, here are some of interest to many engineers: Which shape of the wing of an F1-car maximises downward force? Or which shape of wing of given span maximise the lift of an airplane. Which shape of a rear-view mirror for a car reduces drag? etc.

These problems are not constrained by algebraic equations but by PDEs, and the objective quantity is given an integral. These examples are from mechanical engineering, but I'm sure there are many similar problems in electrical or civil engineering. Engineers often solve these by discretising the PDEs and then applying the usual methods taught in constrained optimization. But they are also very interested in staying directly at the level of PDEs and applying Lagrange multipliers there. Part of this is known as the "continuous adjoint method" among engineers.

Michael Bächtold

Posted 2014-04-11T14:42:13.387

Reputation: 374


Why not maximum likelihood estimation (from stats, if you're not familiar with this) in the one-parameter case? You don't need to provide all of the statistical jargon to them. Simply present a formula and ask them to find the value of the parameter which maximizes the parameter.

For example, I recently finished teaching Calc. I to a friend of mine. Here's my memory of how I worded the question:

Suppose you have $n$ known numbers $Y_1, \dots, Y_n$ from a normal distribution (which you can simply explain is a "bell-shaped curve") with known standard deviation $\sigma$ but unknown mean $\mu$. (These terms are not too hard to explain visually.) In statistics, we have to somehow figure out a way to estimate $\mu$. One method entails finding a formula for $\mu$ which maximizes $$L(\mu) = \dfrac{1}{(2\pi\sigma^2)^{n/2}}\exp \left[-\dfrac{1}{2\sigma^2}\sum_{i=1}^{n}(Y_i - \mu)^2 \right]$$ where $\exp(x) = e^{x}$. Find the formula for $\mu$ which maximizes $L$, and be sure to justify that it maximizes $L$ through a second-derivative test. (Hint: you may use the fact that $L(\mu) > 0$. Also, why does the resulting formula for $\mu$ makes intuitive sense?)

Of course, I wouldn't provide this problem to a traditional Calc. I course - it is an intimidating question with all of its symbols. But I appreciated being able to give my friend a taste of how calculus is actually used in higher-level math, and I feel that not enough attention is paid to statistics in a lot of math courses. Most actual applications of calculus are not as simple as the exercises that are used in calculus textbooks.


Posted 2014-04-11T14:42:13.387

Reputation: 158


Many daily life and OR problems take the following form. One has a container of fixed size and a collection of objects each with a value, and size less than that of the container. The goal of the optimization is to decide what items to take which maximizes the value of what gets taken subject to the size constraint. Problems of this kind are known as knapsack problems, and a problem of this kind is solved every time one takes an airplane trip and also when the International Space Station has supplies sent.


Joseph Malkevitch

Posted 2014-04-11T14:42:13.387

Reputation: 1 489