With using the following #'s 56,27,04,17,93 How do I find my answer of 41?
Let A, B, C, D, E represent the five numbers and OP1 to OP4 represent 4 binary operations: add, subtract, multiply, divide. Although the letters represent the given numbers, we don't know which unique number each represents. Then we can write OP4(OP3(OP2(OP1(A,B),C),D),E)=41 where OPn(x,y) represents the binary operation OPn between two operands x and y. We can also write: OP3(OP1(A,B),OP2(C,D))=OP4(41,E) as an alternative equation. We are looking for a solution to either equation where 04...93 can be substituted for the algebraic letters and the four operators can be substituted for OPn. Because the operation is binary, requiring two operands, and there is an odd number of operands, OP4(41,E) must apply in either equation. So we only have to work out whether to use OP3(OP2(OP1(A,B),C),D)=OP4(41,E) or OP3(OP1(A,B),OP2(C,D))=OP4(41,E). Also we know that add and subtract have equal priority and multiply and divide have equal priority but a higher priority than add and subtract.
41 ia a prime number so we know that OP4 excludes division. If OP4 is subtraction, we will work with the absolute difference |41-E| rather than the actual difference. For addition and multiplication the order of the operands doesn't matter. This gives us a table (OP4 TABLE) of all possibilities,
This table shows all possible results for the expression on the left-hand side of either of the two equations.
The table below shows OPn(x,y):
In this table the cells contain (R+C,|R-C|,RC,R/C or C/R) where R=row header and C=column header. The X cells are redundant.
Now consider first: OP3(OP1(A,B),OP2(C,D)). To work out all possible results we have to take each value in each cell and apply operations between it and each value in all other cells not having the same row or column. For example, if we take 21 out of row headed 17, we are using (R,C)=(17,4), so we are restricted to operations involving (56,27), (93,27) and (93,56). We can only use the numbers in these cells, but the improper fractions can be inverted if necessary. If the result of the operation matches a number in the only cell in the OP4 TABLE with the remaining R and C values then we have solved the problem.
As it happens, the sum of 21 from (17,4) and 37 from (93,56) is 58 which is in (+,17) of the OP4 TABLE. Unfortunately, the column number 17 is the same as the row number in (17,4). To qualify as a solution it would have to be in the 27 column of the OP4 TABLE. But let's see if the arithmetic is correct:
(17+4)+(93-56)=21+37=58=41+17; so 41=(17+4)+(93-56)-17. Yes the arithmetic is correct, but 17 has been used twice and we haven't used 27. So the arithmetic actually simplifies to 41=4+93-56, because 17 cancels out and, in fact, we only used 3 numbers out of the 5. Still, you get the idea.
(4*17)+(56-27)=68+29=97=41+56; 41=4*17+56-27-56 is another failed example because 93 is missing and 56 is duplicated, so this simplifies to 41=4*17-27, thereby omitting 56 and 93. Similarly, (27+4)+(93-27)=31+66=97=41+56; so 41=(27+4)+(93-27)-56=4+93-56, omitting 17 and 27.
The question doesn't make it clear whether all 5 numbers have to be used just once to produce 41, or whether 41 has to be made up of only the given numbers, but not necessarily all of them. In the latter case, it's clear we have found some solutions.
The method I used was to create a table made up of all possible OPn(x,y) as the row and column headers. Then I eliminated all cells where the (x,y) components of the row and column contained an element in common. Each uneliminated cell contained (sum,difference,product,quotient) values. When this table had been completed, I looked for occurrences of the numbers in the cells of the OP4 TABLE, and I highlighted them. The final task was to see if there were any highlighted cells such that the numbers that matched cells in the OP4 TABLE were in a column, the header of which made up the set of five given numbers. It happened that there were none, so OP3(OP1(A,B),OP2(C,D))=OP4(41,E) could not be satisfied. No arrangement of A, B, C, D or E with OP1 to OP4 could be found.
More to follow... Read More: ...