How can I compute the length of an element of a group, where by "length" I mean the minimum number of generators needed to write the element, assuming that I've fixed a generating set for the group. In particular, I need to do this for the symmetric group using generating set (1,2), (2,3), (3,4), ... (n-1,n) Thanks a lot, -marcus