<p>A permutation <span class="SimpleMath">\(\pi=\pi_{1} \ldots \pi_{n}\)</span> has rank encoding <span class="SimpleMath">\(p_{1} \ldots p_{n}\)</span> where <span class="SimpleMath">\( p_{i}= |\{j : j \geq i, \pi_{j} \leq \pi_{i} \} | \)</span>. In other words the rank encoded permutation is a sequence of <span class="SimpleMath">\(p_{i}\)</span> with <span class="SimpleMath">\(1\leq i\leq n\)</span>, where <span class="SimpleMath">\(p_{i}\)</span> is the rank of <span class="SimpleMath">\(\pi_{i}\)</span> in <span class="SimpleMath">\(\{\pi_{i},\pi_{i+1},\ldots ,\pi_{n}\}\)</span>. <a href="chapBib_mj.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} \ldots p_{n}\)</span> and using the reverse process will lead to the permutation <span class="SimpleMath">\(\pi=\pi_{1} \ldots \pi_{n}\)</span>, where <span class="SimpleMath">\(\pi_{i}\)</span> is determined by finding the number that has rank <span class="SimpleMath">\(p_{i}\)</span> in <span class="SimpleMath">\(\{\pi_{i}, \pi_{i+1}, \ldots , \pi_{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.