A Fast Algorithm for Stallings' Folding Process

Stalling's folding process is a key algorithm for solving algorithmic problems for finitely generated subgroups of free groups. Given a subgroup H = 〈J1,…,Jm〉 of a finitely generated nonabelian free group F = F(x1,…,xn) the folding porcess enables one, for example, to solve the membership problem or compute the index [F : H]. We show that for a fixed free group F and an arbitrary finitely generated subgroup H (as given above) we can perform the Stallings' folding process in time O(N log*(N)), where N is the sum of the word lengths of the given generators of H.