Is there a way you can get the number 5 from the numbers 6, 7, 8, and 9 using only addition, subtraction, multiplacation, and division, without combining two numbers e.g. using the 6 and 7 to create 67. Exponents, factorials, and trig functions are not allowed. If there is no way to do this, is there a way to prove that it is impossible? Thanks if you answer.
Asked
Active
Viewed 593 times
0
-
Clearly nonunique. – Oscar Lanzi Jul 02 '19 at 13:43
4 Answers
4
The code in my answer to your other question gives one more solution (after curating the output by hand)
7*(8-6)-9=5 (Bruno's solution)
(7+8)/(9-6)=5.0 (Oscar's solution)
8-6/(9-7)=5.0
8/6*9-7=5.0 (Zach's solution)
Calvin Khor
- 34,903
-
(PS because the code performs an exhaustive search, this is all the solutions) – Calvin Khor Jul 04 '19 at 00:32
-
Did you write the cases manually, or did you iterate over a list of functions? In second case, could I see the code? – Sudix Jul 05 '19 at 01:13
-
1@Sudix You may indeed see the code, its in the linked answer (you just need to change the 6 to a 5 (also I think you don't lose any solutions to floating point errors)) – Calvin Khor Jul 05 '19 at 01:43
-
2
here is one other way to do it:
$$ (8-6)\cdot 7 - 9 = 5 $$
Bruno Reis
- 2,306
-
@TheCount $(8-6)\cdot 7 - 9 = 2\cdot 7 - 9 = 14 - 9 = 5$. How this does not provide an answer? It's a direct answer since it's an elementary math problem. Do I need to explain more than the expression I wrote? – Bruno Reis Jun 30 '19 at 01:22
-
FYI, that comment is a formatted thing that happens automatically by clicking. I probably did it by mistake, since this is definitely an answer to the question. Will delete. – The Count Jun 30 '19 at 02:24
-