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

📄 page445.html

📁 Data Structures And Algorithms With Object-Oriented Design Patterns In Python (2003) source code and
💻 HTML
字号:
<HTML><HEAD><TITLE>Branch-and-Bound Solvers</TITLE></HEAD><BODY bgcolor="#FFFFFF"> <a href="../index.html" target="_top"><img src="../icons/usins.gif" alt="Logo" align=right></a><b>Data Structures and Algorithms with Object-Oriented Design Patterns in Python</b><br><A NAME="tex2html6298" HREF="page446.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="../icons/next_motif.gif"></A> <A NAME="tex2html6296" HREF="page439.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="../icons/up_motif.gif"></A> <A NAME="tex2html6290" HREF="page444.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="../icons/previous_motif.gif"></A>  <A NAME="tex2html6300" HREF="page611.html"><IMG WIDTH=43 HEIGHT=24 ALIGN=BOTTOM ALT="index" SRC="../icons/index_motif.gif"></A> <BR><HR><H2><A NAME="SECTION0014240000000000000000">Branch-and-Bound Solvers</A></H2><A NAME="secalgsbandb">&#160;</A><P>The depth-first and breadth-first backtracking algorithmsdescribed in the preceding sections bothna&#305;vely traverse the entire solution space.However, sometimes we can determine that a given nodein the solution space does not lead to the optimal solution--either because the given solution and all its successors are infeasibleor because we have already found a solution that is guaranteed to bebetter than any successor of the given solution.In such cases,the given node and its successors need not be considered.In effect,we can <em>prune</em><A NAME=32589>&#160;</A> the solution tree,thereby reducing the number of solutions to be considered.<P>For example, consider the scales balancing problemdescribed in Section&nbsp;<A HREF="page440.html#secalgsscales"><IMG  ALIGN=BOTTOM ALT="gif" SRC="../icons/cross_ref_motif.gif"></A>.Consider a partial solution  <IMG WIDTH=16 HEIGHT=22 ALIGN=MIDDLE ALT="tex2html_wrap_inline67817" SRC="img1734.gif"  > in whichwe have placed <I>k</I> weights onto the pans ( <IMG WIDTH=69 HEIGHT=24 ALIGN=MIDDLE ALT="tex2html_wrap_inline67821" SRC="img1735.gif"  >) and,therefore, <I>n</I>-<I>k</I> weights remain to be placed.The difference between the weights of the left and right pans is given by<P> <IMG WIDTH=352 HEIGHT=47 ALIGN=BOTTOM ALT="displaymath67813" SRC="img1736.gif"  ><P>and the sum of the weights still to be placed is<P> <IMG WIDTH=294 HEIGHT=47 ALIGN=BOTTOM ALT="displaymath67814" SRC="img1737.gif"  ><P><P>Suppose that  <IMG WIDTH=44 HEIGHT=24 ALIGN=MIDDLE ALT="tex2html_wrap_inline67825" SRC="img1738.gif"  >.That is, the total weight remaining is less than the difference betweenthe weights in the two pans.Then, the best possible solution that we can obtainwithout changing the positions of the weights that have already been placed is <IMG WIDTH=75 HEIGHT=34 ALIGN=MIDDLE ALT="tex2html_wrap_inline67827" SRC="img1739.gif"  >The quantity  <IMG WIDTH=9 HEIGHT=17 ALIGN=BOTTOM ALT="tex2html_wrap_inline67829" SRC="img1740.gif"  > is a <em>lower bound</em>on the value of the objective function for all the solutionsin the solution tree below the given partial solution  <IMG WIDTH=16 HEIGHT=22 ALIGN=MIDDLE ALT="tex2html_wrap_inline67817" SRC="img1734.gif"  >.<P>In general, during the traversal of the solution space we mayhave already found a complete, feasible solution for whichthe objective function is <em>less</em> than  <IMG WIDTH=9 HEIGHT=17 ALIGN=BOTTOM ALT="tex2html_wrap_inline67829" SRC="img1740.gif"  >.In that case,there is no point in considering any of the solutions below  <IMG WIDTH=16 HEIGHT=22 ALIGN=MIDDLE ALT="tex2html_wrap_inline67817" SRC="img1734.gif"  >.That is, we can <em>prune</em> the subtree rooted at node  <IMG WIDTH=16 HEIGHT=22 ALIGN=MIDDLE ALT="tex2html_wrap_inline67817" SRC="img1734.gif"  >from the solution tree.A backtracking algorithm that prunes the search space in this manneris called a <em>branch-and-bound</em><A NAME=32604>&#160;</A> algorithm.<P><BR> <HR><UL> <LI> <A NAME="tex2html6301" HREF="page446.html#SECTION0014241000000000000000">Depth-First, Branch-and-Bound Solver</A></UL><HR><A NAME="tex2html6298" HREF="page446.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="../icons/next_motif.gif"></A> <A NAME="tex2html6296" HREF="page439.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="../icons/up_motif.gif"></A> <A NAME="tex2html6290" HREF="page444.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="../icons/previous_motif.gif"></A>  <A NAME="tex2html6300" HREF="page611.html"><IMG WIDTH=43 HEIGHT=24 ALIGN=BOTTOM ALT="index" SRC="../icons/index_motif.gif"></A> <P><ADDRESS><img src="../icons/bruno.gif" alt="Bruno" align=right><a href="../copyright.html">Copyright &#169; 2003</a> by <a href="../signature.html">Bruno R. Preiss, P.Eng.</a>  All rights reserved.</ADDRESS></BODY></HTML>

⌨️ 快捷键说明

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