Talk:Parsing/RPN to infix conversion: Difference between revisions

m
→‎Examples Incorrect: Associative Property NE Operator Associativity
m (→‎Examples Incorrect: Associative Property NE Operator Associativity)
Line 15:
:::::: Thank you! --[[User:Dgamey|Dgamey]] 01:48, 18 December 2011 (UTC)
:: Huh, if you want minimum parentheses and follow the [[wp:Associativity|actual definition]] of associativity, the task itself is incorrect: - and / are non-associative. The term "left-associative" is often loosely used when parsing infix notations, to determine the order of ops in absence of parens, but to do the reverse and requiring minimum number of parens, this kind of definition of associativity is not enough, and you need to know the exact behaviour of the operators (a + b + c requires none, but a - b - c may need one pair, even though both + and - are both loosely "left associative"). The task needs some more work, or there may be other holes after people try to fix the solutions. --[[User:Ledrug|Ledrug]] 17:50, 17 December 2011 (UTC)
::: I just realized that we are not using the same terminology at all. You've been talking about the '''associative property''' which is different from '''[[wp:Operator_associativity]]'''. This would tend to speak to slightly different backgrounds mathematics .vs. computer science (or at least parsing). The task description was originally correct from this perspective. But clearly not from the mathematical definition! The dangers of terminology overload. Ouch! --[[User:Dgamey|Dgamey]] 22:34, 19 December 2011 (UTC)
::: I didn't write it, I just noticed it was broken. Perhaps it should be knocked back to draft. --[[User:Dgamey|Dgamey]] 18:20, 17 December 2011 (UTC)
:::: By adding the extra example in a table other examples could be added easily. Although for output, perhaps suppressing the detail for all but one case would be appropriate. --[[User:Dgamey|Dgamey]] 18:19, 17 December 2011 (UTC)
Anonymous user