Solution

Dicey Operations Christopher Wang

First name
Christopher Wang
School
King George V School
Country
Age
11

My method involves guesswork and is only suitable for addition. It is best used for larger addition problems like the 3x3 array.

First of all, suppose we have a 2x2 array to fill in, we have the digits a,b,c,d, and the target number is t. If we have ab and cd as our 2 2-digit numbers, it probably won't be the closest you can get to t. Notice that when we swap ab with ba, we increase our sum by 9(b-a) since ba - ab= 10a+b-(10b+a)=9(b-a). We also find that if we swap a and c so that the 2 2-digit numbers are ad and cb, the sum is still the sum. Since every possible combination of 2 2-digit numbers can be obtained by a sequence of swapping a ones digit with a tens digit, every possible sum differs to every other sum by a multiple of 9. So, if we just randomly pick the 2 2-digit numbers, we can work out the theoretical closest sum to t by just counting up or down by 9s (we can also use modular arithmetic if you know that). Then we try to swap the numbers so that the theoretical number is achieved. Normally this doesn't work for 2x2 arrays so we want to be the closest to the theoretical value. This is where the guesswork comes in.

If you are confused already, here's an example: suppose the 4 digits are 3,5,2,8 and the target is 100. We start by just using a random pair of 2-digit numbers: 23 and 58. They sum to be 81 so we know that the closest we can ever hope to get is 99 because it is the closest number to 100 that is a multiple of 9 away from 81. We do some guesswork and swapping and find out that 99+9=108 is the closest we can get by just using 23 and 85 which sum to be 108.

This works for 3 3-digit numbers too: suppose we get 1,1,1,4,6,6,7,8,8 and our target is 1000. Then we make a random guess like 186,186,174. They sum to be 546 (that's way off target!). So since 1000-546=454=9*50+4, the closest we can hope to get is 1000-4=996, and it differs from 546 by 50*9. So first swap the hundredth 1 with the ones 4 to make 486,186,171, and it increased by (4-1)*99=33*9 so there's still 17*9 to deal with. Lets swap the hundredth 4 with the tenth 7 to get 786,186,141, so it increased by (7-4)*90=30*9. We overshot by 13*9 but it's fine because we can then swap the ones 6 and the hundredth 7 to decrease it by (7-6)*99=11*9. We get 686,187,141. Finally, we are 2*9 too much and we can fix that by switching the tenth 8 and the ones 6 to get 668,187,141 as our answer. The final sum is 996 so it works!

Final note: believe it or not, this method is inspired by the Egyptian method of Method of False Positioning to solve algebraic problems, where just like what we did, they used a random guess and adjusted their answer to fit the exact conditions of the problem.