123456789=1 problem

Insert multiplication and division operators and parentheses into the following sequence to make the equation true.

Note that you can combine digits to form numbers, such as 1 and 2 to make 12, or 4 and 5 to make 45, but you can't alter the order of the sequence.

1 2 3 4 5 6 7 8 9 = 1

• Doesn't seem to be a duplicate - this requires only multiplication and division, the other allowed any operators. Note that it's super easy with +/- : 1-2+3+4-5-6+7+8-9 = 1 Commented Feb 12, 2016 at 23:17
• Yes, both solutions are nice and elegant twins. Upvoted because it is an excellent exercise for more approaches to attack it. An 8yo can try it, it involves a lot of the arithmetics of numbers (multiplicative world), the twin solutions use a "dissolve in the middle pattern" ($\dots\times 56/7/8\dots$ and/or $\dots /56\times 7\times8\dots$) then for the remained digits $12\times 3/4/9$, and moreover, this is a nice computer programming item, that should appear in the first good informatics manuals for the first classes. Commented Jul 8 at 19:11

$$12 \times (3/4)/56 \times 7 \times 8/9 = 1$$

The following sage code prints all the solutions. (No parenthesis allowed.)

sage: c = cartesian_product([['*', '/', ''] for k in range(8)])
sage: for ops in c:
....:     s = '1{}2{}3{}4{}5{}6{}7{}8{}9'.format(*ops)
....:     if eval(s) == 1:
....:         print(s)
....:
....:
12*3/4*56/7/8/9
12*3/4/56*7*8/9