- ...monotonicity
-
Don't worry if you don't know what that means.
Essentially it says that Python's new-style classes ``do the right thing.''
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ...102#102.
-
The notation 103#103 denotes the
floor function ,
which is defined as follows:
For any real number x, 104#104 is the
greatest integer less than or equal to x.
While we are on the subject,
there is a related function,
the ceiling function ,
written 105#105.
For any real number x, 106#106 is the
smallest integer greater than or equal to x.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ...119#119.
-
In fact, we would normally write 120#120,
but we have not yet seen the 1#1 notation which is introduced
in Chapter
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ...rule
-
Guillaume François Antoine de L'Hôpital,
marquis de Sainte-Mesme,
is known for his rule for computing limits which states that
if 357#357
and 358#358, then
359#359
where f'(n) and g'(n) are the
first derivatives with respect to n of
f(n) and g(n), respectively.
The rule is also effective
if 360#360
and 361#361.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ...commensurate.
-
Functions which are commensurate
are functions which can be compared one with the other.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ...436#436.
-
This notion of the looseness (tightness )
of an asymptotic bound is related to
but not exactly the same as that given in Definition
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ...numbers.
-
Fibonacci numbers are named in honor of
Leonardo Pisano (Leonardo of Pisa),
the son of Bonaccio (in Latin, Filius Bonaccii),
who discovered the series in 1202.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ...numbers.
-
These running times were measured on an Intel Pentium III,
which has a 1 GHz clock and 256MB RAM
under the Red Hat Linux 7.1 operating system.
The programs were executed using the Python version 2.2.3 interpreter.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ...object
-
Strictly speaking,
this is true only for the so-called
``new-style'' Python classes
which were introduced in Python version 2.2.
Support for the so-called
``classic'' classes ,
which are not ultimately derived from the object class,
is being phased out of the Python language.
In this book we will use only Python new-style classes.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ...class
-
For a complete list of the methods defined
in the __builtin__.object class,
you should consult the
Python Reference Manual[49].
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ...NAME=7372> .
-
The word deque is usually pronounced
like ``deck'' and sometimes like ``deek.''
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ...order
-
A total order is a relation, say <,
defined on a set of elements, say 795#795,
with the following properties:
- For all pairs of elements 796#796,
such that 797#797, exactly one of either i<j or j<i holds.
(All elements are commensurate ).
- For all triples 798#798,
799#799.
(The relation 394#394 is transitive ).
(See also Definition
).
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ...
822#822
-
This is the Swedish word for the number two.
The symbol å
in the Unicode character set
can be represented in a Python program
using the Unicode escape
``u00E5''.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ...
822#822
-
I have been advised that a book with out sex will never be a best seller.
``Sex'' is the Swedish word for the number six.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ...prime
-
Two numbers x and y are
relatively prime
if there is no number other than one
that divides both x and y evenly.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ...i.
- What else would it be?
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ...NAME=14664> .
-
Isomorphic is a fancy word that means
being of identical or similar form or shape or structure.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ...Landis
-
Russian mathematicians G. M. Adel'son-Vel'skiı and E. M. Landis
published this result in 1962.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ...trees.
-
Obviously since B-Trees are M-way trees,
the ``B'' in B-Tree does not stand for binary.
B-Trees were invented by R. Bayer and E. McCright in 1972,
so the ``B'' either stands for balanced
or Bayer-take your pick.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ...HREF="page384.html#exercisepqueuesbinom">
). -
Isaac Newton discovered the binomial theorem in 1676
but did not publish a proof.
Leonhard Euler attempted a proof in 1774.
Karl Friedrich Gauss
produced the first correct proof in 1812.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ...subsets.
-
Stirling numbers of the second kind
are given by the formula
1609#1609
where n>0 and 1610#1610.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ...explicitly
-
Note: The Python del operator does not destroy objects-it removes the binding for a name from a namespace.
That is, del disassociates a name from an object
but leave the object itself intact.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ...structures.
-
Mark-and-sweep garbage collection is described by John McCarthy
in a paper on the LISP language published in 1960.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ...space.
-
The reader may find it instructive to compare
Program
with Program
and Program
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ...space.
-
The reader may find it instructive to compare
Program
with Program
and Program
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ...NAME=33205> .
-
The table is named in honor of Blaise Pascal
who published a treatise on the subject in 1653.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ...number!
-
Prime numbers of the form 1905#1905 are known as
Mersenne primes .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ...1908#1908.
-
For convenience, we use the notation 1909#1909
to denote 1910#1910.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ...NAME=35168> .
-
Unfortunately, the fame of bubble sort exceeds by far its practical value.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ...zero.
-
There is also the symmetrical case in which i is always n-1.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ...(respectively)
-
In this book,
the names of instance attributes typically begin
with an underscore ``_''.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.