English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I have a expression as

(A+B) * [ C * ( D+E)+F]

This can be converted to postfix as

AB+ DE+C*F+*

And also this one seems to be correct

AB+ CDE+*F+*

So can there be 2 expression for same infix expression or one is wrong in this case?
Please answer as soon as possible, with correct explanation and if possible reference too.

2007-05-13 20:04:59 · 2 answers · asked by Anonymous in Science & Mathematics Mathematics

2 answers

Only trivially, as by reversing the order of commuting operands. Which is what has happened in the second expression.

2007-05-13 20:11:15 · answer #1 · answered by Anonymous · 0 0

i dont think , 2 different but equivalent trees can occur if you traveverse first the left side , and then the rigth side of the tree rooted at some node.
but i am not sure because sometiomes the order is important that is a + b and b + a are different in that case the order in whgich you visit the nodes is also important

2007-05-13 20:20:25 · answer #2 · answered by gjmb1960 7 · 0 0

fedest.com, questions and answers