Let a , b , c , d be positive integers such that a + b + c + d = 1 2 0 , and define S = a b + b d + d a + b c + c d . Find the number of ordered quadruples ( a , b , c , d ) for which S attains its maximum.
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Great job!
Nicely done!
Nice Solution
This is what I did, yet I stupidly forgot that A and C can not be 0.
Brilliant!
No solution used derivatives, which amazed me! For S to obtain a maximum it is nessecary (but not sufficient) that all partial derivatives are equal to 0. Substitute 1 2 0 − a − b − d for c and take all partial derivatives. That gives us two distinct equations;
2 b + d = 1 2 0
b + 2 d = 1 2 0
These solve to b = d = 4 0 leaving you with S = 8 0 a + 8 0 c + 2 0 0 0 . So as long as a + c is constant you have a maximum.
Did I miss a few bears on the road?
So you posted this solution as a 13 year old ! I salute you =)
Even i solved it in the same method ;p
Lagrangian Multipliers make this problem very very easy.
We note that the maximum is 2 1 of the maximum of 2 S .
2 S = 2 a b + 2 b d + 2 d a + 2 b c + 2 c d = ( a + b + c + d ) 2 − ( a 2 + b 2 + c 2 + d 2 ) − 2 a c = 1 4 4 0 0 − ( a 2 + b 2 + c 2 + d 2 + 2 a c .
To maximize 2 S , we have to minimize a 2 + b 2 + c 2 + d 2 + 2 a c = ( a + c ) 2 + b 2 + d 2 .
By the QM-AM inequality, we get 3 ( a + c ) 2 + b 2 + d 2 ≥ 3 ( a + c ) + b + d ) with equality iff a + c = b = d Hence 3 ( a + c ) 2 + b 2 + d 2 ≥ 3 1 2 0 = 4 0 . Thus 3 ( a + c ) 2 + b 2 + d 2 ≥ 1 6 0 0 , so ( a + c ) 2 + b 2 + d 2 ≥ 4 8 0 0 with equality iff a + c = b = d = 3 1 2 0 = 4 0 .
Hence we now have to find the number of ordered pairs ( a , c ) such that a + c = 4 0 . Note that the possible ( a , c ) are ( 1 , 3 9 ) , ( 2 , 3 8 ) , . . . , ( 3 9 , 1 ) , so there are 3 9 ordered quadruples ( a , b , c , d ) for which S attains its maximum.
Excellent!
Please scroll to the right to be able to see the entire expression. A minor typo: I forgot to close the parentheses after (14000-(a^2+b^2+c^2+d^2)-2bc.
Love it :)
Note that:
S = ( a + c ) ( b + d ) + b d = ( 1 2 0 − b − d ) ( b + d ) + b d
so we only need to focus on the ordered pair ( b , d ) . Without loss of generality, suppose b ≥ d . If b ≥ d + 2 , then upon replacing ( b , d ) by ( b − 1 , d + 1 ) , the first term on the right-hand side remains the same while b d is replaced by:
( b − 1 ) ( d + 1 ) = b d + ( b − d ) − 1 ≥ b d + 1 > b d
so for maximum S , we must have b − d ≤ 1 . Thus we consider two cases.
Case 1 : b = d . This gives us:
S = 2 b ( 1 2 0 − 2 b ) + b 2 = 2 4 0 b − 3 b 2 = − 3 [ ( b − 4 0 ) 2 − 1 6 0 0 ] ≤ 4 8 0 0 .
So the maximum is 4800 in this case, which is attained when b = d = 4 0 .
Case 2 : b = d + 1 . This gives:
S = ( 2 d + 1 ) ( 1 1 9 − 2 d ) + d ( d + 1 ) = − 3 d 2 + 2 3 7 d + 1 1 9 = − 3 ( d − 2 7 9 ) 2 + 4 1 9 1 9 9 ≤ 4 7 9 9
with equality if and only if d = 3 9 , 4 0 .
Hence, the first case is where max ( S ) is attained, which gives b = d = 4 0 . The solutions thus correspond to ordered pairs ( a , c ) satisfying a + c = 4 0 . Hence there are 39 solutions.
In my solution I dismissed case 2 with the following reasoning: suppose we solve Case 1 for b,d real numbers. That gives the maximum for S in real numbers. If it turns out that b,d are integers in this solution then we must have the maximum in integers also.
It does turn out this way so we don't need to fall back on things like considering case 2.
Nicely done! As Matt M. noted, one can work in reals, and then specialize to integers. But this works nicely too.
We have S = ( b + d ) ( a + b ) + b d = ( b + d ) ( 1 2 0 − ( b + d ) ) + b d . AM-GM inequality yields b d ≤ ( 2 b + d ) 2 with equality if and only if b = d . Hence S ≤ t ( 1 2 0 − t ) + ( 2 t ) 2 = − 4 3 ( t 2 − 1 6 0 t ) . where t = b + d . Since the last expression is a quadratic with negative leading coefficient, its maximum occurs when t = − ( − 1 6 0 ) / ( 2 ( 1 ) ) = 8 0 . This implies S attains its maximum when and only when t = b + d = 8 0 and b = d , which is equivalent to saying b = d = 4 0 . Therefore the answer to the question is the number of ordered quadruples ( a , b , c , d ) with c = d = 4 0 and a , b being positive integers with a + b = 4 0 . Since we have 1 ≤ b = 4 0 − a or a ≤ 3 9 , this is equivalent to count the number of integers a with 1 ≤ a ≤ 3 9 . Obviously, that number is 3 9 .
There are some misprints in my solution: The variables b and c should be interchanged with each other starting from "with c = d = 4 0 and a , b being ..." onwards.
Nice solution! The unfortunate misprint at the end: b means c and c means b in the last four lines.
S = a b + b d + d a + b c + c d = ( b + d ) ( a + b + c + d ) − ( b 2 + d 2 + b d ) = 1 2 0 ( b + d ) − ( b + d ) 2 + b d .
By AM-GM,
2 b + d ≥ b d ⟹ b d ≤ 4 ( b + d ) 2
with equality if and only if b = d . So,
S = 1 2 0 ( b + d ) − ( b + d ) 2 + b d ≤ 1 2 0 ( b + d ) − ( b + d ) 2 + 4 ( b + d ) 2 = − 4 3 ( ( b + d ) 2 − 1 6 0 ( b + d ) ) = 4 8 0 0 − 4 3 ( b + d − 8 0 ) 2 .
Therefore, S attains its maximum value of 4 8 0 0 if and only if
b = d = 2 8 0 = 4 0 .
We know that
a + b + c + d = 1 2 0 ⟹ a + c = 1 2 0 − ( b + d ) = 1 2 0 − 8 0 = 4 0
and thus c = 4 0 − a . Since a , c are positive integers,
1 ≤ a ≤ 3 9 ,
for a total of 3 9 ordered quadruples ( a , b , c , d ) for which S attains its maximum.
Let λ be the Lagrange multiplier. We wish to maximize S ( a , b , c , d ) under the constraint a + b + c + d = 1 2 0 . Then, applying the concept of Lagrange mulitpliers ( ▽ f ( x , y , z ) = λ ▽ g ( x , y , z ) and g ( x , y , z ) = 0 ), we get the equations:
b + d = λ a + d + c = λ b + d = λ b + a + c = λ a + b + c + d = 1 2 0
The first and the third equation are similar. Hence, the solution is not unique. Solving such system gives us λ = 8 0 , b = d = 4 0 and a + c = 4 0 . For the set of positive integers, there are only 4 0 − 1 = 3 9 pairs such that their sum is 4 0 . But because, the values of b and d are fixed already, the number of quadruples, all elements of which are positive integers, that maximizes S is therefore 3 9 .
Note that , a b + b d + d a + b c + c d = ( a + c ) ( b + d ) + b d .To maximise bd , b = d ⇒ S = ( 1 2 0 − 2 b ) ( 2 b ) + b 2 = 2 4 0 b − 3 b 2 Now this is a simple quadratic function which is maximum when b = 40. Hence , b = 4 0 , d = 4 0 , a + c = 1 2 0 − ( b + d ) = 4 0 . Now , since b and d have fixed value (i.e., 40) , we have to select only a and c.Hence, the no. of ordered quadruples = [No. of solutions of a + c = 4 0 ] = 3 9
First note that when S = a b + a d + b c + b d + c d is maximum, so is 2 S = 2 ( a b + a d + b c + b d + c d ) ≡ S 1 With abbreviations ∑ a ≡ a + b + c + d = 1 2 0 , and ∑ a 2 ≡ a 2 + b 2 + c 2 + d 2 , the following identity holds: S 1 = ( ∑ a ) 2 − ∑ a 2 − 2 a c = M − ∑ a 2 − 2 a c , where M = 1 2 0 2 .
We need to maximize S 1 subject to the constraint ∑ a − 1 2 0 = 0 . Introducing the Lagrange multiplier λ , we must maximize S ′ = M − ∑ a 2 − 2 a c + λ ( ∑ a − 1 2 0 = 0 ) . Treating a , b , c , d as continuous variables, maximizing w.r.t these variables gives ∂ a S ′ = 0 ⇒ − 2 ( a + c ) + λ = 0 ; ∂ c S ′ = 0 ⇒ − 2 ( a + c ) + λ = 0 ; ∂ b S ′ = 0 ⇒ − 2 b + λ = 0 ; ∂ d S ′ = 0 ⇒ − 2 d + λ = 0 , where ∂ a ≡ ∂ / ∂ a and so on. The last two equations imply b = d = λ / 2 ≡ x Whereas the first two equations imply a + c = λ / 2 = x . Thus, a + b + c + d = ( a + c ) + b + d = 3 x = 1 2 0 ⇒ x = 4 0 . Therefore, b and d are fixed, and a and c can take a number of possibilities give by b = d = 4 0 , and a + c = 4 0 . Thus, possible combinations of a and c are 39 given both are positive.
Suppose P=b+d, we have:
S = ( a + c ) ( b + d ) + b d = P ( 1 2 0 − P ) + b ( P − b )
≤ P ( 1 2 0 − P ) + 4 P 2 = 1 2 0 P − 4 3 P 2 .
Therefore, S attains its maximum when b = 2 P and P = 2 ∗ 4 3 1 2 0 = 8 0 , or b = d = 4 0 .
We notice that maxS=4800 when b=d=40, regardless to the value of a,c. a,c can be any integer from 1 to 39 as long as a+c=40.
Therefore, there are 39 quadruples (a,b,c,d) satisfy the given condition.
Let's search for some symmetry in the equation: \S = ab + bd + da +bc +cd\
The sum of all pairwise products of a , b , c , and d is 2 ( a + b + c + d ) 2 − ( a 2 + b 2 + c 2 + d 2 ) = 2 1 2 0 2 − ( a 2 + b 2 + c 2 + d 2 ) The sum S is henceforth 2 1 2 0 2 − ( a 2 + b 2 + c 2 + d 2 ) − a c , which we wish to maximize. This is equivalent to minimizing 2 a 2 + b 2 + c 2 + d 2 + a c . Multiplying through by 2, this is equivalent in turn to minimizing a 2 + 2 a c + c 2 + b 2 + d 2 = ( a + c ) 2 + b 2 + d 2 . This expression is clearly minimized by having a + c = b = d = 4 0 . This stipulation allows 39 ordered quadruples, corresponding to a (or equivalently, c ) ranging from 1 to 39, inclusive.
You can rewrite S as S = 2 ( a + b + c + d ) 2 − ( ( a + c ) 2 + b 2 + d 2 )
We know a + b + c + d = 1 2 0 so all we need to do is minimise ( ( a + c ) 2 + b 2 + d 2 )
Using the quadratic mean-arithmetic mean inequality with terms ( a + c ) , b , d we have 3 ( a + c ) 2 + b 2 + d 2 ≥ 3 ( a + c ) + b + d
with equality if and only if a + c = b = d
As we know that a + b + c + d = 1 2 0 , we must have a + c = b = d = 4 0
So we have the condition a + c = 4 0 and if a is a positive integer, it can take any of the values 1 to 39 inclusive.
So there are 39 solutions in total
Since S contains all the pairwise products except ac, we can write 2 S = 2 a b + 2 b d + 2 d a + 2 b c + 2 c d = ( a + b + c + d ) 2 − a 2 − b 2 − c 2 − d 2 − 2 a c 2 S = 1 2 0 2 − ( a + c ) 2 − b 2 − d 2
Thus we are minimizing ( a + c ) 2 + b 2 + d 2 subject to ( a + c ) + b + d = 1 2 0 . By repeated use of the AM-GM inequality we can find that the minimum is when ( a + c ) = b = d = 4 0
Any quadruple in which a+c add up to 40 will work, and there are 39 of these with a and c positive, giving 39 solutions.
Problem Loading...
Note Loading...
Set Loading...
We have S = a b + b d + d a + b c + c d = b ( a + c + d ) + d ( a + c ) = b ( 1 2 0 − b ) + d ( 1 2 0 − b − d ) = − b 2 + − d 2 + 1 2 0 b + 1 2 0 d − b d . (1) We could interpret this expression as a quadratic in b : S = − b 2 + ( 1 2 0 − d ) b + ( 1 2 0 d − d 2 ) . So, keeping d constant, S is maximized when b = 2 ( − 1 ) − ( 1 2 0 − d ) = 2 1 2 0 − d . (2) We could also interpret the expression as a quadratic in d : S = − d 2 + ( 1 2 0 − b ) d + ( 1 2 0 b − b 2 ) . Notice that this expression is the same as the previous one, except b and d are switched. (This was inevitable, since our formula for S is symmetric in b , d .) Therefore, S is maximized when d = 2 1 2 0 − b (3) .
We have a system of equations for b and d (equations ( 2 ) and ( 3 ) ), which we can solve to get b = d = 4 0 . Then a + c = 1 2 0 − 4 0 − 4 0 = 4 0 , and since ( 1 ) is not dependent on a and c , any choices of a and c will produce the same value of S . The possible ordered pairs are ( a , c ) = ( 1 , 3 9 ) , ( 2 , 3 8 ) , … , ( 3 9 , 1 ) , so there are 3 9 ordered quadruples for which S is maximized.
Note: the maximum value of S is S = − b 2 − d 2 + 1 2 0 b + 1 2 0 d − b d = − 4 0 2 − 4 0 2 + 1 2 0 ⋅ 4 0 + 1 2 0 ⋅ 4 0 − 4 0 2 = 4 8 0 0 .