text5-7.htm
来自「浙江大学计算机学院数据结构课程的教学课件」· HTM 代码 · 共 52 行
HTM
52 行
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body bgcolor="#FFFFFF" link="#0000FF" vlink="#3399FF" alink="#FF0066">
<div id="Layer1" style="position:absolute; width:711px; height:21px; z-index:1; top: 10px; background-color: #CCCCCC; layer-background-color: #CCCCCC; border: 1px none #000000; left: 26px"><b>|</b><font face="宋体" size="2"><a href="../text1/text1-0.htm">第一章</a></font><b>|</b><font face="宋体" size="2"><a href="../text2/text2-0.htm">第二章</a></font><b>|</b><font face="宋体" size="2"><a href="../text3/text3-0.htm">第三章</a></font><b>|</b><font face="宋体" size="2"><a href="../text4/text4-0.htm">第四章</a></font><b>|</b><font face="宋体" size="2">第五章</font><b>|</b><font face="宋体" size="2"><a href="../text6/text6-0.htm">第六章</a></font><b>|</b><font face="宋体" size="2"><a href="../text7/text7-0.htm">第七章</a></font><b>|</b><font face="宋体" size="2"><a href="../text8/text8-0.htm">第八章</a></font><b>|</b><font face="宋体" size="2"><a href="../text9/text9-0.htm">第九章</a></font><b>|</b><font face="宋体" size="2"><a href="../text10/text10-0.htm">第十章</a></font><b>|</b><font size="2" face="宋体"><a href="../textA/textA-0.htm">算法分析</a><b><font color="#000000">|</font></b>
</font></div>
<pre align="left">
<b><font face="Arial, Helvetica, sans-serif" size="4" color="#FF0000">2) The property of Binary Trees
</font><font face="Arial, Helvetica, sans-serif" size="4" color="#000000">
〖<font color="#0033CC">Lemma5.1</font>〗Maximum number Of nodes:
(1) The Maximum number of nodes on level i of a binary
tree is <img src="IMAGE/2i-1.gif" width="102" height="29" vspace="0" align="bottom">
(2) The Maximum number of nodes in a binary tree of
depth k is <img src="IMAGE/2k-1.gif" width="114" height="29" align="bottom">
<font color="#FF0000">Proof:</font>
(1) The proof is by induction on i
<i><font color="#0033CC">induction base: </font></i>
i = 1(root) max_num ( on level 1) = <img src="IMAGE/2i-10.gif" width="136" height="23">
<font color="#0033CC"><i>induction hypotheses</i>:</font>
For all j, 1<= j < i, max_num ( on level j ) = <img src="IMAGE/2j-1.gif" width="45" height="30" align="bottom">
<font color="#0033CC"><i>induction step</i></font><i><font face="Arial, Helvetica, sans-serif" size="4">:</font></i>
Since each node in a binary tree has a maximum degree of 2,
max_num (on level i) = max_num(on level i -1)*2= <img src="IMAGE/2i-2.gif" width="153" height="30">
(2) The maximum number of nodes in a binary tree of depth k is: </font></b></pre>
<table width="682" border="0" cellspacing="0" hspace="20">
<tr>
<td width="34"><img src="IMAGE/text5-h.gif" width="27" height="64"></td>
<td width="447"><b><font face="Arial, Helvetica, sans-serif" size="4" color="#000000">(maximum
number of nodes on level i ) =</font></b></td>
<td width="195"><b><font face="Arial, Helvetica, sans-serif" size="4" color="#000000"><img src="IMAGE/text5-i.gif" width="143" height="64"></font></b></td>
</tr>
</table>
<p> </p>
<table width="731" cellspacing="0" cellpadding="0">
<tr>
<td width="327"> </td>
<td width="271"><a href="../index.htm"><img width="60" height="25" usemap="#MapMap4" border="0" src="../../images/home.gif"></a><a href="../index.htm"><map name="MapMap4"><area shape="rect" coords="42,-34,88,-15" href="text0.htm"><area shape="rect" coords="4,4,55,23" href="text5-index.htm"></map></a></td>
<td width="131"><font face="楷体_GB2312" size="2"><b><a href="text5-6.htm">上一页</a>
<a href="text5-8.htm">下一页</a> </b></font></td>
</tr>
</table>
<p> </p>
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?