<?xml version="1.0" encoding='utf-8'?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<card id="card1" title="Prüfer sequence - Page 3 - Wikipedia">
<p>
<a accesskey="1" href="page.php?w=Prüfer_sequence&amp;p=2">1.Previous</a><br />
<a accesskey="3" href="page.php?w=Pr%C3%BCfer_sequence&amp;p=4">3.Next</a>
</p>
<p>and parallelized.</p>

<p><big>Example</big></p>
<p>Consider the above algorithm run on the tree shown to the right.  Initially, vertex 1 is the leaf with the smallest label, so it is removed first and 4 is put in the Prüfer sequence.  Vertices 2 and 3 are removed next, so 4 is added twice more.  Vertex 4 is now a leaf and has the smallest label, so it is removed and we append 5 to the sequence.  We are left with only two vertices, so we stop.  The tree's sequence is [4,4,4,5].</p>

<p><big>Algorithm to convert a Prüfer sequence into a tree</big></p>
<p>Let</p><p>
<a accesskey="1" href="page.php?w=Prüfer_sequence&amp;p=2">1.Previous</a><br />
<a accesskey="3" href="page.php?w=Pr%C3%BCfer_sequence&amp;p=4">3.Next</a>
</p>

<do type="prev" label="Search">
        <go href="search.wml"/>
</do>

</card>
</wml>
