Questions tagged [polish-notation]

For questions on Polish notation. Polish notation, named for the Polish logician Jan Łukasiewicz, is a mathematical notation in which operators precede their operands.

Polish notation is a prefix notation in which operators precede their operands. The notation allows mathematical expressions to be written unambiguously without the use of parentheses. For example

$$ \begin{matrix} + & 4 & \times & 3 & 5 \end{matrix} $$

can be written in the usual (infix) notation as

$$ 4+(3\times 5). $$

Polish logician Jan Łukasiewicz introduced the notation in 1924 and used it extensively in his own work. It has fallen out of use in logic, but still finds application in computer science.

Source: https://en.wikipedia.org/wiki/Polish_notation

33 questions
3
votes
3 answers

Practicing Polish/Prefix notation

- * / 15 - 7 + 1 1 3 + 2 + 1 1 = - * / 15 - 7 2 3 + 2 + 1 1 = - * / 15 5 3 + 2 + 1 1 = - * 3 3 + 2 + 1 1 = - 9 + 2 + 1 1 = - 9 + 2 2 = - 9 4 = …
Karl
  • 875
2
votes
1 answer

Polish notation, rooted tree

Hi im suppost to write the expression (w+x - y)/(pi * z^3) in Polish notation. My answer was / - + w x y * pi ^ z 3 But the solution is / + w - x y * pi ^ z 3 Is my answer the same as the solution and if not what am I doing wrong?
Erika
  • 387
1
vote
2 answers

Calculate an Average in RPN (Reverse Polish Notation)

To calculate an average in reverse polish notation (RPN) is the following correct (assuming a-j are variables representing numbers): a,b,+,c,+,d,+,e,+,f,+,g,+,h,+,i,+,j,+,10,/ If it is correct, are there other ways that this could be expressed in…
1
vote
1 answer

Calculate a formula in Reverse Polish Notation

I hope I'm writing this post in correct forum. I've got a equation -11*2*(-1)*3 which i transferred into RPN -> 11,2,*,1,-,*,3,*,-. And here I have problem with resolving it: 11*2 = 22 22-1= 21 22*what = ? what should i multiply by in last equation…
Mikkey
  • 95
0
votes
3 answers

Reverse Polish Notation

For example : a + b - c = abc-+ Why is this correct ? xy - z+ = xyz-- as I understand, it has to be : xy - z+ = xyz+-
f855a864
  • 301
0
votes
0 answers

Single operand or double operand for the negation operator confusion.

Infix expression : 2+³√-(4+4) Evaluation of which results in 0. However, when converted into postfix and evaluated, it gets confusing. Postfix expression : 244+-³√+ It gets confusing at the negation operator, to evaluate it correctly, we should only…
0
votes
1 answer

Is it possible to omit multiplication operator in polish/prefix notation?

In infix notation, (2/2(3+3)) means (2/(2*(3+3)). The multiplication sign is omitted. In polish/prefix notation, is it possible to omit multiplication sign? For instance, is it acceptable to write ( * + 2 3 ( / 12 4)) as ( + 2 3 ( / 12 4))?
Karl
  • 875