On the complexity of the Whitehead minimization problem
  The Whitehead minimization problem consists in finding a minimum size element in the automorphic orbit of a word, a cyclic word or a finitely generated subgroup in a finite rank free group. We give the first fully polynomial algorithm to solve this problem, that is, an algorithm that is polynomial both in the length of the input word and in the rank of the free group. Earlier algorithms had an exponential dependency in the rank of the free group. It follows that the primitivity problem -- to decide whether a word is an element of some basis of the free group -- and the free factor problem can also be solved in polynomial time. 
Abd\'o Roig, Enric Ventura, Pascal Weil