Let x and y be positive integers and let a1a2...am and b1b2...bn be the usual decimal notations of x and y. Note that a1 ≠ 0 and b1 ≠ 0. Then define x @ y = a1a2...amb1b2...bn0. For example, 123 @ 45 = 123450.
Assume that natural numbers x1, x2, ..., xN and a product x1 @ x2 @ ... @ xN are given. Then, we can reconstruct the parenthesization as follows.
For example, assume that a1 = 10, a2 = 100, a3 = 10, a4 = 1000, a5 = 10 and a1 @ a2 @ a3 @ a4 @ a5 = 10100010100010000.
We can find the ai's in the product as follows.
1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 |
a1 | a2 | a3 | a4 | a5 |
Replace the redundant 0's by @.
1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 |
a1 | a2 | a3 | a4 | a5 | ||||||||||||
a1 | a2 | @ | a3 | a4 | a5 | @ | @ | @ |
The last row is the reverse Polish notation of the product. This can be interpreted as (a1 @ a2) @ (a3 @ (a4 @ a5)).