SOLUTION: construct an expression tree for the following expression: ((1+5)/1-4)*(16+(4*(5-8)))

Algebra ->  Sequences-and-series -> SOLUTION: construct an expression tree for the following expression: ((1+5)/1-4)*(16+(4*(5-8)))       Log On


   



Question 945195: construct an expression tree for the following expression:
((1+5)/1-4)*(16+(4*(5-8)))


Answer by Edwin McCravy(20065) About Me  (Show Source):
You can put this solution on YOUR website!
%28%28%281%2B5%29%29%2F1-4%29%2A%2816%5E%22%22%2B%284%5E%22%22%2A%285-8%29%29%5E%22%22%29

Attend to the innermost parentheses that is farthest to the left,
so replace (1+5) by 6 and copy everything else over:

%28%286%29%2F1-4%29%2A%2816%5E%22%22%2B%284%5E%22%22%2A%285-8%29%29%5E%22%22%29

Attend to the innermost parentheses that is farthest to the left,
which is %28%286%29%2F1-4%29, so divide the 6 by the 1, getting 6 and 
copy everything else over:

%286-4%29%2A%2816%5E%22%22%2B%284%5E%22%22%2A%285-8%29%29%5E%22%22%29

Attend to the innermost parentheses that is farthest to the left,
which is %286-4%29, so subtract and replace it by 2 and 
copy everything else over:

2%2A%2816%5E%22%22%2B%284%5E%22%22%2A%285-8%29%29%5E%22%22%29

Attend to the innermost parentheses that is farthest to the left,
which is %285-8%29, so subtract and replace it by (-3) and 
copy everything else over:

2%2A%2816%5E%22%22%2B%284%5E%22%22%2A%28-3%29%29%5E%22%22%29

Attend to the innermost parentheses that is farthest to the left,
which is %284%5E%22%22%2A%28-3%29%29, so multiply and replace it by (-12) and 
copy everything else over:

2%2A%2816%5E%22%22%2B%28-12%29%5E%22%22%29

Attend to the innermost parentheses that is farthest to the left,
which is %2816%5E%22%22%2B%28-12%29%5E%22%22%29, so replace it by 4 and 
copy everything else over:

2%2A4

And the final answer is

8

Edwin