0

Hello how can I find the minimum value of $$\sum_{1\le i \lt j \le 2022} a_ia_j $$ Where $ a_i $ and$ a_j $ are -1 or 1?

My thought was that the number of -1 and 1 (so 1011 -1's and 1011 1's) should be same but I'm not sure if that is right.

  • 1
    Hello, welcome to Math.SE. Your question is phrased as an isolated problem, without any further information or context. This does not match many users' quality standards, so it may attract downvotes, or be closed. To prevent that, please [edit] the question. This will help you recognise and resolve the issues. Concretely: please provide context, and include your work and thoughts on the problem. These changes can help in formulating more appropriate answers. – Michael Albanese Feb 06 '22 at 00:56
  • Where is this from? The presence of $2022$ (or $2021$ in the title) makes me think that this is a contest problem. – anomaly Feb 06 '22 at 00:58
  • @anomaly Sorry my mistake. I changed the question a little (The orginal being from a book). The original question stated the least non negative value (which I know the answer for that) but I was wondering if I could find the minimum even if it is negative. – 주성우 Feb 06 '22 at 01:01
  • Wouldn't the answer simply be when all the terms are $-1$? – Lorago Feb 06 '22 at 01:04
  • @Lorago Won't that be maximum since all terms are 1? – 주성우 Feb 06 '22 at 01:05
  • Nevermind, I think I just misread the question – Lorago Feb 06 '22 at 01:10
  • 1
    Expand the product $\left(\sum a_i\right)^2$. – anomaly Feb 06 '22 at 01:11
  • 1
    @anomaly I solved the problem thank you – 주성우 Feb 06 '22 at 01:17

2 Answers2

2

$$ (\sum_{i=1}^{2022} a_i)^2 = \sum_{i=1}^{2022}a_i^2 \; + 2\sum_{1\le i<j \le 2022} a_ia_j $$

Since $a_i^2$ is always $1$,

$$ \sum_{1\le i<j \le 2022} a_ia_j = \frac{(\sum_{i=1}^{2022} a_i)^2 -2022}{2}$$

The minimun of $(\sum_{i=1}^{2022} a_i)^2$ is $0$, therefore the minimum of $\sum_{1\le i<j \le 2022} a_ia_j$ is $-1011$.

Saturday
  • 1,358
1

Let the sum be $x$. Then $2x+\sum a_i^2=(\sum a_i)^2$. Since $\sum a_i^2=2022$, you need to minimize $|\sum_{i=1}^{2022} a_i|$. The minimum is $0$ and is achieved iff $1011$ of $a_i$ are $1$ and the other $a_i$ are $-1$. Hence the minimum of $x$ is $(0-2022)/2=-1011$.

markvs
  • 19,653