stacks short expressions can be easily converted to postfix formeven those using parentheses consider the expression *( + )which would be written in postfix as abc+longer expressionssuch as the example from earliera* + /dare bit more involved to help in this conversion we can use simple algorithm place parentheses around every group of operators in the correct order of evaluation there should be one set of parentheses for every operator in the infix expression (( ( ) for each set of parenthesesmove the operator from the middle to the end preceding the corresponding closing parenthesis (( *( /+ remove all of the parenthesesresulting in the equivalent postfix expression compare this result to modified version of the expression in which parentheses are used to place the addition as the first operationa ( cd using the simple algorithmwe parenthesize the expression(( ( )dand move the operators to the end of each parentheses pair(( ( +* /finallyremoving the parentheses yields the postfix expressiona similar algorithm can be used for converting from infix to prefix notation the difference is the operators are moved to the front of each group postfix evaluation algorithm parentheses are used with infix expressions to change the order of evaluation but in postfix notationthe order cannot be altered and thus there is no need for parentheses given the unique form or single order of evaluationpostfix notation is good choice when evaluating mathematical expression represented as string of course the expression would have to either be given in postfix notation or first converted from infix to postfix the latter can be easily done with an appropriate algorithmbut we limit our discussion to the evaluation of existing postfix expressions