Math's puzzle school problem

142 Views Asked by At

I got this weird homework situation and i can't find out what the answer is.

I got to find out how to get $828$ using the numbers $8, 6, 8, 3, 75$ and $9$. Moreover, I can use all the operators $*, -, /$ and $+$.

2

There are 2 best solutions below

6
On

Hint: $828$ is divisible by $9$, and the other factor is quite close to $75$. Can you use the remaining $4$ numbers to express the difference?

0
On

For this sort of problem, if possible, I will be lazy and ask a computer to find all solutions for me.

  • If we ignore commutativity and associativity of addition and multiplication, there are $30965760$ ways to write down an arithmetic expression involving $6$ variables.

  • Out of all these choices, $2400$ of them will return $828$. If we use the fact the value $8$ appeared twice in the list of $6$ variables, this problem has $1200$ solutions.

  • Using associativity and commutativity, we can reduce the size of list to $154$.

  • Notice subtraction is the inverse of addition and division is the inverse of multiplication. We can treat expression like $(a/b)/(c/d)$ equivalent to $(ad)/(bc)$. This allow us to further reduce the size of list down to $20$.

The rightmost column of table below is the list of $20$ solutions.

All $1200$ solutions can be generated from them by moving the variables around, rearranging the parentheses and/or collapsing multiple subtractions/divisions without using the actual values of the variables.

Group                                     # Expression
x5+x4+(2*x2+x1)*x3                     1  # ( ( ( ( ( 75 + 8 ) + 8 ) * 9 ) + 6 ) + 3 )
x3*x4*x5+(x1-1)*x3                     2  # ( ( ( ( 6 * 3 ) + 75 ) - ( 8 / 8 ) ) * 9 )
x5+(x2^2+x1)*x4-x3                     3  # ( ( ( ( ( 8 * 8 ) + 75 ) * 6 ) + 3 ) - 9 )
(x1-x4)*x5-x3*x4+x1*x3                 4  # ( ( ( ( 75 * 8 ) / 8 ) - 6 ) * ( 9 + 3 ) )
                                       5  # ( ( ( ( 75 - 6 ) * ( 9 + 3 ) ) * 8 ) / 8 )
                                       6  # ( ( ( ( 75 - 6 ) * ( 9 + 3 ) ) + 8 ) - 8 )
                                       7  # ( ( ( ( 8 * 3 ) / 8 ) + 9 ) * ( 75 - 6 ) )
                                       8  # ( ( ( ( 9 * 8 ) / 8 ) + 3 ) * ( 75 - 6 ) )
                                       9  # ( ( ( ( 9 + 8 ) + 3 ) - 8 ) * ( 75 - 6 ) )
                                      10  # ( ( ( 75 + 8 ) - ( 8 + 6 ) ) * ( 9 + 3 ) )
                                      11  # ( ( 75 - ( ( 8 * 6 ) / 8 ) ) * ( 9 + 3 ) )
                                      12  # ( ( 8 - ( ( 9 + 8 ) + 3 ) ) * ( 6 - 75 ) )
                                      13  # ( 8 - ( ( ( 6 - 75 ) * ( 9 + 3 ) ) + 8 ) )
(x2^2*x3*x4*x5-x1*x2*x3)/x4           14  # ( ( ( ( 8 * 3 ) - ( 75 / 6 ) ) * 9 ) * 8 )
(2*x2+x1)*x5+(2*x2+x1)*x4+x3          15  # ( ( ( ( 75 + 8 ) + 8 ) * ( 6 + 3 ) ) + 9 )
(-x2^2-x1)*x5-x4+(x2^2+x1)*x3         16  # ( ( ( ( 8 * 8 ) + 75 ) * ( 9 - 3 ) ) - 6 )
(x2*x4*x5+(x1*x2-x2^2)*x3)/x4         17  # ( ( ( ( ( 75 - 8 ) * 9 ) / 6 ) + 3 ) * 8 )
                                      18  # ( ( 3 - ( ( ( 8 - 75 ) * 9 ) / 6 ) ) * 8 )
((x2^2*x4+x2*x3)*x5+x1*x2*x4)/x4      19  # ( ( ( ( ( 9 / 6 ) + 8 ) * 3 ) + 75 ) * 8 )
-(x1*x2*x5+x2*x3*x4-x2^2*x3)/x4-x2    20  # ( ( ( ( 75 * 3 ) / ( 8 - 6 ) ) - 9 ) * 8 )

To detect whether there are other form of equivalences. I have replaced the values $75, 8, 9, 6, 3$ by $x_1, x_2, x_3, x_4, x_5$ and ask a CAS to simplify the expression. We can group the $20$ solutions into $10$ groups according to these resulting rational functions.

Expressions belongs to different groups are truely inequivalent. For expression belongs to same group, whether they are equivalent or not depends on what sort of operations is allowed. For example, if we allow minus sign to be distributed across parenthesis, expression $17$ and $18$ will become equivalent to each other.

For the remaining expressions, expression $4, \cdots, 11$ can be constructed from a single expression $(75 - 6) * (9+3)$ by injecting a *8/8 or +8/-8 in various places:

$$828 = (( \overset{4:*/\\ \;\downarrow}{75} \underset{\;\;\uparrow\\10:\pm}{-} \overset{11:*/\\ \;\;\downarrow}{6} ) \underset{\;\;\uparrow\\ 5:*/}{*} ( \overset{8:*/\\ \;\downarrow}{9} \underset{\;\uparrow\\9:\pm}{+} \overset{7:*/\\ \;\downarrow}{3} ))\overset{\quad 6:\pm\\ \swarrow}{}$$

Expression $12$ and $13$ can be constructed from $(-(9+3))*(6 - 75)$ by insertion of a +8/-8.
If one allow minus signs to distribute across parenthesis, they will be equivalent to expression $4, \ldots, 11$.