<?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="Comparison sort - Page 19 - Wikipedia">
<p>
<a accesskey="1" href="page.php?w=comparison_sort&amp;p=18">1.Previous</a><br />
<a accesskey="3" href="page.php?w=comparison_sort&amp;p=20">3.Next</a>
</p>
<p>most easily seen using concepts from <a href="page.php?w=information_theory">information theory</a>. The <a href="page.php?w=Shannon_entropy">Shannon entropy</a> of such a random permutation is  bits. Since a comparison can give only two results, the maximum amount of information it provides is 1 bit. Therefore, after k comparisons the remaining entropy of the permutation, given the results of those comparisons, is at least  bits on average. To perform the sort, complete information is needed, so the remaining entropy must be 0. It follows that</p><p>
<a accesskey="1" href="page.php?w=comparison_sort&amp;p=18">1.Previous</a><br />
<a accesskey="3" href="page.php?w=comparison_sort&amp;p=20">3.Next</a>
</p>

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

</card>
</wml>
