?? page440.html
字號:
<HTML>
<HEAD>
<TITLE>Algorithmic Patterns and Problem Solvers</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="tex2html7350" HREF="page441.html" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/page441.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="tex2html7348" HREF="book.html" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/book.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="tex2html7342" HREF="page439.html" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/page439.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="tex2html7352" 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="tex2html7353" 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="SECTION0015000000000000000000">Algorithmic Patterns and Problem Solvers</A></H1>
<P>
<A NAME="chapalgorithms"> </A>
<P>
This chapter presents a number of different algorithmic patterns.
Each pattern addresses a category of problems
and describes a core solution strategy for that category.
Given a problem to be solved,
we may find that there are several possible solution strategies.
We may also find that only one strategy applies or even that none of them do.
A good programmer is one who is proficient at examining
the problem to be solved
and identifying the appropriate algorithmic technique to use.
The following algorithmic patterns are discussed in this chapter:
<DL ><DT><STRONG>direct solution strategies</STRONG>
<DD>
Brute force algorithms and greedy algorithms.
<DT><STRONG>backtracking strategies</STRONG>
<DD>
Simple backtracking and branch-and-bound algorithms.
<DT><STRONG>top-down solution strategies</STRONG>
<DD>
Divide-and-conquer algorithms.
<DT><STRONG>bottom-up solution strategies</STRONG>
<DD>
Dynamic programming.
<DT><STRONG>randomized strategies</STRONG>
<DD>
Monte Carlo algorithms and simulated annealing.
<P>
</DL><BR> <HR>
<UL>
<LI> <A NAME="tex2html7354" HREF="page441.html#SECTION0015100000000000000000" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/page441.html#SECTION0015100000000000000000">Brute-Force and Greedy Algorithms</A>
<LI> <A NAME="tex2html7355" HREF="page446.html#SECTION0015200000000000000000" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/page446.html#SECTION0015200000000000000000">Backtracking Algorithms</A>
<LI> <A NAME="tex2html7356" HREF="page455.html#SECTION0015300000000000000000" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/page455.html#SECTION0015300000000000000000">Top-Down Algorithms: Divide-and-Conquer</A>
<LI> <A NAME="tex2html7357" HREF="page465.html#SECTION0015400000000000000000" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/page465.html#SECTION0015400000000000000000">Bottom-Up Algorithms: Dynamic<BR> Programming</A>
<LI> <A NAME="tex2html7358" HREF="page471.html#SECTION0015500000000000000000" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/page471.html#SECTION0015500000000000000000">Randomized Algorithms</A>
<LI> <A NAME="tex2html7359" HREF="page481.html#SECTION0015600000000000000000" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/page481.html#SECTION0015600000000000000000">Exercises</A>
<LI> <A NAME="tex2html7360" HREF="page482.html#SECTION0015700000000000000000" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/page482.html#SECTION0015700000000000000000">Projects</A>
</UL>
<HR><A NAME="tex2html7350" HREF="page441.html" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/page441.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="tex2html7348" HREF="book.html" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/book.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="tex2html7342" HREF="page439.html" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/page439.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="tex2html7352" 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="tex2html7353" 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> <P><ADDRESS>
<img src="bruno.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/icons/bruno.gif" alt="Bruno" align=right>
<a href="javascript:if(confirm('http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/copyright.html \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?'))window.location='http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/copyright.html'" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/copyright.html">Copyright © 1997</a> by <a href="javascript:if(confirm('http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/signature.html \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?'))window.location='http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/signature.html'" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/signature.html">Bruno R. Preiss, P.Eng.</a> All rights reserved.
</ADDRESS>
</BODY>
</HTML>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -