I recently came across an easy question which stumped me . It is as follows:
simplify the following expression
a/b/c/d/e/f .
My approach: for a/b/c/d it's easy to see as dividing a fraction (a/b) by another fraction (c/d) and hence we get answer as ad/bc
However here if we take first fraction as (a/b/c/d) and second fraction as (e/f) the then first fraction simplifies to (ad/bc) and hence [ad/bc]/(e/f) = (adf/bce)
Now if we take first fraction as (a/b) and second fraction as (c/d/e/f) then the second fraction simplifies to (cf/de) and hence (a/b)/[cf/de] = (ade/bcf)
notice that e and f are interchanged in the two answers .so how can we tackle this anomaly?
As mentioned in comments, from a purely mathematical viewpoint the expression is ambiguous. However, in most programming languages division is treated as left-associative, so that $a/b/c/d/e/f$ is simplified to $\frac a{bcdef}$.