Wednesday, July 8, 2009

Practice with Polish notation

Find the values of the numbers from these expressions.

- + ^ 10 2 20 + 12 17 =

- 12 * 2 + 4 ^ 3 - 2 1 =

Turn these equations in standard notation into Polish notation.

y = ax^2 + bx + c

A = Pe^(rt)

Answers in the comments.

1 comment:

Prof. Hubbard said...

Correction from this morning.

Find the values of the numbers from these expressions.

Any op num num pattern will be marked in bold and on the next line down it will be turned into a number.


- + ^ 10 2 20 + 12 17 =

- + 100 20 29 =

- 120 29 =

91

===

- 12 * 2 + 4 ^ 3 - 2 1 =

- 12 * 2 + 4 ^ 3 1 =

- 12 * 2 + 4 3 =

- 12 * 2 7 =

- 12 14 =

-2

===


Turn these equations in standard notation into Polish notation.

y = ax^2 + bx + c

First we square x. We could also multiply x and b at the same time. Since we don't combine them yet, it's not a Polish notation single equation yet, so I'm putting in ...

^ x 2 ... * b x

Now we can multiply the a to the x^2 and add the c to the bx,

* ^ a x 2 ... + * b x c

Now we add the two terms together, and say that y is equal to the right side.

y = + * ^ a x 2 + * b x c


A = Pe^(rt)

Parentheses first.

* r t

Exponent next.

^ e * r t

Multiply by P last.

A = * P ^ e * r t