How to find postfix of this equation 5+2/[3*{6+2+(5-3/2)-5}+2]-1*5 step by step?

1 Answer
Apr 6, 2018

5 enter 2 enter 3 enter 6 enter 2 + 5 enter 3 enter 2 / - + 5 - * 2 + / + 1 enter 5 * -

Explanation:

#5+2/[3*{6+2+(5-3/2)-5}+2]-1*5#

The question asks for Postfix. I know this as Reverse Polish Notation which places entered results in a memory STACK. Provided that this memory stack has room for at least 6 elements, you can write this expression as

5 enter 2 enter 3 enter 6 enter 2 + 5 enter 3 enter 2 / - + 5 - * 2 + / + 1 enter 5 * -

But be careful! If you use a standard RPN calculator for this with only 4 stack elements, you will get the wrong answer!

This should simplify to #4/43#.

#5+2/[3*{6+2+(color(red)(10/2)-3/2)-5}+2]-1*5#

#5+2/[3*{6+2+color(red)(7/2)-5}+2]-1*5#

#5+2/[3*{color(red)(8)+7/2-5}+2]-1*5#

#5+2/[3*{color(red)(3)+7/2}+2]-1*5#

#5+2/[3*{color(red)(6/2)+7/2}+2]-1*5#

#5+2/[3*color(red)(13/2)+2]-1*5#

#5+2/[color(red)(39/2)+2]-1*5#

#5+2/[39/2+color(red)(4/2)]-1*5#

#5+2/color(red)(43/2)-1*5#

#5+color(red)(4/43)-1*5#

#5+4/43-color(red)(5)#

#4/43#