This program calculates the Left Greedy form of a positive
braid. For details of the algorithm, see E.A. Elrifai and H.R. Morton
"Algorithms for positive braids", Quart. J. Math. Oxford (2),
45 (1994), 479-497. You should download the files lg.c++ and lg.h.
Here is a sample run:
Enter a sequence of positive braid generators terminated with 0
3 4 2 3 1 2 1 2 3 4 2 3 2 0
Left greedy form is:
(1 5)(2 4)
(2 5 4 3)
Generators are:
4 3 2 1 4 3 2 4 3 4 * 2 3 4
Thus the left greedy form of the braid entered is the composition of
the permutation braids of the permutations (1 5)(2 4) and (2 5 4 3):
the former permutation braid is sigma_4 sigma_3 sigma_2 sigma_1
sigma_4 sigma_3 sigma_2 sigma_4 sigma_3 sigma_4 (a half twist), and
the latter is sigma_2 sigma_3 sigma_4.