﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>C++博客-cpp-primer-随笔分类-信息科学</title><link>http://www.cppblog.com/cpp-primer/category/8910.html</link><description /><language>zh-cn</language><lastBuildDate>Sat, 22 Nov 2008 15:10:50 GMT</lastBuildDate><pubDate>Sat, 22 Nov 2008 15:10:50 GMT</pubDate><ttl>60</ttl><item><title>熵</title><link>http://www.cppblog.com/cpp-primer/archive/2008/11/22/67623.html</link><dc:creator>Benson</dc:creator><author>Benson</author><pubDate>Sat, 22 Nov 2008 12:22:00 GMT</pubDate><guid>http://www.cppblog.com/cpp-primer/archive/2008/11/22/67623.html</guid><wfw:comment>http://www.cppblog.com/cpp-primer/comments/67623.html</wfw:comment><comments>http://www.cppblog.com/cpp-primer/archive/2008/11/22/67623.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/cpp-primer/comments/commentRss/67623.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/cpp-primer/services/trackbacks/67623.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;熵的概念最先在1864年首先由鲁道夫&#183;克劳修斯提出，并应用在热力学中。后来在1948年由克劳德&#183;艾尔伍德&#183;香农第一次引入到信息论中来。<br>
<p>熵在信息论的定义如下：<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;如果有一个系统S内存在多个事件S = {E<sub>1</sub>,...,E<sub>n</sub>}, 每个事件的概率分布 P = {p<sub>1</sub>, ..., p<sub>n</sub>}，则每个事件本身的信息为</p>
<center><span class=texhtml><em>I</em><sub><em>e</em></sub> = &#8722; log<sub>2</sub><em>p</em><sub><em>i</em></sub></span></center>
<p>（对数以2为底，单位是比特(<a title=Bit href="http://zh.wikipedia.org/w/index.php?title=Bit&amp;variant=zh-cn">bit</a>)）</p>
<center><span class=texhtml><em>I</em><sub><em>e</em></sub> = &#8722; ln<em>p</em><sub><em>i</em></sub></span></center>
<p>（对数以e为底，单位是纳特/nats）</p>
<p>如英语有26个字母，假如每个字母在文章中出现次数平均的话，每个字母的信息量为</p>
<center><img height=43 alt="" src="http://www.cppblog.com/images/cppblog_com/cpp-primer/熵/1.png" width=177 border=0></center>
<p>而汉字常用的有2500个，假如每个汉字在文章中出现次数平均的话，每个汉字的信息量为</p>
<center><img height=43 alt="" src="http://www.cppblog.com/images/cppblog_com/cpp-primer/熵/2.png" width=205 border=0></center>
<p><br>整个系统的平均信息量为</p>
<center><img height=50 alt="" src="http://www.cppblog.com/images/cppblog_com/cpp-primer/熵/3.png" width=255 border=0></center>
<p>这个平均信息量就是信息熵。因为和热力学中描述热力学熵的玻耳兹曼公式形式一样，所以也称为&#8220;熵&#8221;。</p>
<p>如果两个系统具有同样大的信息量，如一篇用不同文字写的同一文章，由于是所有元素信息量的加和，那么中文文章应用的汉字就比英文文章使用的字母要少。所以汉字印刷的文章要比其他应用总体数量少的字母印刷的文章要短。即使一个汉字占用两个字母的空间，汉字印刷的文章也要比英文字母印刷的用纸少。实际上每个字母和每个汉字在文章中出现的次数并不平均，因此实际数值并不如同上述，但上述计算是一个总体概念。使用书写单元越多的文字，每个单元所包含的信息量越大。</p>
<ol>
    <li>熵均大于等于零，即，<img height=20 alt="" src="http://www.cppblog.com/images/cppblog_com/cpp-primer/熵/4.png" width=63 border=0>。
    <li>设N是系统S内的事件总数，则熵<img height=22 alt="" src="http://www.cppblog.com/images/cppblog_com/cpp-primer/熵/5.png" width=105 border=0>。当且仅当p1=p2=...=pn时，等号成立，此时系统S的熵最大。
    <li>联合熵：<img height=20 alt="" src="http://www.cppblog.com/images/cppblog_com/cpp-primer/熵/6.png" width=221 border=0>，当且仅当X，Y在统计学上相互独立时等号成立。
    <li>条件熵：<img height=23 alt="" src="http://www.cppblog.com/images/cppblog_com/cpp-primer/熵/7.png" width=327 border=0>，当且仅当X，Y在统计学上相互独立时等号成立。 </li>
</ol>
<img src ="http://www.cppblog.com/cpp-primer/aggbug/67623.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/cpp-primer/" target="_blank">Benson</a> 2008-11-22 20:22 <a href="http://www.cppblog.com/cpp-primer/archive/2008/11/22/67623.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>