# Question involving inequalities

Question: Sam has put sweets in five jars in such a way that no jar is empty and no two jars contain the same number of sweets. Also, any three jars contain more sweets in total than the total of the remaining two jars.

What is the smallest possible number of sweets altogether in the five jars?

My solution:

Let the number of sweets in jars 1, 2, 3, 4 & 5 be a, b, c, d & e respectively.

We have a>0, b>0, c>0, d>0 & e>0

We also have a ≠ b ≠ c ≠ d ≠ e

Let a>b>c>d>e

What do I do next to solve this question. Is my approach good?

• Well, you haven't done much yet but it's good to start by naming the variables, as you have done. What is the least value $e$ could be? Given that, what's the least value $d$ could be? Continue in this spirit. – lulu Sep 2 '19 at 18:28
• e=4 d=5 c=6 b=7 a=8 is the best combination I got – Sina Babaei Zadeh Sep 2 '19 at 18:30

Yes, it does make sense to order the numbers as $$a>b>c>d>e$$, because, if we make only the following true: $$e+d+c>b+a$$ (the smallest three vs. the biggest two), then automatically we will have any other sum of three jars bigger than any other sum of two jars.

Now, the inequalities above mean that $$b\ge c+1$$ and $$a\ge b+1\ge c+2$$ and $$d\le c-1$$ and $$e\le d-1\le c-2$$, and finally $$e+d+c\ge b+a+1$$, so by substituting we also conclude that:

$$3c-3\ge 2c+4$$

which comes out as $$c\ge 7$$. What follows is that then $$b\ge 8$$ and $$a\ge 9$$, so $$a+b\ge 17$$ and therefore $$c+d+e\ge 18$$, and so finally $$a+b+c+d+e\ge 17+18=35$$. So we have at least $$35$$ sweets altogether.

To prove that $$35$$ is the actual minimum, verify that all the conditions are satisfied with $$a=9$$, $$b=8$$, $$c=7$$, $$d=6$$ and $$e=5$$.

Lets go case by case:

Best case is one candy in the first jar and two candy in the second and keep on going. This does not work howver as $$1+2+3$$ is less than $$4+5$$.

So put two candy in the first and add one more to each jar from the previous ($$e=2$$ , $$d=3$$ , $$c=4$$ , $$b=5$$ , $$a=6$$). Does not work either. Then put three candy in the first and keep going. does not work ($$e=3 , d=4, c=5 , b=6, a=7$$).

Now put four in the first, five in the second... this works ($$e=4, d=5, c=6, b=7, e=8$$. Since $$4+5+6$$ is greater than $$7+8$$.

This is the lowest you can go since the above process implies that $$1$$ and $$2$$ $$3$$ can not be used and we used $$4$$ and all the other lowest numbers possible.