Maximum value of $x+y+z$ [closed]
$begingroup$
If $2(x^3+y^3+z^3) = 3(x+y+z)^2$then
find the maximum value of $x+y+z$.
given that $x,y,z$ are all non negative integers.
algebra-precalculus optimization maxima-minima
$endgroup$
closed as off-topic by RRL, Eevee Trainer, Saad, José Carlos Santos, Paul Frost Dec 23 '18 at 16:16
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "This question is missing context or other details: Please provide additional context, which ideally explains why the question is relevant to you and our community. Some forms of context include: background and motivation, relevant definitions, source, possible strategies, your current progress, why the question is interesting or important, etc." – RRL, Eevee Trainer, Saad, José Carlos Santos, Paul Frost
If this question can be reworded to fit the rules in the help center, please edit the question.
|
show 4 more comments
$begingroup$
If $2(x^3+y^3+z^3) = 3(x+y+z)^2$then
find the maximum value of $x+y+z$.
given that $x,y,z$ are all non negative integers.
algebra-precalculus optimization maxima-minima
$endgroup$
closed as off-topic by RRL, Eevee Trainer, Saad, José Carlos Santos, Paul Frost Dec 23 '18 at 16:16
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "This question is missing context or other details: Please provide additional context, which ideally explains why the question is relevant to you and our community. Some forms of context include: background and motivation, relevant definitions, source, possible strategies, your current progress, why the question is interesting or important, etc." – RRL, Eevee Trainer, Saad, José Carlos Santos, Paul Frost
If this question can be reworded to fit the rules in the help center, please edit the question.
4
$begingroup$
What have you tried?
$endgroup$
– Robert Z
Dec 3 '18 at 16:26
$begingroup$
Are you sure that the statement is correct?
$endgroup$
– Robert Z
Dec 3 '18 at 16:38
$begingroup$
It is obvious that you should consider only cases $0 leq x,y,z leq 1$. So The maximal value is 2.
$endgroup$
– kolobokish
Dec 3 '18 at 17:12
$begingroup$
how obvious ?i dont understand
$endgroup$
– maveric
Dec 3 '18 at 17:15
1
$begingroup$
May be I'm wrong, but $(1,1,0)$ satisfy the above equation.
$endgroup$
– kolobokish
Dec 3 '18 at 18:50
|
show 4 more comments
$begingroup$
If $2(x^3+y^3+z^3) = 3(x+y+z)^2$then
find the maximum value of $x+y+z$.
given that $x,y,z$ are all non negative integers.
algebra-precalculus optimization maxima-minima
$endgroup$
If $2(x^3+y^3+z^3) = 3(x+y+z)^2$then
find the maximum value of $x+y+z$.
given that $x,y,z$ are all non negative integers.
algebra-precalculus optimization maxima-minima
algebra-precalculus optimization maxima-minima
edited Dec 23 '18 at 13:59
Martin Sleziak
44.7k9117272
44.7k9117272
asked Dec 3 '18 at 16:24
mavericmaveric
67411
67411
closed as off-topic by RRL, Eevee Trainer, Saad, José Carlos Santos, Paul Frost Dec 23 '18 at 16:16
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "This question is missing context or other details: Please provide additional context, which ideally explains why the question is relevant to you and our community. Some forms of context include: background and motivation, relevant definitions, source, possible strategies, your current progress, why the question is interesting or important, etc." – RRL, Eevee Trainer, Saad, José Carlos Santos, Paul Frost
If this question can be reworded to fit the rules in the help center, please edit the question.
closed as off-topic by RRL, Eevee Trainer, Saad, José Carlos Santos, Paul Frost Dec 23 '18 at 16:16
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "This question is missing context or other details: Please provide additional context, which ideally explains why the question is relevant to you and our community. Some forms of context include: background and motivation, relevant definitions, source, possible strategies, your current progress, why the question is interesting or important, etc." – RRL, Eevee Trainer, Saad, José Carlos Santos, Paul Frost
If this question can be reworded to fit the rules in the help center, please edit the question.
4
$begingroup$
What have you tried?
$endgroup$
– Robert Z
Dec 3 '18 at 16:26
$begingroup$
Are you sure that the statement is correct?
$endgroup$
– Robert Z
Dec 3 '18 at 16:38
$begingroup$
It is obvious that you should consider only cases $0 leq x,y,z leq 1$. So The maximal value is 2.
$endgroup$
– kolobokish
Dec 3 '18 at 17:12
$begingroup$
how obvious ?i dont understand
$endgroup$
– maveric
Dec 3 '18 at 17:15
1
$begingroup$
May be I'm wrong, but $(1,1,0)$ satisfy the above equation.
$endgroup$
– kolobokish
Dec 3 '18 at 18:50
|
show 4 more comments
4
$begingroup$
What have you tried?
$endgroup$
– Robert Z
Dec 3 '18 at 16:26
$begingroup$
Are you sure that the statement is correct?
$endgroup$
– Robert Z
Dec 3 '18 at 16:38
$begingroup$
It is obvious that you should consider only cases $0 leq x,y,z leq 1$. So The maximal value is 2.
$endgroup$
– kolobokish
Dec 3 '18 at 17:12
$begingroup$
how obvious ?i dont understand
$endgroup$
– maveric
Dec 3 '18 at 17:15
1
$begingroup$
May be I'm wrong, but $(1,1,0)$ satisfy the above equation.
$endgroup$
– kolobokish
Dec 3 '18 at 18:50
4
4
$begingroup$
What have you tried?
$endgroup$
– Robert Z
Dec 3 '18 at 16:26
$begingroup$
What have you tried?
$endgroup$
– Robert Z
Dec 3 '18 at 16:26
$begingroup$
Are you sure that the statement is correct?
$endgroup$
– Robert Z
Dec 3 '18 at 16:38
$begingroup$
Are you sure that the statement is correct?
$endgroup$
– Robert Z
Dec 3 '18 at 16:38
$begingroup$
It is obvious that you should consider only cases $0 leq x,y,z leq 1$. So The maximal value is 2.
$endgroup$
– kolobokish
Dec 3 '18 at 17:12
$begingroup$
It is obvious that you should consider only cases $0 leq x,y,z leq 1$. So The maximal value is 2.
$endgroup$
– kolobokish
Dec 3 '18 at 17:12
$begingroup$
how obvious ?i dont understand
$endgroup$
– maveric
Dec 3 '18 at 17:15
$begingroup$
how obvious ?i dont understand
$endgroup$
– maveric
Dec 3 '18 at 17:15
1
1
$begingroup$
May be I'm wrong, but $(1,1,0)$ satisfy the above equation.
$endgroup$
– kolobokish
Dec 3 '18 at 18:50
$begingroup$
May be I'm wrong, but $(1,1,0)$ satisfy the above equation.
$endgroup$
– kolobokish
Dec 3 '18 at 18:50
|
show 4 more comments
2 Answers
2
active
oldest
votes
$begingroup$
The Z3 solver does not find an objective value larger than $2$:
from z3 import *
X, Y, Z = Ints('X Y Z')
s = Optimize()
s.add(X >= 0, X <= Y, X < 10)
s.add(Y >= 0, Y <= Z, Y < 10)
s.add(Z >= 0, Z < 10)
s.add(2*(X**3+Y**3+Z**3) == (X+Y+Z)**2)
obj = Sum(X+Y+Z)
s.maximize(obj)
print(s.check())
try:
print(s.model())
except Z3Exception as ex:
print(ex)
I limited the value ranges and imposed an $ X le Y le Z$ ordering to get a fast answer.
Result:
sat
[Y = 1, Z = 1, X = 0]
$endgroup$
add a comment |
$begingroup$
WLOG we may assume $xgeq ygeq zgeq0$. It is easy to see that $(x,y,z)=(1,1,0)$ is a solution. Let's treat $x,y$ as constant and consider both the LHS and RHS as functions of $z$ only. Clearly, the LHS is a cubic polynomial which is monotonously increasing on $[0,infty)$, and the RHS is a quadratic polynomial which also increases monotonously on $[0,infty)$. If we plug in $z=1$, we have $mathrm{LHS}=6$ and $mathrm{RHS}=9$. If we plug in $z=2$, then $mathrm{LHS}=20$ and $mathrm{RHS}=16$, and the LHS has already "outgrowed" the RHS. Indeed this will always happen regardless of the values of $x,y$ you choose, and a similar argument (by treating $y,z$ as constant and $x$ as the variable, for example) shows that increasing $x,y$ from $(1,1,0)$ will only make the LHS "outgrow" the RHS quicker. Hence, $(1,1,0)$ and $(1,1,1)$ are the only two possible solutions to satisfy $mathrm{LHS}leqmathrm{RHS}$, and since $(1,1,1)$ doesn't work, the unique solution to the equation is $(1,1,0)$.
$endgroup$
$begingroup$
@user376343 Please read the last line of my answer more closely :)
$endgroup$
– YiFan
Dec 4 '18 at 9:37
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
The Z3 solver does not find an objective value larger than $2$:
from z3 import *
X, Y, Z = Ints('X Y Z')
s = Optimize()
s.add(X >= 0, X <= Y, X < 10)
s.add(Y >= 0, Y <= Z, Y < 10)
s.add(Z >= 0, Z < 10)
s.add(2*(X**3+Y**3+Z**3) == (X+Y+Z)**2)
obj = Sum(X+Y+Z)
s.maximize(obj)
print(s.check())
try:
print(s.model())
except Z3Exception as ex:
print(ex)
I limited the value ranges and imposed an $ X le Y le Z$ ordering to get a fast answer.
Result:
sat
[Y = 1, Z = 1, X = 0]
$endgroup$
add a comment |
$begingroup$
The Z3 solver does not find an objective value larger than $2$:
from z3 import *
X, Y, Z = Ints('X Y Z')
s = Optimize()
s.add(X >= 0, X <= Y, X < 10)
s.add(Y >= 0, Y <= Z, Y < 10)
s.add(Z >= 0, Z < 10)
s.add(2*(X**3+Y**3+Z**3) == (X+Y+Z)**2)
obj = Sum(X+Y+Z)
s.maximize(obj)
print(s.check())
try:
print(s.model())
except Z3Exception as ex:
print(ex)
I limited the value ranges and imposed an $ X le Y le Z$ ordering to get a fast answer.
Result:
sat
[Y = 1, Z = 1, X = 0]
$endgroup$
add a comment |
$begingroup$
The Z3 solver does not find an objective value larger than $2$:
from z3 import *
X, Y, Z = Ints('X Y Z')
s = Optimize()
s.add(X >= 0, X <= Y, X < 10)
s.add(Y >= 0, Y <= Z, Y < 10)
s.add(Z >= 0, Z < 10)
s.add(2*(X**3+Y**3+Z**3) == (X+Y+Z)**2)
obj = Sum(X+Y+Z)
s.maximize(obj)
print(s.check())
try:
print(s.model())
except Z3Exception as ex:
print(ex)
I limited the value ranges and imposed an $ X le Y le Z$ ordering to get a fast answer.
Result:
sat
[Y = 1, Z = 1, X = 0]
$endgroup$
The Z3 solver does not find an objective value larger than $2$:
from z3 import *
X, Y, Z = Ints('X Y Z')
s = Optimize()
s.add(X >= 0, X <= Y, X < 10)
s.add(Y >= 0, Y <= Z, Y < 10)
s.add(Z >= 0, Z < 10)
s.add(2*(X**3+Y**3+Z**3) == (X+Y+Z)**2)
obj = Sum(X+Y+Z)
s.maximize(obj)
print(s.check())
try:
print(s.model())
except Z3Exception as ex:
print(ex)
I limited the value ranges and imposed an $ X le Y le Z$ ordering to get a fast answer.
Result:
sat
[Y = 1, Z = 1, X = 0]
edited Dec 3 '18 at 23:32
answered Dec 3 '18 at 23:14
Axel KemperAxel Kemper
3,26611418
3,26611418
add a comment |
add a comment |
$begingroup$
WLOG we may assume $xgeq ygeq zgeq0$. It is easy to see that $(x,y,z)=(1,1,0)$ is a solution. Let's treat $x,y$ as constant and consider both the LHS and RHS as functions of $z$ only. Clearly, the LHS is a cubic polynomial which is monotonously increasing on $[0,infty)$, and the RHS is a quadratic polynomial which also increases monotonously on $[0,infty)$. If we plug in $z=1$, we have $mathrm{LHS}=6$ and $mathrm{RHS}=9$. If we plug in $z=2$, then $mathrm{LHS}=20$ and $mathrm{RHS}=16$, and the LHS has already "outgrowed" the RHS. Indeed this will always happen regardless of the values of $x,y$ you choose, and a similar argument (by treating $y,z$ as constant and $x$ as the variable, for example) shows that increasing $x,y$ from $(1,1,0)$ will only make the LHS "outgrow" the RHS quicker. Hence, $(1,1,0)$ and $(1,1,1)$ are the only two possible solutions to satisfy $mathrm{LHS}leqmathrm{RHS}$, and since $(1,1,1)$ doesn't work, the unique solution to the equation is $(1,1,0)$.
$endgroup$
$begingroup$
@user376343 Please read the last line of my answer more closely :)
$endgroup$
– YiFan
Dec 4 '18 at 9:37
add a comment |
$begingroup$
WLOG we may assume $xgeq ygeq zgeq0$. It is easy to see that $(x,y,z)=(1,1,0)$ is a solution. Let's treat $x,y$ as constant and consider both the LHS and RHS as functions of $z$ only. Clearly, the LHS is a cubic polynomial which is monotonously increasing on $[0,infty)$, and the RHS is a quadratic polynomial which also increases monotonously on $[0,infty)$. If we plug in $z=1$, we have $mathrm{LHS}=6$ and $mathrm{RHS}=9$. If we plug in $z=2$, then $mathrm{LHS}=20$ and $mathrm{RHS}=16$, and the LHS has already "outgrowed" the RHS. Indeed this will always happen regardless of the values of $x,y$ you choose, and a similar argument (by treating $y,z$ as constant and $x$ as the variable, for example) shows that increasing $x,y$ from $(1,1,0)$ will only make the LHS "outgrow" the RHS quicker. Hence, $(1,1,0)$ and $(1,1,1)$ are the only two possible solutions to satisfy $mathrm{LHS}leqmathrm{RHS}$, and since $(1,1,1)$ doesn't work, the unique solution to the equation is $(1,1,0)$.
$endgroup$
$begingroup$
@user376343 Please read the last line of my answer more closely :)
$endgroup$
– YiFan
Dec 4 '18 at 9:37
add a comment |
$begingroup$
WLOG we may assume $xgeq ygeq zgeq0$. It is easy to see that $(x,y,z)=(1,1,0)$ is a solution. Let's treat $x,y$ as constant and consider both the LHS and RHS as functions of $z$ only. Clearly, the LHS is a cubic polynomial which is monotonously increasing on $[0,infty)$, and the RHS is a quadratic polynomial which also increases monotonously on $[0,infty)$. If we plug in $z=1$, we have $mathrm{LHS}=6$ and $mathrm{RHS}=9$. If we plug in $z=2$, then $mathrm{LHS}=20$ and $mathrm{RHS}=16$, and the LHS has already "outgrowed" the RHS. Indeed this will always happen regardless of the values of $x,y$ you choose, and a similar argument (by treating $y,z$ as constant and $x$ as the variable, for example) shows that increasing $x,y$ from $(1,1,0)$ will only make the LHS "outgrow" the RHS quicker. Hence, $(1,1,0)$ and $(1,1,1)$ are the only two possible solutions to satisfy $mathrm{LHS}leqmathrm{RHS}$, and since $(1,1,1)$ doesn't work, the unique solution to the equation is $(1,1,0)$.
$endgroup$
WLOG we may assume $xgeq ygeq zgeq0$. It is easy to see that $(x,y,z)=(1,1,0)$ is a solution. Let's treat $x,y$ as constant and consider both the LHS and RHS as functions of $z$ only. Clearly, the LHS is a cubic polynomial which is monotonously increasing on $[0,infty)$, and the RHS is a quadratic polynomial which also increases monotonously on $[0,infty)$. If we plug in $z=1$, we have $mathrm{LHS}=6$ and $mathrm{RHS}=9$. If we plug in $z=2$, then $mathrm{LHS}=20$ and $mathrm{RHS}=16$, and the LHS has already "outgrowed" the RHS. Indeed this will always happen regardless of the values of $x,y$ you choose, and a similar argument (by treating $y,z$ as constant and $x$ as the variable, for example) shows that increasing $x,y$ from $(1,1,0)$ will only make the LHS "outgrow" the RHS quicker. Hence, $(1,1,0)$ and $(1,1,1)$ are the only two possible solutions to satisfy $mathrm{LHS}leqmathrm{RHS}$, and since $(1,1,1)$ doesn't work, the unique solution to the equation is $(1,1,0)$.
answered Dec 4 '18 at 4:41
YiFanYiFan
2,7531422
2,7531422
$begingroup$
@user376343 Please read the last line of my answer more closely :)
$endgroup$
– YiFan
Dec 4 '18 at 9:37
add a comment |
$begingroup$
@user376343 Please read the last line of my answer more closely :)
$endgroup$
– YiFan
Dec 4 '18 at 9:37
$begingroup$
@user376343 Please read the last line of my answer more closely :)
$endgroup$
– YiFan
Dec 4 '18 at 9:37
$begingroup$
@user376343 Please read the last line of my answer more closely :)
$endgroup$
– YiFan
Dec 4 '18 at 9:37
add a comment |
4
$begingroup$
What have you tried?
$endgroup$
– Robert Z
Dec 3 '18 at 16:26
$begingroup$
Are you sure that the statement is correct?
$endgroup$
– Robert Z
Dec 3 '18 at 16:38
$begingroup$
It is obvious that you should consider only cases $0 leq x,y,z leq 1$. So The maximal value is 2.
$endgroup$
– kolobokish
Dec 3 '18 at 17:12
$begingroup$
how obvious ?i dont understand
$endgroup$
– maveric
Dec 3 '18 at 17:15
1
$begingroup$
May be I'm wrong, but $(1,1,0)$ satisfy the above equation.
$endgroup$
– kolobokish
Dec 3 '18 at 18:50