⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 page77.html

📁 wqeqwvrw rkjqhwrjwq jkhrjqwhrwq jkhrwq
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<HTML>
<HEAD>
<TITLE>Exercises</TITLE>
</HEAD>
<BODY bgcolor="#FFFFFF">
 <img src="cover75.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/icons/cover75.gif" alt="Logo" align=right>
<b>Data Structures and Algorithms 
with Object-Oriented Design Patterns in C++</b><br>
<A NAME="tex2html2847" HREF="page78.html" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/page78.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="next_motif.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/icons/next_motif.gif"></A> <A NAME="tex2html2845" HREF="page56.html" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/page56.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="up_motif.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/icons/up_motif.gif"></A> <A NAME="tex2html2839" HREF="page76.html" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/page76.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="previous_motif.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/icons/previous_motif.gif"></A> <A NAME="tex2html2849" HREF="page9.html" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/page9.html"><IMG WIDTH=65 HEIGHT=24 ALIGN=BOTTOM ALT="contents" SRC="contents_motif.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/icons/contents_motif.gif"></A> <A NAME="tex2html2850" HREF="page620.html" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/page620.html"><IMG WIDTH=43 HEIGHT=24 ALIGN=BOTTOM ALT="index" SRC="index_motif.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/icons/index_motif.gif"></A> <BR><HR>
<H1><A NAME="SECTION004500000000000000000">Exercises</A></H1>
<P>
<OL><LI>
	Consider the function  <IMG WIDTH=133 HEIGHT=25 ALIGN=MIDDLE ALT="tex2html_wrap_inline60763" SRC="img549.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/img549.gif"  >.
	Using Definition&nbsp;<A HREF="page57.html#defnbigoh" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/page57.html#defnbigoh"><IMG  ALIGN=BOTTOM ALT="gif" SRC="cross_ref_motif.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/icons/cross_ref_motif.gif"></A> show that  <IMG WIDTH=92 HEIGHT=25 ALIGN=MIDDLE ALT="tex2html_wrap_inline59085" SRC="img244.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/img244.gif"  >.<LI>
	Consider the function  <IMG WIDTH=133 HEIGHT=25 ALIGN=MIDDLE ALT="tex2html_wrap_inline60763" SRC="img549.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/img549.gif"  >.
	Using Definition&nbsp;<A HREF="page66.html#defnomega" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/page66.html#defnomega"><IMG  ALIGN=BOTTOM ALT="gif" SRC="cross_ref_motif.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/icons/cross_ref_motif.gif"></A> show that  <IMG WIDTH=92 HEIGHT=25 ALIGN=MIDDLE ALT="tex2html_wrap_inline59939" SRC="img411.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/img411.gif"  >.<LI>
	Consider the functions  <IMG WIDTH=133 HEIGHT=25 ALIGN=MIDDLE ALT="tex2html_wrap_inline60763" SRC="img549.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/img549.gif"  > and  <IMG WIDTH=123 HEIGHT=24 ALIGN=MIDDLE ALT="tex2html_wrap_inline60773" SRC="img550.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/img550.gif"  >.
	Using Theorem&nbsp;<A HREF="page60.html#theoremii" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/page60.html#theoremii"><IMG  ALIGN=BOTTOM ALT="gif" SRC="cross_ref_motif.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/icons/cross_ref_motif.gif"></A> show that  <IMG WIDTH=142 HEIGHT=25 ALIGN=MIDDLE ALT="tex2html_wrap_inline60775" SRC="img551.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/img551.gif"  >.<LI>
	Consider the functions  <IMG WIDTH=75 HEIGHT=26 ALIGN=MIDDLE ALT="tex2html_wrap_inline60777" SRC="img552.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/img552.gif"  > and  <IMG WIDTH=84 HEIGHT=24 ALIGN=MIDDLE ALT="tex2html_wrap_inline60779" SRC="img553.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/img553.gif"  >.
	Using Theorem&nbsp;<A HREF="page60.html#theoremii" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/page60.html#theoremii"><IMG  ALIGN=BOTTOM ALT="gif" SRC="cross_ref_motif.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/icons/cross_ref_motif.gif"></A> show that  <IMG WIDTH=148 HEIGHT=26 ALIGN=MIDDLE ALT="tex2html_wrap_inline60781" SRC="img554.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/img554.gif"  >.<LI>
	For each pair of functions, <I>f</I>(<I>n</I>) and <I>g</I>(<I>n</I>),
	in the following table,
	indicate if <I>f</I>(<I>n</I>)=<I>O</I>(<I>g</I>(<I>n</I>)) and if <I>g</I>(<I>n</I>)=<I>O</I>(<I>f</I>(<I>n</I>)).
	<DIV ALIGN=CENTER><P ALIGN=CENTER><TABLE COLS=2 BORDER FRAME=HSIDES RULES=GROUPS>
<COL ALIGN=CENTER><COL ALIGN=CENTER>
<TBODY>
<TR><TD VALIGN=BASELINE ALIGN=CENTER NOWRAP>
		<I>f</I>(<I>n</I>) </TD><TD VALIGN=BASELINE ALIGN=CENTER NOWRAP> <I>g</I>(<I>n</I>) </TD></TR>
</TBODY><TBODY>
<TR><TD VALIGN=BASELINE ALIGN=CENTER NOWRAP>10<I>n</I> </TD><TD VALIGN=BASELINE ALIGN=CENTER NOWRAP>  <IMG WIDTH=62 HEIGHT=24 ALIGN=MIDDLE ALT="tex2html_wrap_inline60797" SRC="img555.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/img555.gif"  > </TD></TR>
<TR><TD VALIGN=BASELINE ALIGN=CENTER NOWRAP> 
		 <IMG WIDTH=16 HEIGHT=12 ALIGN=BOTTOM ALT="tex2html_wrap_inline60799" SRC="img556.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/img556.gif"  > </TD><TD VALIGN=BASELINE ALIGN=CENTER NOWRAP>  <IMG WIDTH=52 HEIGHT=26 ALIGN=MIDDLE ALT="tex2html_wrap_inline60801" SRC="img557.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/img557.gif"  > </TD></TR>
<TR><TD VALIGN=BASELINE ALIGN=CENTER NOWRAP> 
		 <IMG WIDTH=44 HEIGHT=24 ALIGN=MIDDLE ALT="tex2html_wrap_inline60803" SRC="img558.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/img558.gif"  > </TD><TD VALIGN=BASELINE ALIGN=CENTER NOWRAP>  <IMG WIDTH=62 HEIGHT=24 ALIGN=MIDDLE ALT="tex2html_wrap_inline60805" SRC="img559.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/img559.gif"  > </TD></TR>
<TR><TD VALIGN=BASELINE ALIGN=CENTER NOWRAP> 
		 <IMG WIDTH=33 HEIGHT=24 ALIGN=MIDDLE ALT="tex2html_wrap_inline59565" SRC="img353.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/img353.gif"  > </TD><TD VALIGN=BASELINE ALIGN=CENTER NOWRAP>  <IMG WIDTH=22 HEIGHT=27 ALIGN=MIDDLE ALT="tex2html_wrap_inline60809" SRC="img560.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/img560.gif"  > </TD></TR>
<TR><TD VALIGN=BASELINE ALIGN=CENTER NOWRAP> 
		 <IMG WIDTH=26 HEIGHT=11 ALIGN=BOTTOM ALT="tex2html_wrap_inline58535" SRC="img113.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/img113.gif"  > </TD><TD VALIGN=BASELINE ALIGN=CENTER NOWRAP>  <IMG WIDTH=33 HEIGHT=24 ALIGN=MIDDLE ALT="tex2html_wrap_inline59565" SRC="img353.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/img353.gif"  > </TD></TR>
<TR><TD VALIGN=BASELINE ALIGN=CENTER NOWRAP> 
		 <IMG WIDTH=69 HEIGHT=24 ALIGN=MIDDLE ALT="tex2html_wrap_inline60815" SRC="img561.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/img561.gif"  > </TD><TD VALIGN=BASELINE ALIGN=CENTER NOWRAP>  <IMG WIDTH=33 HEIGHT=24 ALIGN=MIDDLE ALT="tex2html_wrap_inline59565" SRC="img353.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/img353.gif"  > </TD></TR>
<TR><TD VALIGN=BASELINE ALIGN=CENTER NOWRAP> 
		 <IMG WIDTH=55 HEIGHT=24 ALIGN=MIDDLE ALT="tex2html_wrap_inline60819" SRC="img562.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/img562.gif"  > </TD><TD VALIGN=BASELINE ALIGN=CENTER NOWRAP>  <IMG WIDTH=33 HEIGHT=24 ALIGN=MIDDLE ALT="tex2html_wrap_inline59565" SRC="img353.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/img353.gif"  > </TD></TR>
<TR><TD VALIGN=BASELINE ALIGN=CENTER NOWRAP> 
		 <IMG WIDTH=14 HEIGHT=11 ALIGN=BOTTOM ALT="tex2html_wrap_inline60823" SRC="img563.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/img563.gif"  > </TD><TD VALIGN=BASELINE ALIGN=CENTER NOWRAP>  <IMG WIDTH=21 HEIGHT=12 ALIGN=BOTTOM ALT="tex2html_wrap_inline60825" SRC="img564.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/img564.gif"  > </TD></TR>
<TR><TD VALIGN=BASELINE ALIGN=CENTER NOWRAP> 
		 <IMG WIDTH=20 HEIGHT=10 ALIGN=BOTTOM ALT="tex2html_wrap_inline60021" SRC="img418.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/img418.gif"  > </TD><TD VALIGN=BASELINE ALIGN=CENTER NOWRAP>  <IMG WIDTH=20 HEIGHT=10 ALIGN=BOTTOM ALT="tex2html_wrap_inline60829" SRC="img565.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/img565.gif"  > </TD></TR>
<TR><TD VALIGN=BASELINE ALIGN=CENTER NOWRAP> 
		 <IMG WIDTH=68 HEIGHT=24 ALIGN=MIDDLE ALT="tex2html_wrap_inline60831" SRC="img566.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/img566.gif"  > </TD><TD VALIGN=BASELINE ALIGN=CENTER NOWRAP>  <IMG WIDTH=68 HEIGHT=24 ALIGN=MIDDLE ALT="tex2html_wrap_inline60833" SRC="img567.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/img567.gif"  > </TD></TR>
<TR><TD VALIGN=BASELINE ALIGN=CENTER NOWRAP> 
		 <IMG WIDTH=16 HEIGHT=12 ALIGN=BOTTOM ALT="tex2html_wrap_inline60835" SRC="img568.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/img568.gif"  > </TD><TD VALIGN=BASELINE ALIGN=CENTER NOWRAP>  <IMG WIDTH=63 HEIGHT=25 ALIGN=MIDDLE ALT="tex2html_wrap_inline60837" SRC="img569.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/img569.gif"  > </TD></TR>
</TBODY>
</TABLE>
</P></DIV><LI><A NAME="exerciseasymptoticfib">&#160;</A>
	Show that the Fibonacci numbers (see Equation&nbsp;<A HREF="page73.html#eqnasymptoticfibonacci" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/page73.html#eqnasymptoticfibonacci"><IMG  ALIGN=BOTTOM ALT="gif" SRC="cross_ref_motif.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/icons/cross_ref_motif.gif"></A>)
	satisfy the identities
	<P> <IMG WIDTH=173 HEIGHT=43 ALIGN=BOTTOM ALT="gather2331" SRC="img570.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/img570.gif"  ><P>
	for  <IMG WIDTH=38 HEIGHT=25 ALIGN=MIDDLE ALT="tex2html_wrap_inline59533" SRC="img344.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/img344.gif"  >.<LI>
	Prove each of the following formulas:
	<OL><LI>  <IMG WIDTH=92 HEIGHT=50 ALIGN=MIDDLE ALT="tex2html_wrap_inline60841" SRC="img571.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/img571.gif"  ><LI>  <IMG WIDTH=99 HEIGHT=50 ALIGN=MIDDLE ALT="tex2html_wrap_inline60843" SRC="img572.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/img572.gif"  ><LI>  <IMG WIDTH=100 HEIGHT=50 ALIGN=MIDDLE ALT="tex2html_wrap_inline60845" SRC="img573.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/img573.gif"  ></OL><LI>
	Show that  <IMG WIDTH=107 HEIGHT=27 ALIGN=MIDDLE ALT="tex2html_wrap_inline60847" SRC="img574.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/img574.gif"  >,
	where  <IMG WIDTH=65 HEIGHT=25 ALIGN=MIDDLE ALT="tex2html_wrap_inline58953" SRC="img219.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/img219.gif"  > and  <IMG WIDTH=38 HEIGHT=25 ALIGN=MIDDLE ALT="tex2html_wrap_inline59063" SRC="img241.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/img241.gif"  >.<LI>
	Show that  <IMG WIDTH=128 HEIGHT=27 ALIGN=MIDDLE ALT="tex2html_wrap_inline60853" SRC="img575.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/img575.gif"  >.<LI>
	Solve each of the following recurrences:
	<OL><LI>
		 <IMG WIDTH=307 HEIGHT=56 ALIGN=MIDDLE ALT="tex2html_wrap_inline60855" SRC="img576.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/img576.gif"  ><LI>
		 <IMG WIDTH=309 HEIGHT=56 ALIGN=MIDDLE ALT="tex2html_wrap_inline60857" SRC="img577.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/img577.gif"  ><LI>
		 <IMG WIDTH=310 HEIGHT=56 ALIGN=MIDDLE ALT="tex2html_wrap_inline60859" SRC="img578.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/img578.gif"  ><LI>
		 <IMG WIDTH=312 HEIGHT=56 ALIGN=MIDDLE ALT="tex2html_wrap_inline60861" SRC="img579.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/img579.gif"  ></OL><LI>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -