What Does Polish Notation Mean?
Polish notation is a notation form for expressing arithmetic, logic and algebraic equations. Its most basic distinguishing feature is that operators are placed on the left of their operands. If the operator has a defined fixed number of operands, the syntax does not require brackets or parenthesis to lessen ambiguity.
Polish notation is also known as prefix notation, prefix Polish notation, normal Polish notation, Warsaw notation and Lukasiewicz notation.
Techopedia Explains Polish Notation
Polish notation was invented in 1924 by Jan Lukasiewicz, a Polish logician and philosopher, in order to simplify sentential logic. The idea is simply to have a parenthesis-free notation that makes each equation shorter and easier to parse in terms of defining the evaluation priority of the operators.
Example:
Infix notation with parenthesis: (3 + 2) * (5 – 1)
Polish notation: * + 3 2 – 5 1
When used as the syntax for programming language interpreters, Polish notation can be readily parsed into an abstract syntax tree and stored in a stack. In traditional infix notation with brackets, the equation has to be parsed, the brackets removed, and the operator and operands repositioned. This is not the case with Polish notation, which is why LISP and other related languages use this notation to define their syntax.