09-11-2017, 04:26 PM

In the example provided in task 3's description, the infix expression

(2 + 3 * x ^ 5 + a)

is given as

(2 3 x 5 ^ * a + +)

when written in postfix notation. However, the directions also state

"Note that all operators are left associative."

From my understanding of associativity, it seems that 2 + [3*x^5] should be evaluated first, instead of [3*x^5] + a, yielding a correct postfix representation of

(2 3 x 5 ^ * + a +)

(2 + 3 * x ^ 5 + a)

is given as

(2 3 x 5 ^ * a + +)

when written in postfix notation. However, the directions also state

"Note that all operators are left associative."

From my understanding of associativity, it seems that 2 + [3*x^5] should be evaluated first, instead of [3*x^5] + a, yielding a correct postfix representation of

(2 3 x 5 ^ * + a +)