This post is not a review or anything (here’s an image of the back cover with some reviews). Below are just fragments of what I’ve read so far and found fascinating. You could also consider this my attempt at trying to persuade you to get a copy of this beautiful little book! Sadly, new copies appear not to be available at most online bookstores, so it might be hard to get one.
Prof. de Bruijn, his cycles, and average height of trees
This book is by the same Prof. de Bruijn well-known, among other things, for his cycles, which are defined as following: An -ary de Bruijn cycle is a sequence of radix- digits such that every combinations of digits occurs consecutively in the cycle. For example, one possible binary de Bruijn cycle of length is:
Treating this sequence as a cycle, notice that each of the 16 possible 4-bit patterns (0000 … 1111) appear exactly once in it. Knuth describes at least three interesting algorithms for generating such cycles in TAOCP Section 126.96.36.199 (printed in Volume 4, Fascicle 2 and downloadable as pre-fascicle 2a).
There’s surely lots to say about Prof. de Bruijn’s work (including his cycles), but I’ll reserve them for future posts. Take a look, for example, at the index of TAOCP Vol I (perhaps also in other volumes) and you’ll see references to many of his results, sometimes framed as exercises. And if you enjoy asymptotic calculations and analyses of algorithms, you would find it interesting to read his co-authored paper (with Knuth and Rice) where it is shown that the average height of planted plane trees is:
This is also TAOCP Ex. 2.3.1–11, where the question is posed in terms of the average value of the maximum stack size consumed while running the usual in-order binary tree traversal, assuming all binary trees with n nodes are equally probable.
As an interesting note, Knuth in his musings on The Joy of Asymptotics (30 May 2000) said:
I’ve dedicated this book [Selected Papers on Analysis of Algorithms] to Prof. de Bruijn … in the Netherlands because he has been my guru … Ever since I got my PhD, I considered him my post-graduate doctoral advisor. Every time I had a problem that I got stuck on, I would write to him, and he would write me back a letter that would help me get unstuck. And that’s been going on for over fourty years now. So I dedicated this book to him. And what I want to talk to you about today is one of the things he has spent most of his life on — asymptotic methods.
By the way, that paper deriving the cool formula for the height of trees is included in these Selected Papers (Ch. 15).
The Book: A Pragmatic Exposition
I had got myself a copy of this book several years ago after first reading about it in the section on asymptotic calculations in TAOCP (Sec 188.8.131.52). But unfortunately, the book suffered the same fate as countless others — it just kept resting on my bookshelf. But a few days ago, I decided to give it a try.
A brief history. As described in its preface, this book grew out of lectures given in 1954–55 and was first published in 1958. The Dover edition I have is a reprint of the third edition from 1970.
Most computer programmers are familiar with the Big-O notation, or the Bachmann-Landau notation, for analyzing space/time-complexity of an algorithm. Among other things, this book talks of the tricks involved in getting precise asymptotic bounds once we have reduced the problem at hand to, say, a sum or an integral.
This is a pragmatic book — its focus is on demonstrating general techniques by working out several examples in detail (sometimes in more than one way) rather than expounding highly generalized theories of analysis. In this context, I found these lines from the preface reassuring:
Usually in mathematics one has to choose between saying more and more about less and less on the one hand, and saying less and less about more and more on the other. In a practical subject like this, however, the proper attitude should be to say as much as possible in a given situation.
From my reading, at certain places it, of necessity, assumes a basic knowledge of analysis and complex variable theory. Other than that, it is a fairly elementary treatment. (Note: as Feynman made a quip in one of his lectures, “Elementary” means that very little is required to know ahead of time in order to understand it, except to have an infinite amount of intelligence.”)
It’s a small book (200 pages) with very few exercises and so can be read in about two weeks, if you read an hour a day. And since there are lots of cliff-hanging moments (well, to the extent a book on analysis can have!) and the reader is left wondering how a tricky sum/integral would be tamed, your might be compelled to finish it even sooner!
de Bruijn has a good sense of humor too. At the start of the first chapter, when trying to answer the question “What is Asymptotics?”, he says:
The safest and not the vaguest definition is the following one: Asymptotics is that part of analysis which considers problems of the type dealt with in this book.
Didn’t see that one coming!
And while the book is tiny, it covers lots of tricks & techniques. So, to give my interested readers a taste, I’ve picked a couple of my favorite from the first chapter. All examples are de Bruijn’s.
Uniformity of estimates is this little thing that keeps popping up every so often when analyzing the asymptotics of some characteristic of an algorithm. But it is rarely explained what it means or why uniformity is crucial to the application at hand. Grown up boys and girls are supposed to know what uniformity is, I suppose.
Before looking at uniformity, let’s recap the definition of the -notation. We say:
to mean the existence of numbers and such that:
The thing to note in this definition is that the -notation implies two implicit constants, and .
Returning to the question of uniformity, suppose is a positive integer and and are arbitrary functions. Then:
Rewriting the last line as: , we see that the implicit “constants” and depend on the parameter . We call such an estimate non-uniform.
On the other hand, in the asymptotic relation (with again being a positive integer):
the implicit constant in the -notation is independent of k, since we have
Hence if we write , with , we can choose to be 1. In such a case — when the hidden constants in the -notation do not depend on the parameter — the estimate is called uniform. This requirement is much like that of uniform convergence or uniform continuity in analysis.
So why trouble oneself with uniformity? Here’s one case where uniform estimates prove helpful: In “balancing” the asymptotic terms of a sum evenly to achieve a tight bound.
For instance, if we have somehow shown that with and where is a parameter. If the formula holds uniformly, we can get a tight bound by reasoning as follows: When is small, the first part, , is small, but the second part, , is large; the reverse holds if is large. Hence we wish to find a “balance” that minimizes the sum of the terms. And this happens when both the terms are asymptotically equivalent. So to achieve such a balance, we simply equate the two expressions , giving , and we finally get .
Notice that because of uniformity, the four hidden constants (, , , ) of the two do not vary when we vary the parameter . If the two original estimates had not been uniform; that is, had their hidden constants (implied by the -notation) varied with , we wouldn’t have been able to apply this simplistic “balancing” idea. For instance, while for small , the term might have been small, the hidden constant in might have grown, leading to unpredictable overall behavior.
The good thing about uniform estimates is that they are sometimes more useful; but proving uniformity might require a more careful analysis.
Asymptotic Series and Convergence: Some Curious Facts
An asymptotic series or asymptotic expansion for a function is a formula like:
where, as ,
That is, the asymptotic expansion for is a series of functions such that if we truncate the series at the th term, the partial series provides an approximation to (as ) with the error term asymptotically bound by the first truncated function. The Euler-Maclaurin formula is one way to get such an expansion. de Bruijn mentions other techniques in the book.
A large class of examples of asymptotic expansions are convergent power series, like:
But there could be asymptotic expansions that are not convergent power series. And with such asymptotic expansions, some curious things can happen:
- The series of the asymptotic expansion need not be convergent.
- If the series does converge, its sum need not be equal to
- It is even possible to have and ‘s such that the sum of the series does not have the series as its own asymptotic expansion!
The essential reason for these seemingly strange facts, as de Bruijn explains, is:
… that convergence means something for some fixed whereas the -formulas are not concerned with , but with . Convergence of the series, for all , say, means that for every individual there is a statement about the case . On the other hand, the statement that the series is the asymptotic expansion of means that for every individual there is a statement about the case .
For example, when , the asymptotic expansion of is:
but the series converges for no value of .
The book covers lots of useful stuff. In particular, It talks about Lagrange’s inversion formula (using which we can solve for the “tree function”), it has a especially thorough treatment of the saddle-point method. And much much more.