2
$\begingroup$

(I start by saying that the tags are probably not accurate but I didn't know what to put, so if someone knows what I could tag this question with, let me know in the comments and I'll provide to edit it)

Fix $n$ and consider $n$ variables $x_1 ,x_2 , \dots, x_n$ such that $x_i \geq 1$ for every $i$ and

$$ \sum_{i=1} ^n x_i =n + C$$

for some $C>0$ independent of $n$. Consider now the function:

$$ f(x_1, x_2 , \dots , x_n) = x_{n} x_{n-1} \dots x_1 + x_{n} x_{n-1} \dots x_2 + \dots x_{n}x_{n-1} + x_n .$$

The question is: is there some "simple" expression involving $n$ and $C$ to find $\max (f_n)$ and $argmax(f_n)$ ? Even at the limit for $n \to + \infty$? I suspect that keeping $C$ fixed and increasing $n$ should have a similar effect to keeping $n$ fixed and decreasing $C$, i.e the values of $x_i$ for the argmax should all tend to $1 + C/n$, although I'm not sure how to prove this.

There's also another strange fact, at least not one I can immediately explain. Keeping $n$ fixed and increasing $C$, it appears that the maximum is achieved for $(x_1, x_2, \dots, x_n)=(m, m+1, m+1 , \dots , m+1)$, with $m$ a suitable number so that the constraint is true. No idea why it happens, I would have bet on $x_i = x_j$ for every $i,j$. I tried this on Mathematica for $n=3,6,9$ with $C$ around 10000.

EDIT: I should probably say why I am interested in this, maybe it's something known. If you consider the sequence

$$ \begin{cases} x_{n+1} = \alpha x_n + 1\\ x_0 =0 \end{cases}$$

it's trivial to see that after $N$ steps you end up with something like $\sum_{j=0} ^{N-1} \alpha ^j$, which everyone knows how to treat. But what if the $\alpha= \alpha_n$ depends on $n$ and you only know what's the value of $\sum_{n=0} ^{N-1} \alpha_n $?

$\endgroup$
3
  • $\begingroup$ Did you try Lagrange multipliers? Seems to be a bit messy, but could be doable. $\endgroup$
    – Dirk
    Commented Sep 6, 2023 at 6:48
  • 1
    $\begingroup$ Starting to solve it I already got $x_1=x_2-1$ (for every $n$ and $C$) $\endgroup$
    – Dirk
    Commented Sep 6, 2023 at 6:53
  • $\begingroup$ No, but more out of laziness I must admit. I feared the computations would have been a mess and that maybe there was some neat clever way to do that. Seeing your answer, I was wrong! $\endgroup$
    – tommy1996q
    Commented Sep 6, 2023 at 8:32

1 Answer 1

2
$\begingroup$

Here is an approach via Langange multipliers: The Lagrangian of the constrained problem is

$$L(x,\lambda) = x_1\cdots x_n + x_2\cdots x_n + x_n - \lambda(\sum_{i=1}^n x_i - n-C).$$

The solution is a critical point of this. Taking the derivatives of $L$ with respect to all the $x_i$ you get \begin{align} x_2\cdots x_n -\lambda & = 0\\ x_1x_3\cdots x_n + x_3\cdots x_n - \lambda & = 0\\ \vdots\qquad & \quad \vdots\\ x_1\cdots x_{n-2}x_n + \cdots + x_n - \lambda & = 0. \end{align} The first equation gives $$\lambda = x_2\cdots x_n$$ and we multiply the further $i$th equation with $x_i$ to get \begin{align} x_1\cdots x_n -\lambda x_1 & = 0\\ x_1\cdots x_n + x_2\cdots x_n - \lambda x_2 & = 0\\ \vdots\qquad & \quad \vdots\\ x_1\cdots x_n + x_2\cdots x_n + x_i\cdots x_n - \lambda x_i & = 0\\ \vdots\qquad & \quad \vdots\\ x_1\cdots x_n + x_2\cdots x_n +\cdots + x_{n-1}x_n + x_n - \lambda x_n & = 0. \end{align} Plugging the $i$th equation into the $(i+1)$st (for $i\leq n-1$) and using $\lambda = x_2\cdots x_n$ we get $$ \lambda(x_i - x_{i+1}) + \frac{\lambda}{x_2\cdots x_i} = 0 $$ and $$ \lambda(x_{n-1}-x_n) + \frac{\lambda}{x_2\cdots x_{n-1}}= 0. $$ From this I get the recursion \begin{align} x_2 & = x_1 + 1\\ x_3 & = x_2 + \tfrac{1}{x_2}\\ x_4 & = x_3 + \tfrac{1}{x_2 x_3}\\ \vdots & \\ x_{i+1} & = x_i + \tfrac{1}{x_2\cdots x_i}\\ \vdots & \\ x_n & = x_{n-1} + \tfrac{1}{x_2\cdots x_{n-1}}. \end{align} (This contradicts your claim that $(x_1,\dots, x_n) = (m,m+1,\dots,m)$…)

It remains to determined $x_1$ which can in principle be done by the constraint $\sum_i x_i = n+C$, but I haven't tried…

$\endgroup$
2
  • $\begingroup$ Shouldn't it be $\lambda(x_{n-1}-x_n)+x_n=0$? $\endgroup$ Commented Sep 6, 2023 at 12:59
  • $\begingroup$ Ah, yes! Thanks for catching this. $\endgroup$
    – Dirk
    Commented Sep 7, 2023 at 8:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .