><dl>
<dt><u>Function:</u> <b>perm_length</b><i> (<var>p</var>)</i>
<a name="IDX1473"></a>
</dt>
<dd><p>Determines the minimum number of adjacent transpositions necessary to
write permutation <var>p</var> as a product of adjacent transpositions. An
adjacent transposition is a cycle with only two numbers, which are
consecutive integers.
</p>
<p>See also <code><a href="#perm_005fdecomp">perm_decomp</a></code>.
</p>
<p>Example:
</p>
<pre class="example">(%i1) load(&quot;combinatorics&quot;)$
(%i2) perm_length 