# Fill your bucket with 2020

You are given two buckets. These buckets are a bit weird, for the only thing they can hold are numbers. One is empty, but the other one contains numbers $$1,1,2$$. Your goal is to get the number $$2020$$ alone in either of these buckets, by constructing it using the following set of rules:

• Each round, you can take exactly $$2$$ numbers out of one of the buckets. If a bucket contains only 1 number, you can't choose it,
• You perform an arithmetic operation with the selected $$2$$ numbers in whichever order. Allowed operations are addition, subtraction, multiplication or division,
• You have to put the obtained result into the bucket from which you selected, and the $$2$$ selected numbers into the other bucket.

Find the shortest way to end up with only the number $$2020$$ in either of the buckets!

An example of constructing the number $$20$$ (there probably are shorter solutions):

[2,1,1] []
Round 1:
- Select (1,1) from the first bucket and addition: 1+1=2
- Put 2 in the original bucket and (1,1) in the other one
=> [2,2] [1,1]
And so on.

[4] [2,2,1,1] (2,2 from the 1st bucket and multiplication)
[4,2,2] [4,1,1] (2,2 from the 2nd bucket and multiplication)
[4,2,2,1,1] [4,2] (1,1 from the 2nd bucket and addition)
[5,2,2,1] [4,4,2,1] (4,1 from the 1st bucket and addition)
[5,4,1] [4,4,2,2,2,1] (2,2 from the 1st bucket and multiplication)
[20,1] [5,4,4,4,2,2,2,1] (5,4 from the 1st bucket and multiplication)
[20] [20,5,4,4,4,2,2,2,1,1] (20,1 from the 1st bucket and multiplication)

• Despite my lack of ability to do basic maths, I really enjoyed this puzzle concept. Thank you for coming up with it. Dec 19, 2019 at 14:43
• "You can perform arithmetic operations of addition, subtraction, multiplication and division". Does that mean that you can perform several operations at one step (with the same selected numbers)? Dec 20, 2019 at 10:17
• Thanks, this was indeed imprecisely defined. I hope it's better now, thanks for pointing it out. Dec 20, 2019 at 10:34
• @trolley813 - no you can't ... 2 numbers allow exactly 1 calculation step ... Dec 20, 2019 at 11:08

EDIT: I was attended by OP that a requirement was to have 2020 as only number in a bucket. This rule is now satisfied

I reached 2020 in:

11 steps

Using:

[bucket 1] [bucket 2] (operation to reach this state) 0. [1,1,2] [] #starting position 1. [2,2] [1,1] (1+1) 2. [4] [1,1,2,2] (2+2) 3. [4,2,2] [1,1,4] (2+2) 4. [8,2] [1,1,2,4,4] (2*4) 5. [16] [1,1,2,2,4,4,8] (8*2) 6. [16,8,2] [1,1,2,2,4,6] (8-2) 7. [128,2] [1,1,2,2,4,6,8,16] (16*8) 8. [126] [1,1,2,2,2,4,6,8,16,128] (128-2) 9. [126,16,4] [1,1,2,2,2,6,8,64,128] (16*4) 10. [2016,4] [1,1,2,2,2,6,8,16,64,126,128] (126*16) 11. [2020] [1,1,2,2,2,4,6,8,64,126,128,2016] (2016+4)

• Quite the optimisation! I think this will be hard to beat. Btw you have a typo in the last line, I think you meant 2016+4. Dec 19, 2019 at 14:31
• As far as I can figure, it takes 9 operations to get a number ≥ 2020 so any solution that can beat this would have to be 9 or 10 steps. Dec 20, 2019 at 15:17

Another solution in

11 steps:

[1,2] [1,2] (2 * 1)
[2] [1,1,2,2] (2 * 1)
[2,2,2] [1,1,4] (2 * 2)
[1,2,2,2,4] [1,5] (4 + 1)
[1,1,2,2,2,4,5] [5] (5 * 1)
[1,1,2,2,2,20] [4,5,5] (5 * 4)
[1,2,2,2,21] [1,4,5,5,20] (20 + 1)
[1,2,2,2,4,5,21] [1,5,20,20] (5 * 4)
[1,2,2,2,4,5,5,20,21] [1,20,100] (20 * 5)
[1,1,2,2,2,4,5,5,20,21,100] [20,101] (100 + 1)
[1,1,2,2,2,4,5,5,20,20,21,100,101] [2020] (20 * 101)

• Nice work, but I think I see a mistake: in some steps you transfer the resulting value to the new bucket, where the new value should actually stay in the original bucket, and the two numbers you used to create it should transfer to the other bucket. The 1st and 2nd steps are OK, then step 3 and 4 are not. So are step 7 and 9. I believe the rest of the steps are OK. Dec 20, 2019 at 7:56
• @P1storius: The steps were still legal, but while writing the post I swapped the original bucket and the new bucket by mistake. It's fixed now, thanks! Dec 20, 2019 at 8:13
• Yes, that looks fine now! Dec 20, 2019 at 11:18

I used:

14 Steps

I tried to use the prime factors, but the tidying up afterwards added on a few extra steps.

 [2,1,1] [] [2,2] [1,1] (1,1 from the first bucket and addition) [4] [2,2,1,1] (2,2 from the 1st bucket and multiplication) [4,2,2] [4,1,1] (2,2 from the 2nd bucket and multiplication) [4,4,2,2,1] [5,1] (4,1 from the 2nd bucket and addition) [5,4,2,2] [5,4,1,1] (4,1 from the 1st bucket and addition) [20,2,2] [5,5,4,4,1,1] (5,4 from the 1st bucket and multiplication) [20,5,4,2,2] [20,5,4,1,1] (5,4 from the 2nd bucket and multiplication) [20,20,5,5,4,2,2] [100,4,1,1] (20,5 from the 2nd bucket and multiplication) [100,20,5,4,2,2] [100,20,5,4,1,1] (20,5 from the 1st bucket and multiplication) [100,100,1,20,5,4,2,2] [101,20,5,4,1] (20,5 from the 1st bucket and multiplication) [100,100,1,20,5,4,2,2] [2020,5,4,1] (101,20 from the 2nd bucket and multiplication) [100,100,1,20,5,4,4,2,2,1] [2020,5,5] (4,1 from the 2nd bucket and addition) [100,100,1,20,5,5,5,4,4,2,2,1] [2020,1] (5,5 from the 2nd bucket and division) [2020,100,100,1,20,5,5,5,4,4,2,2,1,1] [2020] (2020,1 from the 2nd bucket and division) 

• Nice effort, but I believe 20*5=100 and not 400 (your first step). Dec 19, 2019 at 13:55
• Well don't I feel like a damned fool. Dec 19, 2019 at 14:37
• still no need for tidying ... 11 step solution on par with the other 2 was not required to have 2020 in both buckets afterwards ... "in EITHER bucket" ... Dec 20, 2019 at 11:16
• @eagle275 the tidying was to get ONLY 2020 in one bucket Dec 20, 2019 at 11:31