Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Let $\mathit{PERM\text{-}POWER} = \{ \langle p, q, t\rangle \mid p = q^t \}$ where $p$ and $q$ are permutations on $\{1, \ldots, k\}$ and $t$ is a binary integer. How do I prove that $\mathit{PERM\text{-}POWER}$ is in P?

share|improve this question
add comment

1 Answer 1

Computing the $t$th power of a permutation is as simple as writing the permutation as a product of disjoint cycles (clearly doable in polynomial time), computing the $t$ modulo each cycle length (also clearly polynomial in the length of $t$, say by grade-school division bit for bit), and iterating each cycle remainder number of times (polynomial even if you don't try to be smart about it, because the remainder will be smaller than $k$, so there are $O(k^2)$ operations even for naive iteration). Finally compose the iterated cycles (again using $O(k^2)$ operations when doing it naively).

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.