1+1.......?

Algebra Level 5

Given there are 2018 1s, as shown below: 1 1 1 1 ...... 1 1 2018 1s \underbrace{\text{1 1 1 1 ...... 1 1}}_\text{{2018 1s}} that you are allowed to add pluses between the 1s. What is the maximum number of pluses can be added so that the expression above equals to 8102?


The answer is 1991.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

3 solutions

Alex Burgess
Jul 16, 2019

As a starting approach one can try to maximise the number of 1 1 's in our expression: 1111 × a + 111 × b + 11 × c + 1 × d = 8102 1111 \times a + 111 \times b + 11 \times c + 1 \times d = 8102 .

It is most efficient to use the most 1111 1111 's as possible. Hence we want to maximise a a s.t. 8102 1111 × a 2018 4 a 8102 - 1111 \times a \geq 2018 - 4a . This gives a = 5 a = 5 .

8102 5555 = 2547 8102 - 5555 = 2547 .

We can continue by maximising b b s.t. 2547 111 × b 2018 20 3 b 2547 - 111 \times b \geq 2018 - 20 - 3b . This gives b = 5 b = 5 .

8102 5555 555 = 1992 8102 - 5555 - 555 = 1992 .

We now look for c c s.t. 1992 11 × c = 2018 20 15 2 c 1992 - 11 \times c = 2018 - 20 - 15 - 2c , and c = 1 c = 1 satisfies this.


Currently we have 1111 × 5 + 111 × 5 + 11 × 1 + 1 × 1981 = 8102 1111 \times 5 + 111 \times 5 + 11 \times 1 + 1 \times 1981 = 8102 . With 1991 ( = a + b + c + d 1 ) 1991 ( = a + b + c + d - 1) pluses.

If a = 4 a = 4 and d > 1981 d > 1981 , we have < 2018 1981 16 = 21 < 2018 - 1981 - 16 = 21 1's left. So b < 7 b < 7 and we can't reach 8102 8102 . Similarly if a = 5 , b = 4 , d > 1981 a = 5, b = 4, d > 1981 , we have < 2018 1981 12 20 = 5 < 2018 - 1981 - 12 - 20 = 5 , so c < 2 c < 2 and we can't reach 8102 8102 .


One should note that there is a similar solutions for years 2013 2013 to 2019 2019 . Assuming we are summing the 1 1 's to equal the year reversed. All have 1991 1991 pluses.

E.g. 1111 × 6 + 111 × 4 + 11 × 1 + 1 × 1981 = 9102 1111 \times 6 + 111 \times 4 + 11 \times 1 + 1 \times 1981 = 9102 as we swapped 111 111 for 1111 1111 which gains 1000 1000 and uses one more 1 1 . Likewise if we swap 1111 1111 's for 111 111 we can do earlier years:

1111 × 0 + 111 × 10 + 11 × 1 + 1 × 1981 = 3102 1111 \times 0 + 111 \times 10 + 11 \times 1 + 1 \times 1981 = 3102 .

2102 2102 is possible. We can't have any 1111 1111 or 111 111 and 2102 = 11 c + ( 2012 2 c ) 2102 = 11c + (2012 - 2c) , so 2012 + 9 c = 2102 2012 + 9c = 2102 .

c = 10 c = 10 and 2102 = 11 × 10 + 1 × 1992 2102 = 11 \times 10 + 1 \times 1992 with 2001 2001 pluses.

Mark Hennings
Jul 16, 2019

This is a matter of solving the linear programming problem to maximize a + b + c + d 1 a+b+c+d-1 for nonnegative integers subject to the constraints 1111 a + 111 b + 11 c + d = 8102 4 a + 3 b + 2 c + d = 2018 1111a + 111b + 11c + d \; = \; 8102 \hspace{2cm} 4a + 3b + 2c +d \; = \; 2018 the maximum value of 1991 \boxed{1991} is achieved with a = 5 a=5 , b = 5 b=5 , c = 1 c=1 , d = 1981 d=1981 .

how do I know that the maximum value

Dorra Hamza - 1 year, 11 months ago

Log in to reply

Try using the Simplex Method for solving such problems. There are plenty of online implementations to be found.

Mark Hennings - 1 year, 11 months ago

how to calculate a, b, and c ?

Daniel Sugihantoro - 1 year, 11 months ago

5 1111 + 4 111 + 3 11 + 1980 = 8012 5*1111+4*111+3*11+1980 = 8012 ,

I got, a = 5 , b = 5 , c = 1 , d = 1981 a = 5, b = 5, c = 1, d = 1981 .

Alex Burgess - 1 year, 11 months ago

Log in to reply

Good point! Typo in proof corrected!

Mark Hennings - 1 year, 11 months ago

Why maximize a + b + c + d? That's not the right target function. The solution you have gives a + b + c + d - 1 = 1991. If I change b to 4 and c to 13 I get a + b + c + d - 1 = 2000. But I have many fewer '+' symbols.

What you want to do is miinimize 3 a + 2 b + c.

Richard Desper - 1 year, 11 months ago

Log in to reply

This is wrong. We are creating a + b + c + d a+b+c+d numbers, namely a a copies of 1111 1111 , b b copies of 111 111 , c c copies of 11 11 and d d copies of 1 1 .

  • They have to add to 8102 8102 and so 1111 a + 111 b + 11 c + d = 8102 1111a + 111b + 11c + d = 8102 .
  • We have to use exactly 2108 2108 copies of 1 1 , and hence 4 a + 3 b + 2 c + d = 2108 4a + 3b + 2c + d = 2108 .
  • These numbers have to be joined together with a + b + c + d 1 a+b+c+d-1 pluses, so that is the quantity we need to maximize.

Mark Hennings - 1 year, 11 months ago

Log in to reply

I've realized you're not wrong and I'm not wrong. We're just counting the number of "+" symbols diferently. My objection is incorrect because I didn't account for the change to d. But with the constraints we have, maximizing a + b + c + d is equivalent to minimizing 3a + 2b + c.

Richard Desper - 1 year, 11 months ago

Log in to reply

@Richard Desper Yes, Number of pluses = a + b + c + d 1 = 2017 3 a 2 b c = a + b + c + d - 1 = 2017 - 3a - 2b - c

Alex Burgess - 1 year, 10 months ago

2018* copies of 1. ;)

Alex Burgess - 1 year, 10 months ago
Richard Desper
Jul 16, 2019

Formulation: Find values of ( a , b , c , d ) (a,b,c,d) such that a 1111 + b 111 + c 111 + d = 8102 a*1111 + b*111 + c*111 + d = 8102 , 4 a + 3 b + 2 c + d = 2018 4*a + 3*b + 2*c + d = 2018 , and ( 3 a + 2 b + c ) (3*a + 2*b + c) is minimized.

Let us approach the problem from this perspective: If we start with d = 2018 d = 2018 , we have 2017 2017 " + + " symbols but the sum is only 2108 2108 .
If we change a " 1 + 1 1 + 1 " to an 11 11 , we have one fewer " + + " symbol, but the sum increases by 9 9 . If we change " 1 + 1 + 1 1+1+1 " to 111 111 , we have two fewer " + + " symbols, and the sum increases by 99 99 If we change " 1 + 1 + 1 + 1 1+1+1+1 " to 1111 1111 , we have three fewer " + + " symbols, and the sum increases by 999 999 .

So how many " + + " symbols do we remove going from d = 2018 d=2018 to the correct solution? Well, for each " 1111 1111 " we remove 3 3 " + + " symbols, and for each " 111 111 " we remove 2 2 " + + " symbols, while for each " 11 11 " we remove 1 1 " + + " symbol. Thus the target function is 3 a + 2 b + c 3a + 2b + c .

Our heuristic is to maximize a a , then maximize b b , then maximize c c . Each " 1 + 1 + 1 + 1 1111 1+1+1+1 \rightarrow 1111 " transition increases the sum by an average of 333 333 per " + + " removed, while each " 1 + 1 + 1 111 1+1+1 \rightarrow 111 " transition increases the sum by 49.5 49.5 per " + + " removed, and each " 1 + 1 11 1+1 \rightarrow 11 " transition only increases the sum by 9 9 per " + + " removed.

Now note that a < 6 a < 6 , because 6666 + 1994 = 8660 6666 + 1994 = 8660 , which is too much.
If we let a = 5 , a = 5, then b < 6 b < 6 by a similar calculation.

Finally, observe that if a = 5 a = 5 and b = 5 b = 5 , then if we let c = 1 c = 1 and d = 1981 d = 1981 , we have a solution. These values of a a , b b , and c c require removing only 26 26 " + + " signs. And no other sum that removes only 26 26 " + + " signs will achieve the same sum.

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...