Our physics teacher gives us problems every week to solve for fun. This week, we got this:
$$9\,\_\,8\,\_\,7\,\_\,6\,\_\,5\,\_\,4=2020$$ Fill in the blanks with the operations $+$, $-$, $\times$, $\div$. Parentheses can be used as you wish.
Despite my attempts at trying to find an elegant way to solve this problem, I eventually gave up and tried brute forcing an answer along with a friend, attempting to try out all of the $4^5×5!$ (I think) possibilities, along with some very basic high-level strategies for some filtering.
A classmate, who used something like a brute force approach and happened to be lucky enough to stumble upon the right answer early got this:
$$(9 \times 8 \times 7 + 6 - 5) \times 4 = 2020$$
While we have an answer, I would like to know if there's a better approach - one that's more elegant and/or efficient.
Any insights would be much appreciated.
Thanks!
I guess that there are a lot of approaches to this problem, but i would consider the following:
Obviously 2020 is too large to be the result of some calculation which does not use a multiplication. So we need $\times$ at least once. That is why one should take a look at the prime factorization of 2020 which leads to $$2020 = 2 \times 2 \times 5 \times 101.$$ This is why i would decide to choose a $\times$ before the 4. Now we have 505 left which is quite large. So i started to multiply the numbers from left to right which leads to $$9 \times 8 \times 7 = 504.$$ This is luckily quite close to 505 which we are looking for and can then be received by adding 6 und subtracting 5. This finally leads us to $$(9 \times 8 \times 7 + 6 - 5) \times 4 = 2020.$$ However, there might be even more efficient ways to that. In particular, concerning the last steps when it comes to figuring out how to receive 505.