How to Maximize a Fuctio without Really Tryig MARK FLANAGAN School of Electrical, Electroic ad Commuicatios Egieerig Uiversity College Dubli
We will prove a famous elemetary iequality called The Rearragemet Iequality. We will the show that this iequality has some far-reachig cosequeces! 3 Motivatig Example (Part 1). Bakotes are available i the deomiatios of EUR5 ad EUR10. You are allowed to take 3 bakotes of oe type, ad 7 bakotes of the other type. How should you choose i order to maximize the amout of moey you have? Aswer. Choose 3 EUR5 otes, ad 7 EUR10 otes. Obvious! Justificatio. Because 3 5 + 7 10 > 3 10 + 7 5. This example motivates the followig result. The Rearragemet Iequality (Case of two variables): Let a < b ad x < y. The ax + by > ay + bx.
Proof: Note that b a > 0 ad also y x > 0. Therefore 4 (b a)(y x) > 0. Expadig this product yields ax + by ay bx > 0, givig the result. Motivatig Example for the Geeral Case. Bakotes are available i the deomiatios of EUR5, EUR10 ad EUR20. You are allowed to take 3 bakotes of oe type, 7 bakotes of a secod type, ad 9 bakotes of the third type. How should you choose i order to maximize the amout of moey you have? Aswer. Choose 3 EUR5 otes, 7 EUR10 otes, ad 9 EUR20 otes. Agai, obvious! Justificatio. Because 3 5 + 7 10 + 9 20 > 3 x + 7 y + 9 z, where x, y, z is ay rearragemet of 5, 10, 20. This example motivates the followig geeral result.
The Rearragemet Iequality: Suppose that 5 The umbers a 1, a 2,..., a are i icreasig order, i.e., a 1 < a 2 < < a The umbers b 1, b 2,..., b are also i icreasig order, i.e., b 1 < b 2 < < b If x 1, x 2,..., x is a rearragemet (or permutatio) of the umbers b 1, b 2,..., b, the (1) a 1 x 1 + a 2 x 2 + + a x a 1 b 1 + a 2 b 2 + + a b with equality if ad oly if the umbers x 1, x 2,..., x are i icreasig order, i.e., if ad oly if x 1 = b 1, x 1 = b 1,..., x = b. I other words, the maximum of the mixed sum M = a 1 x 1 + a 2 x 2 + + a x is equal to the forward-ordered sum F = a 1 b 1 + a 2 b 2 + + a b.
Proof. Suppose we cosider ay mixed sum 6 M = a 1 x 1 + a 2 x 2 + + a x. Suppose that the arragemet x 1, x 2,..., x maximizes the mixed sum. Suppose also that we ca fid two umbers x i ad x j such that a i < a j but x i > x j. Suppose we swap x i with x j. What happes to the mixed sum? The mixed sum beforehad equals M = a 1 x 1 + a 2 x 2 + + a i x i + + a j x j + + a x ad after the swap equals M = a 1 x 1 + a 2 x 2 + + a i x j + + a j x i + + a x Does the mixed sum icrease? I other words, is M > M? Well, this will be true if a i x j + a j x i > a i x i + a j x j. But this must be true sice (a j a i )(x i x j ) > 0. But the the mixed sum after the swap is larger tha before the swap. This cotradicts our iitial assumptio that we ca fid two umbers x i ad x j such that a i < a j but x i > x j. If this
assumptio does ot hold, the we must have x i < x j wheever a i < a j. 7 This shows that the uique arragemet which maximizes the mixed sum is x 1 = b 1, x 2 = b 2,..., x = b, i.e., whe the umbers x 1, x 2,..., x are i icreasig order. This completes the proof. Motivatig Example for a Related Result. Bakotes are available i the deomiatios of EUR5, EUR10 ad EUR20. You are allowed to take 3 bakotes of oe type, 7 bakotes of a secod type, ad 9 bakotes of the third type. How should you choose i order to miimize the amout of moey you have? Aswer. Choose 9 EUR5 otes, 7 EUR10 otes, ad 3 EUR20 otes. Corollary to the Rearragemet Iequality: Suppose that The umbers a 1, a 2,..., a are i icreasig order, i.e., a 1 < a 2 < < a The umbers b 1, b 2,..., b are also i icreasig order, i.e., b 1 < b 2 < < b
If x 1, x 2,..., x is a rearragemet (or permutatio) of the umbers b 1, b 2,..., b, the 8 (2) a 1 x 1 + a 2 x 2 + + a x a 1 b + a 2 b 1 + + a b 1 with equality if ad oly if x 1 = b, x 1 = b 1,..., x = b 1. This tells us the miimum of the mixed sum M = a 1 x 1 + a 2 x 2 + + a x is equal to the reverse-ordered sum R = a 1 b + a 2 b 1 + + a b 1. Proof of the Corollary to the Rearragemet Iequality: Applyig the Rearragemet Iequality (1) with b b 1 b 1 i place of b 1 b 2 b we obtai (3) a 1 ( x 1 )+a 2 ( x 2 )+ +a ( x ) a 1 ( b )+a 2 ( b 1 )+ +a ( b 1 ) Here we ote that if x 1, x 2,..., x is a rearragemet of the umbers b 1, b 2,..., b, the x 1, x 2,..., x is a rearragemet of the umbers b 1, b 2,..., b. Simplifyig (3) leads to the desired result.
Example: Chebychev s Iequality Assumig a 1 a 2 a ad b 1 b 2 b, we have R (a 1 + a 2 + + a )(b 1 + b 2 + + b ) F. 9 Proof: Cyclically rotatig the umbers b 1, b 2,..., b, we get mixed sums: M 1 = a 1 b 1 + a 2 b 2 + + a b M 2 = a 1 b 2 + a 2 b 3 + + a b 1 M 3 = a 1 b 3 + a 2 b 4 + + a b 2. M = a 1 b + a 2 b 1 + + a b 1 By the rearragemet iequality, each of the sums lies betwee R ad F. Therefore the average of all of the sums lies betwee R ad F. But the average of the sums is M 1 + M 2 + + M = (a 1 + a 2 + + a )(b 1 + b 2 + + b ) This lies betwee R ad F, establishig the desired result..
Exercise. Show that if we substitute a 1 = b 1 = c 1, a 2 = b 2 = c 2,..., a = b = c i Chebychev s Iequality we get c 2 1 + c 2 2 + + c2 c 1 + c 2 + + c i.e., RMS AM., 10 We are ow ready to prove the AM-GM iequality. First, let s remid ourselves of this result! The Arithmetic Mea Geometric Mea (AM-GM) Iequality: Suppose we have positive real umbers c 1, c 2,..., c. The c 1 + c 2 + + c (c 1 c 2 c ) 1 with equality if ad oly if all of the umbers c 1, c 2,..., c are equal. NOTE: The otatio y = x 1 meas that y is a umber whose -th power is x, i.e., such that y = x. For example, y = x 1 2 meas that y 2 = x, i.e., y = x ; y = x3 1 meas that y 3 = x, i.e., y = 3 x.
Proof of the AM-GM Iequality: Sice all of the umbers c 1, c 2,..., c are positive, the geometric mea of these umbers, GM = (c 1 c 2 c ) 1, must also be positive. Let s form 11 a 1 = c 1 GM ; a 2 = c 1c 2 GM 2 ; a 3 = c 1c 2 c 3 GM 3 ; ; a = c 1c 2 c 3 c GM, ad let b 1 = 1 a ; b 2 = 1 a 1 ; b 3 = 1 a 2 ; ; b = 1 a 1. A importat observatio here is that the orderig of the umbers b 1, b 2,..., b is the same as that of the umbers a 1, a 2,..., a. To see this, take the example I this case so that (a 1, a 2, a 3, a 4, a 5 ) = (5, 10, 8, 1, 2). (b 1, b 2, b 3, b 4, b 5 ) = ( 1 2, 1 1, 1 8, 1 10, 1 5 ). a 1 b 5 + a 2 b 4 + a 3 b 3 + a 4 b 2 + a 5 b 1 = 5 represets the reverse-ordered sum, ad is the miimum of ay mixed sum. Applyig the Rearragemet Iequality, we fid that the mixed sum a 1 b 1 + a 2 b + a 3 b 1 + + a b 2
is greater tha or equal to the reverse-ordered sum 12 Workig this out we get ad simplifyig, we get a 1 b + a 2 b 1 + a 3 b 2 + + a b 1. c 1 GM + c 2 GM + c 3 GM + c GM, c 1 + c 2 + + c GM, or c 1 + c 2 + + c GM, i other words, AM GM. Exercise. Show that by applyig the AM-GM iequality to the umbers 1/c 1, 1/c 2,..., 1/c we obtai the GM-HM iequality (c 1 c 2 c ) 1 1 c 1 + 1 c 2 + + 1. c
Exercise 1: 20 poits i the plae are give, oe of which are colliear. Divide these ito 5 groups. Let N deote the umber of triagles with vertices i differet groups. 13 How should the poits be divided i order to maximize N? Hit: To get started, let x 1, x 2, x 3, x 4, x 5 deote the umber of poits i groups 1, 2, 3, 4, 5, respectively. The the umber of triagles we ca form usig groups 1, 2 ad 3 is x 1 x 2 x 3 (sice there are x 1 choices for the vertex from group 1, x 2 choices for the vertex from group 2, ad x 3 choices for the vertex from group 3). Takig ito accout all of the possible groups for a triagle, we get N = x 1 x 2 x 3 + x 1 x 2 x 4 + x 1 x 2 x 5 + x 1 x 3 x 4 + x 1 x 3 x 5 + x 1 x 4 x 5 + x 2 x 3 x 4 + x 2 x 3 x 5 + x 2 x 4 x 5 + x 3 x 4 x 5. Next, cosider what happes whe you take a poit out of oe group ad place it ito a differet group. Does N icrease or decrease? Exercise 2: Repeat the above problem, but this time you must divide the poits ito 5 groups with a differet umber of poits i each group. How should the poits be divided i order to maximize N?
For further readig, click here: Wikipedia etry o the Rearragemet Iequality 14