Polynomial braid combing
Abstract
Braid combing is a procedure defined by Emil Artin to solve the word problem in braid groups for the first time. It is wellknown to have exponential complexity. In this paper, we use the theory of straight line programs to give a polynomial algorithm which performs braid combing. This procedure can be applied to braids on surfaces, providing the first algorithm (to our knowledge) which solves the word problem for braid groups on surfaces with boundary in polynomial time and space.
In the case of surfaces without boundary, braid combing needs to use a section from the fundamental group of the surface to the braid group. Such a section was shown to exist by Gonçalves and Guaschi, who also gave a geometric description. We propose an algebraically simpler section, which we describe explicitly in terms of generators of the braid group, and we show why the above procedure to comb braids in polynomial time does not work in this case.
1 Introduction
Braid groups can be seen as the fundamental group of the configuration space of distinct points in a closed disc . If the points are unordered, the fundamental group is called the full braid group (or just the braid group) with strands, and denoted . If the points are ordered, the obtained group is a finite index subgroup of , called the pure braid group with strands, .
If one replaces the closed disc with any connected surface , one obtains the full braid group and the pure braid group with strands on .
Emil Artin [1] solved the word problem in braid groups (on the disc) for the first time. Actually, he solved the word problem in , and then used that is a finite extension of by the symmetric group . The way in which he solved the word problem in is known as braid combing. Artin showed that can be seen as an iterated semidirect product of free groups:
The braid combing consists on computing the normal form of a pure braid with respect to the above semidirect decomposition. As the word problem in a free group of finite rank is wellknown, this solves the word problem in .
But there is a big issue with braid combing: It is an exponential procedure. If we start with a word of length in the standard generators of , the length of the combed braid may be exponential in , when written in terms of the generators of the free groups. An explicit example is given in Subsection 3.1. Artin was of course aware of this; In the very last paragraph of [1], in which he talks about braid combing, he says:
“Although it has been proved that every braid can be deformed into a similar normal form the writer is convinced that any attempt to carry this out on a living person would only lead to violent protests and discrimination against mathematics. He would therefore discourage such an experiment”.
It this paper we use the theory of straight line programs (a compressed way to store a word as a set of instructions to create it), to perform braid combing in polynomial time and space. This means that we give an algorithm which, given a word of length in the standard generators of , computes compressed words, each one representing a factor of the combed braid associated to , in polynomial time and space with respect to .
Furthermore, given two pure braids, one can compare the compressed words associated to each of them in polynomial time. Hence, this procedure gives a polynomial solution of the word problem in pure braid groups, using braid combing.
This result, in the case of classical braids, does not improve the existing algorithms, as there are quadratic solutions to the word problem in braid groups of the disc. But it happens that the above procedure is valid not only for braids on the disc, but also for braids on any compact, connected surface with boundary. Hence, this provides the first polynomial algorithm to solve the word problem in . The previously known algorithms [20, 12], based on usual braid combing, are clearly exponential.
In the case of closed surfaces, the braid combing is quite different. There is not such a decomposition of as a semidirect product of free groups, and one needs to use instead a decomposition , where is a point in . The existence of such a decomposition was shown by Gonçalves and Guaschi [9], by giving a suitable section of the natural projection which they explained geometrically, but not algebraically. In this paper we provide an explicit algebraic section, for closed orientable surfaces of genus , which does not coincide with the one defined in [9] (although we also give an explicit algebraic description of the section in [9]).
Finally, we explain why the procedure used to solve the word problem in surfaces with boundary does not generalize to closed surfaces in the natural way.
The plan of the paper is the following. In Section 2 we introduce the basic notions of braids on surfaces. Then in Section 3 we explain braid combing in the case of surfaces with boundary, and give an example showing that combing is exponential. Straight line programs are treated in Section 4, and in Section 5 we introduce the notion of compressed braid combing and give the polynomial algorithm to solve the word problem in braid groups on surfaces with boundary. Section 6 deals with combing on a closed surface: We define the group section from to when is a closed surface, and we explain why the compressed braid combing cannot be generalized to this case in a natural way.
Acnkowledgements: The first author thanks Saul Schleimer, for teaching him about straight line programs at the Centre de Recerca Matemàtica (Barcelona) in 2012, and for useful conversations.
2 Braids on surfaces
Let be a compact, connected surface of genus and boundary components, and let be a set of distinct points of . A geometric braid on based at is an ntuple of paths , such that

, ,

, ,

are distinct points of .
A braid on based at is a homotopy class of such geometric braids (notice that homotopies must fix the endpoints). The usual product of paths endows the set of braids with a group structure, and the resulting group (which is independent of the choice of ) is called the braid group with strands on , and denoted . The path starting at will be called the th strand of the braid.
The above definition can also be explained by saying that the braid group is the fundamental group of , where
is the configuration space of distinct points in , and is the quotient of under the natural action of the symmetric group which permutes coordinates [4]. In other words, a braid can be seen as a motion of distinct points in , whose initial configuration is , they move along the surface without colliding, and their final configuration is again (though the particular position of each point in may have changed). We will sometimes use this dynamic interpretation of a braid throughout this paper.
There are well known presentations for braid groups of surfaces. In the particular cases of the sphere, the torus and the projective plane, the classical references are [6, 3, 10]. For higher genus, one can find presentations in [20, 12, 2, 11]. In all these presentations, some generators are related to the generators of the classical braid group (and correspond to strand crossings), while some other generators are related to the generators of the fundamental group of (and correspond to motions of the distinguished points along the surface).
A braid is said to be pure if , for all , that is, if after the motion each distinguished point goes back to its original position. Pure braids form a finite index subgroup of , the pure braid group with n strands on , denoted . Notice that is just the fundamental group of the configuration space . In particular, .
The main object of study in this paper is braid combing, which is a procedure to produce a particular normal form for pure braids. For this purpose, we need to make precise a particular presentation of . From now on we consider that is a compact, connected orientable surface. We will see that the combing in the nonorientable case is analogous, since one just need to consider the corresponding presentation of appearing in [11, Theorem 3].
Theorem 2.1.
[2] Let be an orientable surface of genus with boundary components. The group admits the following presentation:

Generators: }.

Relations:

if or
or where or even). 
if .

if .

if
or where or odd). 
if odd, and .

if even, and .

Remark 2.2.
We have corrected some missprints of the presentation appearing in [2].
The generator can be represented as a motion of a single point of . Notice that , so we can write for some . Then represents a motion of the point as shown in Figure 1. If the motion of corresponds to one of the classical generators of the fundamental group of a closed surface. If with , the point moves around the th boundary component (notice that there is no generator in which moves around the th boundary component). If for some , the point moves around the point , as in the classical generators for the pure braid group of the disc [4].
Remark 2.3.
The presentation given in [2] is stated for , but it also holds when . For instance, if and , is the classical pure braid group , the only relations that survive are , and the presentation of Theorem 2.1 is precisely the presentation of given in [4].
Remark 2.4.
By using the relations in Theorem 2.1 we can rewrite each conjugation with as a word in generators whose second subindices equal . Moreover, we can use these words to derive analogous relations allowing us to rewrite a word of the form with as a word in generators whose second subindices equal :


if or
or where or even). 
if .

if .

if
or where or odd). 
if odd, and .

if even, and .

These relations together with those appearing in Theorem 2.1 are used frequently throughtout this paper. We use the expression (PR/ER)relations to denote the set consisting of these 12 types of relations.
When is a closed surface, one needs to add an extra relation in the presentation of . We write .
Theorem 2.5.
[2] Let be an orientable closed surface of genus . The group admits a presentation with generators
and the same relations as those in Theorem 2.1 together with
(TR)
for .
Notice that this time the generator corresponds to a motion of the point if . The picture corresponds exactly to the case in which in Figure 1, provided one removes the boundary component on the right hand side of the picture. Note that the (PR/ER)relations also hold in this case.
As above, Theorem 2.5 was stated in [2] for genus , but the presentation also holds in the case , as one gets the known presentation for the pure braid group of the sphere given in [8].
Remark 2.6.
Choose some points in a compact, connected surface , and consider the noncompact surface . Then the braid groups and are naturally isomorphic to and , respectively, where is the surface obtained from by removing a small open neighborhood of , that is, by replacing each with a boundary component. In other words, removing a point from is equivalent to adding a boundary component, as far as braid groups on the surface are concerned.
3 Braid combing on a surface with boundary
From now on we assume that is an orientable surface with boundary components, unless otherwise stated. The case when is a nonorientable surface with boundary can be treated analogously, since one just needs to consider the relations apperaring in the presentation of [11, Theorem 3], instead of the relations. We will discuss the case when is an orientable closed surface in Section 6.
Braid combing is a process by which a particular normal form of a pure braid is obtained. It was introduced by Artin [1] for the pure braid groups of the disc, but it can be generalized to pure braid groups of other surfaces, as we will explain in this section.
Recall that are distinguished points in the surface . For , we denote and . It is well known (see for instance [13]) that the map from to which ‘forgets’ the last strands determines a short exact sequence
(1) 
where the base points of the three involved groups are, respectively, , and .
In the case of a closed surface, the above sequence is also exact if we assume that if is the sphere , and that if is the projective plane . The bad cases are those which involve finite groups, as , [6], and also and , the quaternion group of order 8 [13].
In the sequence 1, an element of can be seen as a braid in in which the first strands are trivial or, in other words, in which the points of do not move. This is equivalent to consider that has extra punctures (or, removing a small neighborhood around each fixed puncture, that has extra boundary components), and points are moving.
To define braid combing, we single out a particular case of the exact sequence 1. When one has
(2) 
where we applied that . We can easily describe the injection algebraically: Let . Considering each element of as a boundary component and using the generators of Theorem 2.1, we see that for all . The projection is also very easy to describe: For every , the element is either 1 (if ), or (if ).
It is known that, since has nontrivial boundary, the sequence 2 splits [9]. An explicit section is given by for all .
Now notice that, as , the fundamental group of is a free group of rank [15], so we have an exact sequence:
(3) 
Therefore, , where can be seen as the subgroup of generated by , and as the subgroup of generated by .
By induction on , can be written as an iterated semidirect product of free groups:
The process of computing the normal form of a braid (on a connected, compact surface with boundary) with respect to this iterated semidirect product, is known as braid combing.
Definition 3.1.
Let be an orientable surface of genus with boundary components. The combed normal form of a braid is a decomposition
where, for , belongs to the subgroup generated by , with .
By the uniqueness of normal forms with respect to semidirect products, the combed normal form of a braid is unique. Also, since each of the subgroups described in Definition 3.1 is a free group on the given generators, one can choose a unique reduced word to represent each , and this gives a unique word representing .
We now describe explicitly how to compute the combed normal form of a pure braid represented by a given word in the generators of . For that purpose, we just need to find a way to move the letters with smaller second index to the left of those with bigger second index. This can be achieved by using the (PR/ER)relations to replace two consecutive letters where , and , with the word , where is a word formed by letters whose second subindex equals . Iteratively applying these substitutions (together with free reduction), the word can be transformed into a reduced word of the form , which also represents , such that the second subindex of every letter of is , for . The decomposition , where is the braid represented by for , is thus the combed normal form of .
We will see in Subsection 3.1 that the length of the word is possibly exponential with respect to the length of . But we will show that it is possible to represent in a compressed way. The key point consists of moving the letters as explained in the above paragraph but, instead of applying the conjugations described in (PR/ER)relations, we will keep track of those conjugations without applying them. We will now show how to do this. To avoid cumbersome notation we use the expression to denote the word , with and two given words.
Suppose that , where for . Thus is a sequence of letters. For every , let be the subsequence of formed by those letters such that and . In other words, is formed by the letters of which come after and have smaller second index. Notice that is formed precisely by the letters of that must be swapped with when combing the braid.
By construction, we have the following:
Lemma 3.2.
Let be as above, representing a braid . Given let be the subsequence of formed by those letters whose second subindex is . Define:
Then represents the same braid as , so represents the combed normal form of .
Example 3.3.
If , we have
Note that in we have and , so . There are no letters of the form , that is why is the trivial word.
The word is not too long with respect to : its length is at most . Indeed, the worst case occurs if we need to swap every pair of letters of , so each has length , and thus the length of is .
Let us see how we can obtain enough information to describe each , by a procedure which is linear in .
Lemma 3.4.
Given as above, and given , one can compute in time a subsequence of and a list of pairs of integers , where and for each , which encodes all the information to describe .
Proof.
Going through the word once, we can determine the position of the first letter with second index , and the word . We know that will have the form and, by construction, that each is a suffix of . Hence, in order to determine we just need to provide the word and the length of . Also, in order to determine the letter we just need to provide its first index and the sign of its exponent (). Hence we just need to provide an integer such that is the first index of , and whose sign is equal to the exponent of .
To obtain these integers, we go through again, starting at the position and setting equal to the length of . Every time we read a letter whose second index is smaller than , we decrease by one. Every time we read a letter whose second index is , we store the pair where is the first index of and the sign of is given by the exponent of (positive if , negative if ), and is the above number. Notice that the first step stores where and is the length of .
At the end of the whole procedure, we have gone through twice (so the complexity is ), and we have obtained a word and a list of pairs of integers which encode as desired. ∎
Example 3.5.
Let be the word with 7 letters appearing in Example 3.3. To describe we store the word and the pairs . To describe we store the word and the pairs .
We have then obtained, for every , a short word representing the factor of the braid combing. But a word representing will be useful only if we represent it as a reduced word in the generators of the corresponding free group. We can obtain from by iteratively applying the (PR/ER)relations: Given a word (suppose that the second subindex of is ), we can write ; then we conjugate by using the (PR/ER)relations, obtaining an element which can be written as a word whose letters have second index equal . Next we conjugate this word by , using the relations again (taking into account that conjugating a product by is the same as conjugating each factor by ). And so on. At the end, is transformed into a word in which the second index of every letter is . After repeating this process with every word in and applying free reduction, one obtains .
This last step of braid combing is the exponential one! It can produce a word which is exponentially long with respect to (we will show such an example in Lemma 3.6). For this reason, in Section 5 we introduce a method based on straight line programs to avoid this last step of braid combing, and to solve the word problem for braids on surfaces with boundary in polynomial time.
3.1 Braid combing is exponential
In this section we provide an example to show that braid combing is, in general, an exponential procedure. That is, we present a family of pure braids , , where each can be expressed as a word whose length is linear in , but whose combed expression is a word of exponential length with respect to . This implies that there is no hope to produce an efficient algorithm to comb braids, if one wishes to express combed braids as words in usual braid generators.
The example will be given in , the pure braid group with 4 strands on the disc , with generators , for . As embeds in for (where is an orientable surface, or if has genus ) by an embedding which sends generators to generators (of the presentations defined in Section 2), it follows that, in general, braid combing is exponential in surface braid groups.
Given , define:
The length of the given word representing is , so it is linear in . We can then show the following:
Lemma 3.6.
With the above notation, the combed normal form of is a reduced word in and their inverses, whose length is exponential in .
Proof.
We consider the inner automorphism of which consists of conjugating by . Then . Using the short exact sequences explained in the previous section, we see that induces an automorphism on the free group generated by , , , so can be written as a word on these letters and their inverses.
The fact that is exponentially long when written as a reduced word in and their inverses, can be deduced from the fact that is a pseudoAnosov braid in . However, since we want to make this example as explicit as possible, we will provide an algebraic proof.
To simplify the notation, let us denote for . From the presentation of , one can check the following:
Let us consider the following three words: , and . Then we can write:
Suppose that we can decompose a braid in the following way:
where and for . This expression of is not necessarily reduced when written in terms of , but the cancellations are only restricted to subwords of the form or , and in these cases only two letters cancel, and no further cancellation is produced. Therefore, the length of the reduced word in associated to , is at least . If we moreover assume that , then the length of is greater than . In this case, we say that admits a decomposition of length .
We point out that . This follows from the fact that commutes with and .
Finally, we conclude the proof by showing that admits a decomposition of length .
We proceed by induction on . First, we check that , so the claim holds in the case . Now suppose the claim is true for some , so for some . Then we have
Finally, since
it follows that admits a decomposition, whose length is at least , thus greater than . ∎
4 Straight line programs
We have seen that combing a braid consists of decomposing it as a product in a suitable way. We have also seen that, in general, if is given as a word of length , the length of a factor may be exponential in . So, how could we make this procedure to have polynomial complexity? The answer is: We will not describe each as a word in the generators of the corresponding free group. Instead, we will describe each as a compressed word (also called straight line program).
The concept of straight line program is well known in Complexity Theory [5], and has been used in Combinatorial Group Theory to reduce the complexity of decision problems [19]. In this section we review the main aspects related to straight line programs, which we will call compressed words, following [19].
Roughly speaking, a compressed word consists on two disjoint finite sets of symbols and (the latter is ordered), called terminal and nonterminal alphabets respectively, together with a set of production rules indicating how to rewrite each nonterminal character in as a word in and smaller characters of . In this way, the biggest nonterminal character can be rewritten, using the production rules, as a word in that we denote (the evaluation of , or the decompressed word). So can be seen as a small set of instructions on how to produce a long word in .
Here is the rigorous definition:
Definition 4.1.
A compressed word (or straight line program) consists on a finite alphabet of terminal characters together with an ordered finite set of (nonterminal) symbols , and a set of production rules allowing to replace each nonterminal with its production: a (possibly empty) word , where every nonterminal appearing in has index . The greatest nonterminal character in , , is called the root.
The evaluation of the compressed word , , is the (decompressed) word in obtained by replacing successively every nonterminal symbol with the righthand side of its production rule, starting from the root.
We define the size of a compressed word as . We can assume that (if a terminal character appears in no production rule, we can remove it from as it will not appear in ). We can also assume that (if a production rule transforms a nonterminal symbol into the empty word, we can remove every appearance of the nonterminal symbol from the whole compressed word). Therefore, the space needed to store is at most , and this is the reason why is called “the size of ”.
Example 4.2.
Given , consider the following compressed word:
The sequence of compressed words encodes the sequence of Fibonacci words. The first seven decompressed words are, respectively:
We see that every word is the concatenation of the two previous ones. Notice that , while , the th Fibonacci number. So, in this example, the sizes of compressed words grow linearly in , while the sizes of decompressed words grow exponentially.
Two compressed words and are said to be equivalent if .
A crucial property is that a pair of compressed words can be compared without being decompressed:
Theorem 4.3.
[18] Given two compressed words and , there is a polynomial time algorithm in and which decides whether or not .
Now recall that we want to use compressed words to describe the factors of a combed braid. The leftmost factor does not need to be compressed, as it can be expressed as a subsequence of the original word. Each of the other factors, , belongs to a free group. So we would like to compress words representing elements of a free group.
In order for this procedure to be useful (for instance, to solve the word problem in braid groups), we need to be able to compare two compressed combed braids. This means that we need to determine whether two compressed words ( and ) evaluate to words ( and ) which represent the same element in a free group. That is, we want to compare the uncompressed words not just as words, but as elements in a free group.
Fortunately, this problem has already been satisfactory solved:
Theorem 4.4.
[16] Given a compressed word , there exists a polynomial time algorithm producing a compressed word such that is the free reduction of .
As a consequence, if we have two compressed words and , we can compute and in polynomial time, and then we can check in polynomial time whether and are the same word (Theorem 4.3). Hence, the compressed word problem in a free group is solvable in polynomial time.
We will therefore be able to use compressed words to perform braid combing, and to compare combed braids, in polynomial time. We now proceed to describe how to compress the words appearing in the process of braid combing.
5 Compressed braid combing
Throughout this section, will be a compact, connected orientable surface with boundary components. The arguments in this section can also be applied in a straightforward way if is nonorientable, just by using the appropriate presentations.
Recall that the combing algorithm for a braid starts with a word representing , where for , and produces words, , representing the factors of the combed normal form of . Each is a reduced word formed by letters whose second subindex is . Moreover, we gave a procedure to compute short words representing the factors of the combed normal form of in polynomial time, only that the second index of a letter in is not necessarily .
In some sense is a compressed expression of . Notice that the word is actually equal to , and its length is at most , so we do not need to use compression for this first factor. Let us study the other cases.
In this section we will see how, starting from