while writing an arithmetic expression using infix notationthe operator is placed in between the operands for examplea+bhereplus operator is placed between the two operands and although it is easy for us to write expressions using infix notationcomputers find it difficult to parse as the computer needs lot of information to evaluate the expression information is needed about operator precedence and associativity rulesand brackets which override these rules socomputers work more efficiently with expressions written using prefix and postfix notations postfix notation was developed by jan lukasiewicz who was polish logicianmathematicianand philosopher his aim was to develop parenthesis-free prefix notation (also known as polish notationand postfix notationwhich is better known as reverse polish notation or rpn in postfix notationas the name suggeststhe operator is placed after the operands for exampleif an expression is written as + in infix notationthe same expression can be written as abin postfix notation the order of evaluation of postfix expression is always from left to right even brackets cannot alter the order of evaluation the expression ( bc can be written as[ab+]* ab+cin the postfix notation postfix operation does not even follow the rules of operator precedence the operator which occurs first in the expression is operated first on the operands for examplegiven postfix notation ab+cwhile evaluationaddition will be performed prior to multiplication ( ( - ( +dthus we see that in postfix notationoperators are [ab-[cd+applied to the operands that are immediately left to them ab-cd+in the exampleab+ *is applied on and bthen is ( ( ( ( eapplied on the result of addition and [ab+[cd+[de*[ab+cd+/[de*although prefix notation is also evaluated from left to ab+cd+/de*rightthe only difference between postfix notation and prefix notation is that in prefix notationthe operator is placed before the operands for exampleif + is an expression in infix notationthen the corresponding expression in prefix notation is given by +ab while evaluating prefix expressionthe operators are applied to the operands that are present immediately on the right of the operator like postfixprefix expressions also do not follow the rules of operator precedence and associativityand even brackets cannot alter the order of evaluation example convert the following infix expressions into postfix expressions solution example convert the following infix expressions into prefix expressions solution ( ( bc (+ab)* *+abc ( ( - ( + [-ab[+cd*-ab+cd ( ( bc dd [+ab[+cd[*de[/+ab+cd[*de-/+ab+cd*de conversion of an infix expression into postfix expression let be an algebraic expression written in infix notation may contain parenthesesoperandsand operators for simplicity of the algorithm we will use only +-*/operators the precedence of these operators can be given as followshigher priority */lower priority +no doubtthe order of evaluation of these operators can be changed by making use of parentheses for exampleif we have an expression cthen first will be done and the result will be added to but the same expression if written as( bcwill evaluate first and then the result will be multiplied with