<p>A permutation <span class="SimpleMath">π=π_1 ... π_n</span> has rank encoding <span class="SimpleMath">p_1 ... p_n</span> where <span class="SimpleMath">p_i= |{j : j ≥ i, π_j ≤ π_i } |</span>. In other words the rank encoded permutation is a sequence of <span class="SimpleMath">p_i</span> with <span class="SimpleMath">1≤ i≤ n</span>, where <span class="SimpleMath">p_i</span> is the rank of <span class="SimpleMath">π_i</span> in <span class="SimpleMath">{π_i,π_i+1,... ,π_n}</span>. <a href="chapBib.html#biBRegCloSetPerms">[AAR03]</a></p>
<p>The encoding of the permutation 3 2 5 1 6 7 4 8 9 is done as follows:</p>
<p>Decoding a permutation is done in a similar fashion, taking the sequence <span class="SimpleMath">p_1 ... p_n</span> and using the reverse process will lead to the permutation <span class="SimpleMath">π=π_1 ... π_n</span>, where <span class="SimpleMath">π_i</span> is determined by finding the number that has rank <span class="SimpleMath">p_i</span> in <span class="SimpleMath">{π_i, π_i+1, ... , π_n}</span>.</p>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ RankEncoding</code>( <var class="Arg">p</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns: A list that represents the rank encoding of the permutation <code class="code">p</code>.</p>
<p>Using the algorithm above <code class="code">RankEncoding</code> turns the permutation <code class="code">p</code> into a list of integers.</p>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ RankDecoding</code>( <var class="Arg">e</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns: A permutation in list form.</p>
<p>A rank encoded permutation is decoded by using the reversed process from encoding, which is also explained above.</p>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ SequencesToRatExp</code>( <var class="Arg">list</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns: A rational expression that describes all the words in <code class="code">list</code>.</p>
<p>A list of sequences is turned into a rational expression by concatenating each sequence and unifying all of them.</p>
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.