## Maximizing 2 Variables

For the discussion of math. Duh.

Moderators: gmalivuk, Moderators General, Prelates

jewish_scientist
Posts: 1000
Joined: Fri Feb 07, 2014 3:15 pm UTC

### Maximizing 2 Variables

"Tragedy of the Commons" by Prof. Hardin wrote:It is not mathematically possible to maximize for two (or more) variables at the same time. This was clearly stated by von Neumann and Morgenstern (3), but the principle is implicit in the theory of partial differential equations, dating back at least to D’Alembert (1717–1783).

This does not seem correct to me. I know that if two variables are directly proportional, then maximizing one requires maximizing the other. I am willing to bet that other examples disproving this claim exist. I think that Prof. Hardin, a biologist, misinterpreted the mathematics. However, I would like to double check before making a fool of myself.
"You are not running off with Cow-Skull Man Dracula Skeletor!"
-Socrates

doogly
Dr. The Juggernaut of Touching Himself
Posts: 5493
Joined: Mon Oct 23, 2006 2:31 am UTC
Location: Lexington, MA
Contact:

### Re: Maximizing 2 Variables

It is in fact not possible to have a feature for maximizing for two variables.

You can maximize for a function, that's fun and good.
LE4dGOLEM: What's a Doug?
Noc: A larval Doogly. They grow the tail and stinger upon reaching adulthood.

Keep waggling your butt brows Brothers.
Or; Is that your eye butthairs?

jewish_scientist
Posts: 1000
Joined: Fri Feb 07, 2014 3:15 pm UTC

### Re: Maximizing 2 Variables

If x/ y = c and c is constant, then maximizing x maximizes y, unless maximizing means something other than what I think it means.
"You are not running off with Cow-Skull Man Dracula Skeletor!"
-Socrates

DavidSh
Posts: 179
Joined: Thu Feb 25, 2016 6:09 pm UTC

### Re: Maximizing 2 Variables

I think the late Dr. Hardin was speaking in general terms, that you can't always maximize both of two inter-related variables. Of course there are specific cases in which you can. Just like saying you can't trisect an angle with a compass and straight-edge, while there are specific angles that you can trisect with those tools.

doogly
Dr. The Juggernaut of Touching Himself
Posts: 5493
Joined: Mon Oct 23, 2006 2:31 am UTC
Location: Lexington, MA
Contact:

### Re: Maximizing 2 Variables

jewish_scientist wrote:If x/ y = c and c is constant, then maximizing x maximizes y, unless maximizing means something other than what I think it means.

Yeah, the problem is that "having two variables" means something different than you think it means.
LE4dGOLEM: What's a Doug?
Noc: A larval Doogly. They grow the tail and stinger upon reaching adulthood.

Keep waggling your butt brows Brothers.
Or; Is that your eye butthairs?

jewish_scientist
Posts: 1000
Joined: Fri Feb 07, 2014 3:15 pm UTC

### Re: Maximizing 2 Variables

What does it mean then?
"You are not running off with Cow-Skull Man Dracula Skeletor!"
-Socrates

doogly
Dr. The Juggernaut of Touching Himself
Posts: 5493
Joined: Mon Oct 23, 2006 2:31 am UTC
Location: Lexington, MA
Contact:

### Re: Maximizing 2 Variables

The general, arbitrary case. There is an x, and there is a y.
LE4dGOLEM: What's a Doug?
Noc: A larval Doogly. They grow the tail and stinger upon reaching adulthood.

Keep waggling your butt brows Brothers.
Or; Is that your eye butthairs?

Eebster the Great
Posts: 3204
Joined: Mon Nov 10, 2008 12:58 am UTC
Location: Cleveland, Ohio

### Re: Maximizing 2 Variables

If you have two variables that are functions of the same parameter, for instance, x(t) and y(t), then generally the maxima of x(t) will not be maxima of y(t). I'm pretty sure that's all it comes down to. Obviously if x=c1t and y=c2t, then there simply aren't any maxima at all (unless c=0). If x=c1t and y=c2t and x and y are subject to a constraint, then you are still really only maximizing one variable.

gmalivuk
GNU Terry Pratchett
Posts: 26577
Joined: Wed Feb 28, 2007 6:02 pm UTC
Location: Here and There
Contact:

### Re: Maximizing 2 Variables

Yeah, with x(t) and y(t) plotted on an x-y plane, maximizing x and y at the same time means having a cusp that "points" toward the top-right.

cusp.png (6.23 KiB) Viewed 4504 times

Such a cusp is not a general feature of parametric plots, and it's irrelevant (to the general case) that if your graph is just a line segment through the origin then you can identify the top-right endpoint of that segment.
Unless stated otherwise, I do not care whether a statement, by itself, constitutes a persuasive political argument. I care whether it's true.
---
If this post has math that doesn't work for you, use TeX the World for Firefox or Chrome

(he/him/his)

jaap
Posts: 2091
Joined: Fri Jul 06, 2007 7:06 am UTC
Contact:

### Re: Maximizing 2 Variables

gmalivuk wrote:Yeah, with x(t) and y(t) plotted on an x-y plane, maximizing x and y at the same time means having a cusp that "points" toward the top-right.

cusp.png

Such a cusp is not a general feature of parametric plots, and it's irrelevant (to the general case) that if your graph is just a line segment through the origin then you can identify the top-right endpoint of that segment.

In your picture you can maximise x further, at the cost of taking a hit on y, by choosing the right-most point of that loop at the bottom right.

--
Generally, if you are in a situation where you would like to maximise two variables, you have to choose an objective function. In its simplest form you simply assign weights to the variables x and y, as a measure of how much value you attach to increasing one over the other. For example, if increasing x by 1 unit is always worth twice as much to you as increasing y by 1 unit, then you would have the objective function F(x,y)=2x+y. This offers you a way of deciding whether for example (6,20) is better than (16,13).
If you have a picture of your search space (whether it is a line like gmalivuk's picture, or a region of the x-y plane) then you can draw lines F(x,y)=c for various values of c in the picture. My example F gives you parallel lines, with higher values of c the further up and to the right you go. Your optimal point is the furthest point (or points) of your search space in that direction.

Eebster the Great
Posts: 3204
Joined: Mon Nov 10, 2008 12:58 am UTC
Location: Cleveland, Ohio

### Re: Maximizing 2 Variables

Again, you are maximizing the objective function, not "two variables". You can certainly maximize a function of multiple variables (if it has a maximum).

jaap
Posts: 2091
Joined: Fri Jul 06, 2007 7:06 am UTC
Contact:

### Re: Maximizing 2 Variables

Eebster the Great wrote:Again, you are maximizing the objective function, not "two variables". You can certainly maximize a function of multiple variables (if it has a maximum).

I'm not disagreeing, just explaining why you need such a function and giving a simple example.

gmalivuk
GNU Terry Pratchett
Posts: 26577
Joined: Wed Feb 28, 2007 6:02 pm UTC
Location: Here and There
Contact:

### Re: Maximizing 2 Variables

My MSPaint masterpiece wasn't meant to show a global maximum, just what a local maximum (of two variables at the same time) would look like.
Unless stated otherwise, I do not care whether a statement, by itself, constitutes a persuasive political argument. I care whether it's true.
---
If this post has math that doesn't work for you, use TeX the World for Firefox or Chrome

(he/him/his)

doogly
Dr. The Juggernaut of Touching Himself
Posts: 5493
Joined: Mon Oct 23, 2006 2:31 am UTC
Location: Lexington, MA
Contact:

### Re: Maximizing 2 Variables

Local maxima get a bad rap.
LE4dGOLEM: What's a Doug?
Noc: A larval Doogly. They grow the tail and stinger upon reaching adulthood.

Keep waggling your butt brows Brothers.
Or; Is that your eye butthairs?

pogrmman
Posts: 573
Joined: Wed Jun 29, 2016 10:53 pm UTC
Location: Probably outside

### Re: Maximizing 2 Variables

To give a real world example of an objective function: say you’re designing a telescope with two curved mirrors. No matter what, it’ll have some things that mess up the view, but most importantly coma, astigmatism, and spherical abberation.

You cannot minimize all of these at the same time if you have two curved mirrors. How do you decide how curved the mirrors are?

Well, you need to first figure out how important not having each of these aberrations is to you. Assume you can calculate values for each abberation given how curved each mirror is. You can then make a function like so:

Code: Select all

`cost(coma, spherical abberation, astigmatism) = importance(coma) + importance(spherical abberation) + importance(astigmatism)`

You then pick curves for the mirrors that make this function fall into a local minimum.

The objective function is what allows you to decide whether it’s more important to maximize or minimize one variable over another.

Eebster the Great
Posts: 3204
Joined: Mon Nov 10, 2008 12:58 am UTC
Location: Cleveland, Ohio

### Re: Maximizing 2 Variables

Another example of a typical problem encountered in Calculus class is maximizing a function (like the area of a region) with parameters (like dimensions of the region) subject to some constraint (like a constant perimeter). For instance, if a farmer with 100 m of fencing wants a rectangular pen made of fencing on three sides and the wall of his barn on the other, he can get the maximum area by choosing the parallel sides to be 25 m each and the other side to be 50 m, yielding an area of 1250 m2.

jewish_scientist
Posts: 1000
Joined: Fri Feb 07, 2014 3:15 pm UTC

### Re: Maximizing 2 Variables

If an objective function can find the value that maximizes variables weighted by their importance, then what does Hardin's quote mean?
"You are not running off with Cow-Skull Man Dracula Skeletor!"
-Socrates

Xanthir
My HERO!!!
Posts: 5366
Joined: Tue Feb 20, 2007 12:49 am UTC
Contact:

### Re: Maximizing 2 Variables

Again, you are then maximizing a *function* of the two variables. You are not maximizing the variables themselves. Each individual variable might not be at its max value; the function itself is.
(defun fibs (n &optional (a 1) (b 1)) (take n (unfold '+ a b)))

Zamfir
I built a novelty castle, the irony was lost on some.
Posts: 7546
Joined: Wed Aug 27, 2008 2:43 pm UTC
Location: Nederland

### Re: Maximizing 2 Variables

jewish_scientist wrote:If an objective function can find the value that maximizes variables weighted by their importance, then what does Hardin's quote mean?

That there is not always an impartial, 'technical' method to pick an objective function. Pick one objective function to get this answer, pick another function to get another answer. Which one is optimal?

It just shifts the problem from 'what is the optimal result for this problem' to 'what is the optimal objective function'.

gmalivuk
GNU Terry Pratchett
Posts: 26577
Joined: Wed Feb 28, 2007 6:02 pm UTC
Location: Here and There
Contact:

### Re: Maximizing 2 Variables

jewish_scientist wrote:
If an objective function can find the value that maximizes variables weighted by their importance, then what does Hardin's quote mean?
Maximizing variables weighted by importance maximizes something like a*x+b*y. In other words, it maximizes something like the sum of two variables. The quote means you can't (in general) maximize both variables at the same time.

Assuming a and b are both positive (to maintain a usual sense of "maximum"), you still go from finding the highest point on the graph to the rightmost point on the graph and everything in between (e.g. finding the "northeasternmost" point on the graph, or finding the "north-northeasternmost" point, or the "northeast-by-northernmost" point, or any other direction in the first quadrant).

If the graph is a circle (x = cos t, y = sin t), what's the "correct" objective function to maximize to pick the "maximum" point on that circle?
Unless stated otherwise, I do not care whether a statement, by itself, constitutes a persuasive political argument. I care whether it's true.
---
If this post has math that doesn't work for you, use TeX the World for Firefox or Chrome

(he/him/his)