# Find the Maximal Value Challenge

#### anemone

##### MHB POTW Director
Staff member
It's given that $p+m+n=12$ and that $p, m, n$ are non-negative integers. What is the maximal value of $pmn+pm+pn+mn$?

#### MarkFL

Staff member
My solution:

Given the cyclic symmetry of the variables (and the constraint), we know the extremum occurs for:

$$\displaystyle p=m=n=4$$

And so the objective function at these values is:

$$\displaystyle f(4,4,4)=4^3+3\cdot4^2=4^2(4+3)=112$$

Observing that:

$$\displaystyle f(3,4,5)=107$$

We take:

$$\displaystyle f_{\max}=112$$