page370.html

来自「wqeqwvrw rkjqhwrjwq jkhrjqwhrwq jkhrwq」· HTML 代码 · 共 45 行

HTML
45
字号
<HTML>
<HEAD>
<TITLE>Binomial Queues</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="tex2html6496" HREF="page371.html" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/page371.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="tex2html6494" HREF="page352.html" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/page352.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="tex2html6488" HREF="page369.html" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/page369.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="tex2html6498" 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="tex2html6499" 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="SECTION0012400000000000000000">Binomial Queues</A></H1>
<P>
A binomial queue is a priority queue that is implemented not as a single tree
but as a collection of heap-ordered trees.
A collection of trees is called a <em>forest</em><A NAME=26597>&#160;</A>.
Each of the trees in a binomial queue has a very special shape
called a binomial tree.
Binomial trees are general trees.
I.e., the maximum degree of a node is not fixed.
<P>
The remarkable characteristic of binomial queues is that
the merge operation is similar in structure to binary addition.
I.e., the collection of binomial trees that make up the binomial queue
is like the set of bits that make up the binary representation of a
non-negative integer.
Furthermore, the merging of two binomial queues is done by
adding the binomial trees that make up that queue in the same
way that the bits are combined when adding two binary numbers.
<P>
<BR> <HR>
<UL> 
<LI> <A NAME="tex2html6500" HREF="page371.html#SECTION0012410000000000000000" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/page371.html#SECTION0012410000000000000000">Binomial Trees</A>
<LI> <A NAME="tex2html6501" HREF="page372.html#SECTION0012420000000000000000" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/page372.html#SECTION0012420000000000000000">Binomial Queues</A>
<LI> <A NAME="tex2html6502" HREF="page373.html#SECTION0012430000000000000000" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/page373.html#SECTION0012430000000000000000">Implementation</A>
<LI> <A NAME="tex2html6503" HREF="page379.html#SECTION0012440000000000000000" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/page379.html#SECTION0012440000000000000000">Merging Binomial Queues</A>
<LI> <A NAME="tex2html6504" HREF="page380.html#SECTION0012450000000000000000" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/page380.html#SECTION0012450000000000000000">Putting Items into a Binomial Queue</A>
<LI> <A NAME="tex2html6505" HREF="page381.html#SECTION0012460000000000000000" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/page381.html#SECTION0012460000000000000000">Removing an Item from a Binomial Queue</A>
</UL>
<HR><A NAME="tex2html6496" HREF="page371.html" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/page371.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="tex2html6494" HREF="page352.html" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/page352.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="tex2html6488" HREF="page369.html" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/page369.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="tex2html6498" 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="tex2html6499" 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 &#169; 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 + =
减小字号Ctrl + -
显示快捷键?