A permutation of a set is a bijection from the set to itself. For example, if σ is the permutation 17↦3, 2↦1, and 3↦2, and we apply it to the ordered triplet (1,2,3), we get the reordered triplet (3,1,2). Let σ be a permutation of the set {1,...,n}. Let
θk(m)=⎩⎨⎧m+11mform<kform=kform>k
Call a finite sequence {ai}i=1j a disentanglement of σ if θaj∘...∘θaj∘σ is the identity permutation. For example, when σ=(3,2,1), then {2,3} is a disentaglement of σ. Let f(σ) denote the minimum number k such that there is a disentanglement of σ of length k. Let g(n) be the expected value for f(σ) if σ is a random permutation of {1,...,n}. What is g(6)?