Re: RPN logic question Message #28 Posted by C.Ret on 27 Feb 2013, 10:42 a.m., in response to message #1 by Victor Quiros
Quote:
Hi there. Someone posted this on Facebook: 6-1*0+2/2= . Most people answer 7,
In this specific case, most people are correct. Note that isn't the case for every situation.
Quote: however being accustomed to RPN logic my answer is 5:
1 [enter] 0 [x] 2 [enter] 2 [/] [+] [6] [stack swap] [-].
The RPN logic doesn't require you change the order of arguments or operations. Keeping the initial order of the expressions, greatly help making things clearer, easier and free of errors…
6 [ENTER^] 1 [ENTER^] 0 [ x ] [ - ] 2 [ENTER^] [ / ] [ + ]
Quote:
At the beginning I was certain it was 5, but so many people answering 7 got me puzzled. I know there must be one valid answer only. Any thoughts? Thanks and cheers from the tropics.
There is only one solution in the case this expression has to be interpreted with implicit standard rules of precedence.
If it is state that "chain computation" rules have to be applied, then the only expected result is 1. And the corresponding RPN sequence will be :
6 [ENTER^] 1 [ - ] 0 [ x ] 2 [ - ] 2 [ / ]
In the hypothetic case where same exotic rules of interpretation are imposed, another RPN sequence may have to be applied…
As can be seen on this short example, the power of RPN logic system is exactly that the user may adapt its computations to any rules and specific situations.
As a conclusion, RPN logic is not a proof from the correct logic in expression's (or equation's) interpretations. This is not the case with AOS or other CAS systems.
In RPN, the user is in charge of applying the correct logic, not the system. That’s exactly the opposite situation of an 'interpreted expression' in AOS or CAS systems.
That why RPN systems are still preferred by well-to-do people, who exactly know how to get the correct answers in any specific circumstances. And the others systems are preferred by unskilled people who frenziedly hope that a sophisticate digital assistant will suffice in masking personal unawareness.
Edited: 27 Feb 2013, 10:47 a.m.
|