Given the infix form:
1 * 2 * 3
What is the Reverse Polish notation?
As I see things, two valid answers are:
A. 1 2 3 * *
B. 1 2 * 3 *
I believe there is a subtle difference between these two forms, as, mathematically, they both yield the same result.
Also, I think the ambiguity comes from the decision of whether to evaluate the expression as (1 * 2) * 3 or 1 * (2 * 3).
How does multiplication work in this case by definition? (if it's any relevance I'm asking this in the realm of computer science).
Technically, there is ambiguity in the infix form $a*b*c$, since it is not a matter of notational definition that this means $(a*b)*c$. In practice, of course, the ambiguity doesn't matter, since the two interpretations evaluate to the same result (unlike the case with octonions, for example). Arguably, there is no ambiguity if we accept the convention that operations of the same type are performed from left to right. However, this convention (unlike the case with subtraction) might be considered as lapsed in the case of multiplication, since it is never exercised.
Reverse polish notation is unambiguous, with the operations applying left to right as soon as they make sense. Your example using numerals is perhaps a little unfortunate, because the prior convention is that $12$ means twelve, not $1\times 2.$