Processing math: 100%

Sunday, July 16, 2023

Order of Operations

You are writing an expression using the whole numbers 1,2,3,4,5,,4N+1, for some nonnegative integer N and the operations of addition, subtraction, multiplication, and division. Importantly, you must use each number exactly once and each operation exactly N times. Also, you can use as many parentheses as you would like. No concatenation of the digits is allowed (i.e., you can’t combine 2 and 3 to make the number 23). What is the largest value you can generate, using the nine digits and eight operations?

The largest number generated using integers numbers 1,,4N+1 and the four operations provided that each operation is used N times is m(N)=(4N+1)(6N+1)N.

To prove this we will need to argue first that m(N) is equivalent to the number ˆm(N), which is the largest number that can be constructed using only N multiplications and N additions using the number 2N+1,2N+2,,4N,4N+1. Certainly, any arithmetic expression using only N multiplications and N additions and the numbers 2N+1,,4N+1 each once, say x=f(2N+1,,4N+1), can be made into an aritchmetic expression using each of the integers 1,,4N+1 once and each operation exactly N times, by simply letting x=g(1,,4N+1)=f(2N+1,,4N+1)(2N(2N1))(21).

Therefore, we must have m(N)ˆm(N). We can reasonably hand-wave that it cannot be the case that m(N)>ˆm(N), since that would imply that the largest possible outcome either consists of dividing by some non-unit divisor or subtracting some integer from a larger arithmetic expression. Both of which yield contradictions.

OK, so we have reasonably almost halved the problem and can now focus on only a problem of N multiplications, N additions and the integers 2N+1,,4N+1. Similar to the hand-wavey arguments above, it is straightforward that ˆm(N) has the form x1(x2+x3)(x2N+x2N+1)

for some choice of x=(x1,,x2N+1)X where X:={(x1,,x2N+1){2N+1,,4N+1}(2N+1)xixj,ij}.
With all of that hand-waving done, the only thing that is left to do is decipher the appropriate, maximal assignment of the variables x=(x1,,x2N+1)X.

The AM-GM inequality states the arithmetic mean of nonnegative numbers is always greater than or equal to the geometric mean of those same numbers, that is, for any positive integer k and any real numbers y1,,yk0, y1++ykkky1yk.

So with the help of said AM-GM inequality, for any choice of variable assignments x=(x1,,x2N+1)X, x1(x2+x3)(x2N+x2N+1)=x1Ni=1(x2i+x2i+1)x1(Ni=1(x2i+x2i+1)N)N=x1(2N+1i=2xiN)N=x1((2N+1)(3N+1)x1N)N,
where the last equality comes from the fact that 4N+1i=2N+1i=(2N+1)(3N+1). Since the derivative of the right-hand side of the inequality is positive whenever x1<(2N+1)(3N+1)N, and (2N+1)(3N+1)N>4N+1 for all nonnegative integers N, if we want to maximize the right-hand side of the inequality for the choice of x1{2N+1,,4N+1}, we obtain the upper bound for ˆm(N)(4N+1)((2N+1)(3N+1)(4N+1)N)N=(4N+1)(6N2+5N+1(4N+1)N)N=(4N+1)(6N+1)N.
On the flip side, this upper bound is actually achieved by ˆxX such that ˆx1=4N+1,ˆx2=2N+1,ˆx3=4N,ˆx4=2N+2,ˆx5=4N1,,ˆx2i=2N+i,ˆx2i+1=4Ni+1,,ˆx2N=3N,ˆx2N+1=3N+1
so we have "proven" (via some hand waving) that m(N)=ˆm(N)=(4N+1)(6N+1)N.
In particular, the first few values of m(N) are given by 35, 1,521, 89,167, 6,640,625, and 601,212,171 for N=1,2,3,4, and 5, respectively. I smell a new OEIS entry coming on ...

No comments:

Post a Comment