Here is how one can do that in Maple - very similar to Fred W. Helenius' solution using GAP.
with(group):
pg:=permgroup(8,{s1=[[5,7],[6,8]],s2=[[5,6],[7,8]],s3=[[3,4]],s4=[[3,7 ],[4,8]],s5=[[2,6],[4,8]],s6=[[2,4],[6,8]],s7=[[7,8]],s8=[[6,8]],s9=[[ 4,8]]}):
grouporder(pg); 5040
groupmember([[2,3,4,5,6,7,8]],pg);
true Maple's library doesn't include a procedure for a decomposition of a group element into a product of generators. For this case, with generators of order 2, the following procedure works,
dec := proc(e, g) local i, x, v, w; w := op(2, g); while not member(e, map(rhs, w)) do v := {}; for i in op(2, g) do v := v union map(x -> cat(lhs(i), lhs(x)) = group:-mulperms(rhs(i), rhs(x)), w) end do; w := w union v end do; select(x -> rhs(x) = e, w) end proc:
dec([[2,3,4,5,6,7,8]],pg);
{s9s6s3s2 = [[2, 3, 4, 5, 6, 7, 8]], s9s6s2s3 = [[2, 3, 4, 5, 6, 7, 8]]} The same as in GAP, the composition of permutations in Maple is defined from left to right. Check the result,
`&*`:=mulperms:
assign(op(2,pg));
s9&*s6&*s2&*s3; [[2, 3, 4, 5, 6, 7, 8]] s9&*s6&*s3&*s2; [[2, 3, 4, 5, 6, 7, 8]]
It is interesting that Maple found shorter decompositions than GAP,
s9&*s2&*s1&*s6&*s3; [[2, 3, 4, 5, 6, 7, 8]]
Alec Mihailovs http://webpages.shepherd.edu/amihailo/