Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

In RPN do we still have to take into note the PEDMAS rules?

For example these questions:

3 – 4 * 2

3 * 4 – 2

3 * (4 – 2)

(3 – 4) * 2

3 – 4 + 2

Answers

342*-

34*2-

---dont know this one

34-2*

342+-

Thanks.

share|improve this question
2  
If by "RPN" you mean Reverse-Polish Notation, then (1) order of operations is dictated purely by the order of the symbols with no special rules; and (2) your examples are not in RPN. –  Isaac Jun 19 '11 at 7:47
    
Yes, I mean Reverse-Polish Notation. And yes I know. I was just wondering how you would write them. Are these the correct answers: updated my post with the anwsers which i think are correct. –  orange Jun 19 '11 at 8:02
    
If the problem is to convert from "standard form" to RPN, then yes, you have to follow conventions for interpreting the meaning of the standard form expressions. Conventions may vary, so the only way to be 100% sure is to be told by the person who grades your homework. However, I have little doubt that "PEDMAS" will suffice. –  Jonas Meyer Jun 19 '11 at 8:16
    
Hmm... now I'm wondering if you came to your answer to the fifth one by thinking P-E-D-M-A-S rather than P-E-(DM)-(AS). That is, multiplication and division have the same precedence and are typically interpreted from left to right, simultaneously, and similarly for addition and subtraction. –  Isaac Jun 19 '11 at 8:18

1 Answer 1

up vote 2 down vote accepted

Let's look at what you've got so far:

     Algebraic      RPN
(a)  3 – 4 * 2     3 4 2 * -
(b)  3 * 4 – 2     3 4 * 2 -
(c)  3 * (4 – 2)   [don't know]
(d)  (3 – 4) * 2   3 4 - 2 *
(e)  3 – 4 + 2     3 4 2 + -

Of these, (a), (b), and (d) are correct.

Your expression for (e) will add the 4 and 2, then subtract the result from 3, so its algebraic equivalent would be $3-(4+2)$. To express $3-4+2$ in RPN, the subtraction should happen before the addition, so the - symbol should appear earlier than the + symbol. Does this give you enough information to finish it?

For (c), start with the numbers in order, as you have them in all the rest of your expressions: 3 4 2. Now, what operation happens first? Where does that symbol need to go? What operation is next? Where does that symbol go? (Does this give you enough information?)

share|improve this answer
1  
Ah ok, So c) would be 342-*, and for e) 34-2+. Thanks. –  orange Jun 19 '11 at 8:25
    
@Jeff: Yes, those are correct. –  Isaac Jun 19 '11 at 8:26

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.