Donald E. Knuth's research while affiliated with Stanford University and other places

Publications (239)

Article
Donald Knuth on the best way to recognize the history of computer science.
Article
In the years since Alan Turing, and following his lead, computer scientists advanced their understanding of computational phenomena by developing a very specialized, original and penetrating way of rigorous thinking. Now it turns out that this "algorithmic" way of thinking can be applied productively to the study of important phenomena outside comp...
Chapter
In this paper we give a new randomized incremental algorithm for the construction of planar Voronoi diagrams and Delaunay triangulations. The new algorithm is more online than earlier similar methods, takes expected time O(n log n) and space O(n), and is eminently practical to implement. The analysis of the algorithm is also interesting in its own...
Article
We study an interesting family of cooperating coroutines, which is able to generate all patterns of bits that satisfy certain fairly general ordering constraints, changing only one bit at a time. (More precisely, the directed graph of constraints is required to be cycle-free when it is regarded as an undirected graph.) If the coroutines are impleme...
Article
In this column we review the books listed below. In addition there is a comment by Oded Goldreich on the review of his book Foundations of Cryptography.
Conference Paper
People who discover the power and beauty of high-level, abstract ideas often make the mistake of believing that concrete ideas at lower levels are relatively worthless and might as well be forgotten. The speaker will argue that, on the contrary, the best computer scientists are thoroughly grounded in basic concepts of how computers actually work, a...
Article
We study an interesting family of cooperating coroutines, which is able to generate all patterns of bits that satisfy certain fairly general ordering constraints, changing only one bit at a time. (More precisely, the directed graph of constraints is required to be cycle-free when it is regarded as an undirected graph.) If the coroutines are impleme...
Article
We study an interesting family of cooperating coroutines, which is able to generate all patterns of bits that satisfy certain fairly general ordering constraints, changing only one bit at a time. (More precisely, the directed graph of constraints is required to be cycle-free when it is regarded as an undirected graph.) If the coroutines are impleme...
Article
Contents Foreword vii A Quick Start ... ix I Background i Proof Machines 1 2 Tightening the Target 17 2.2 Identities .................................. 21 2.3 Human and computer proofs; an example ................ 24 2.4 A Mathematica session .......................... 27 2.5 A Maple session .............................. 29 2.6 Where we are and wh...
Article
Das Buch Arithmetik ist eine Übersetzung des vierten Kapitels der legendären Werkreihe "The Art of Computer Programming" von Donald E. Knuth in der neuesten Fassung. Es handelt sich um eine umfangreiche Einführung in die Computeralgebra, die den neuesten Stand der Forschung berücksichtigt. Donald E. Knuth versteht es, die Algorithmen didaktisch seh...
Book
Hauptziel Dieses Kapitels ist eine sorgfältige Untersuchung der vier arithmetischen Grundrechenarten: Addition, Subtraktion, Multiplikation und Division. Viele betrachten Arithmetik als eine triviale Sache, die Kinder lernen und Rechner abarbeiten, doch wir werden sehen, dass Arithmetik ein faszinierender Gegenstand mit vielen interessanten Facette...
Article
Contents Foreword vii AQuickStart... ix I Background 1 1 Proof Machines 3 1.1 Evolutionoftheprovinceofhumanthought .............. 3 1.2 Canonicalandnormalforms....................... 7 1.3 Polynomialidentities........................... 8 1.4 Proofsbyexample?............................ 9 1.5 Trigonometricidentities ......................... 11 1.6...
Article
Full-text available
We give a uniform treatment of several series expansions for the Lambert W function, leading to an infinite family of new series. We also discuss standardization, complex branches, a family of arbitrary-order iterative methods for computation of W , and give a theorem showing how to correctly solve another simple and frequently occurring nonlinear...
Article
The author presents two tricks to accelerate depth-first search algorithms for a class of combinatorial puzzle problems, such as tiling a tray by a fixed set of polyominoes. The first trick is to implement each assumption of the search with reversible local operations on doubly linked lists. By this trick, every step of the search affects the data...
Chapter
This program takes input written in MMIXAL, the MMIX assembly language, and translates it into binary files that can be loaded and executed on MMIX simulators. MMIXAL is much simpler than the “industrial strength” assembly languages that computer manufacturers usually provide, because it is primarily intended for the simple demonstration programs i...
Chapter
This CWEB program simulates how the MMIX computer might be implemented with a high-performance pipeline in many different configurations. All of the complexities of MMIX’s architecture are treated, except for multiprocessing and low-level details of memory mapped input/output. The present program module, which contains the main routine for the MMIX...
Book
MMIX is a RISC computer designed by Don Knuth to illustrate machine-level aspects of programming. In the author's book series "The Art of Computer Programming", MMIX replaces the 1960s-style machine MIX. A particular goal in the design of MMIX was to keep its machine language simple, elegant, and easy to learn. At the same time, all of the complexi...
Chapter
This module supplies procedures for reading from and writing to MMIX memory addresses that exceed 48 bits. Such addresses are used by the operating system for input and output, so they require special treatment. At present only dummy versions of these routines are implemented. Users who need nontrivial versions of spec_read and/or spec_write should...
Chapter
The subroutines below are used to simulate 64-bit MMIX arithmetic on an old-fashioned 32-bit computer—like the one the author had when he wrote MMIXAL and the first MMIX simulators in 1998 and 1999. All operations are fabricated from 32-bit arithmetic, including a full implementation of the IEEE floating point standard, assuming only that the C com...
Chapter
This program module contains brute-force implementations of the ten input/output primitives defined at the beginning of MMIX-SIM. The subroutines are grouped here as a separate package, because they are intended to be loaded with the pipeline simulator as well as with the simple simulator.
Chapter
Configuration files allow this simulator to adapt itself to infinitely many possible combinations of hardware features. The purpose of the present module is to read a configuration file, check it for validity, and set up the relevant data structures.
Chapter
Thirty-eight years have passed since the MIX computer was designed, and computer architecture has been converging during those years towards a rather different style of machine. Therefore it is time to replace MIX with a new computer that contains even less saturated fat than its predecessor. Exercise 1.3.1–25 in the third edition of Fundamental Al...
Chapter
This program reads a binary mmo file output by the MMIXAL processor and lists it in human-readable form. It lists only the symbol table, if invoked with the -s option. It lists also the tetrabytes of input, if invoked with the -v option.
Chapter
This program is the heart of the meta-simulator for the ultraconfigurable MMIX pipeline: It defines the MMIX_run routine, which does most of the work. Another routine, MMIX_init, is also defined here, and so is a header file called mmix_pipe.h. The header file is used by the main routine and by other routines like MMIX_config, which are compiled se...
Chapter
This program simulates a simplified version of the MMIX computer. Its main goal is to help people create and test MMIX programs for The Art of Computer Programming and related publications. It provides only a rudimentary terminal-oriented interface, but it has enough infrastructure to support a cool graphical user interface — which could be added b...
Article
> n+m n m z n n! : (1a) The numbers (Gamma1) n+m Theta n m are also called Stirling numbers of the first kind [8]. Stirling partition numbers Phi n m Psi , also called Stirling numbers of the second kind, are defined by (e z Gamma 1) m = m! X n ae n m oe z n n! ; (1b) and 2-associated Stirling partition numbers Phi n m Psi 2 are defined by [2, exer...
Article
C. L. Mallows and J. Riordan [Bull. Am. Math. Soc. 74, 92-94 (1968; Zbl 0242.05004)] showed that labeled trees with a small number of inversions are related to labeled graphs that are connected and sparse. E. M. Wright [J. Graph Theory 1, 317-330 (1977; Zbl 0363.05040)] enumerated sparse connected graphs, and G. Kreweras [Period. Math. Hung. 11, 30...
Article
. A perturbation technique can be used to simplify and sharpen A. C. Yao's theorems about the behavior of shellsort with increments (h; g; 1). In particular, when h = Theta(n 7=15 ) and g = Theta(h 1=5 ), the average running time is O(n 23=15 ). The proof involves interesting properties of the inversions in random permutations that have been h-sort...
Article
Full-text available
We give a uniform treatment of several series expansions forthe Lambert W function, leading to an infinite family of newseries. We also discuss standardization, complex branches, afamily of arbitrary-order iterative methods for computationof W , and give a theorem showing how to correctly solveanother simple and frequently occurring nonlinear equat...
Article
This expository note presents simplifications of a theorem due to Gy\H{o}ri and an algorithm due to Franzblau and Kleitman: Given a family $F$ of $m$ intervals on a linearly ordered set of $n$ elements, we can construct in $O(m+n)^2$ steps an irredundant subfamily having maximum cardinality, as well as a generating family having minimum cardinality...
Article
Full-text available
The LambertW function is defined to be the multivalued inverse of the functionw we w . It has many applications in pure and applied mathematics, some of which are briefly described here. We present a new discussion of the complex branches ofW, an asymptotic expansion valid for all branches, an efficient numerical procedure for evaluating the funct...
Article
Full-text available
The function $y=\Phi_\alpha(x)$, the solution of $y^\alpha e^y=x$ for $x$ and $y$ large enough, has a series expansion in terms of $\ln x$ and $\ln\ln x$, with coefficients given in terms of Stirling cycle numbers. It is shown that this expansion converges for $x>(\alpha e)^\alpha$ for $\alpha \ge 1$. It is also shown that new expansions can be obt...
Article
Shapley and Scarf introduced a notion of stable allocation between traders and indivisible goods, when each trader has rank-ordered each of the goods. The purpose of this note is to prove that the distribution of ranks after allocation is the same as the distribution of search distances in uniform hashing, when the rank-orderings are independent an...
Article
A pleasant family of graphs defined by Godsil and McKay is shown to have easily computed eigenvalues in many cases.
Article
A set partition technique that is useful for identifying wires in cables can be recast in the language of 0–1 matrices, thereby resolving an open problem stated by R. L. Graham in Volume 1 of this journal. The proof involves a construction of 0–1 matrices having row and column sums without gaps. A long cable contains n indistinguishable wires. Two...
Article
This note derives the characteristic polynomial of a graph that represents nonjump moves in a generalized game of checkers. The number of spanning trees is also determined.
Article
>n+mnmznn!: (1a)The numbers (\Gamma1)n+m\Theta nmare also called Stirling numbers of the first kind [8]. Stirling partition numbers\Phi nm\Psi, also called Stirling numbers of the second kind, are defined by(ez\Gamma 1)m= m!Xnaenmoeznn!; (1b)and 2-associated Stirling partition numbers\Phi nm\Psi2are defined by [2, exercise 5.7; 7, p. 296; 9, x4.5](...
Article
When $G(z)$ is a power series in $z$, many authors now write `$[z^n] G(z)$' for the coefficient of $z^n$ in $G(z)$, using a notation introduced by Goulden and Jackson in [\GJ, p. 1]. More controversial, however, is the proposal of the same authors [\GJ, p. 160] to let `$[z^n/n!] G(z)$' denote the coefficient of $z^n/n!$, i.e., $n!$ times the coeffi...
Article
Limiting distributions are derived for the sparse connected components that are present when a random graph on $n$ vertices has approximately $\half n$ edges. In particular, we show that such a graph consists entirely of trees, unicyclic components, and bicyclic components with probability approaching $\sqrt{2\over 3} \cosh\sqrt{5\over 18}\approx0....
Article
The polynomials that arise as coefficients when a power series is raised to the power $x$ include many important special cases, which have surprising properties that are not widely known. This paper explains how to recognize and use such properties, and it closes with a general result about approximating such polynomials asymptotically.
Article
In this paper we give a new randomized incremental algorithm for the construction of planar Voronoi diagrams and Delaunay triangulations. The new algorithm is more “on-line” than earlier similar methods, takes expected timeO(nℝgn) and spaceO(n), and is eminently practical to implement. The analysis of the algorithm is also interesting in its own ri...
Article
The author advocates two specific mathematical notations from his popular course and joint textbook, "Concrete Mathematics". The first of these, extending an idea of Iverson, is the notation "[P]" for the function which is 1 when the Boolean condition P is true and 0 otherwise. This notation can encourage and clarify the use of characteristic funct...
Article
This article is a sketch of ideas that were once intended to appear in the author's famous series, "The Art of Computer Programming". He generalizes the notion of a context-free language from a set to a multiset of words over an alphabet. The idea is to keep track of the number of ways to parse a string. For example, "fruit flies like a banana" can...
Article
The author argues to Silicon Valley that the most important and powerful part of computer science is work that is simultaneously theoretical and practical. He particularly considers the intersection of the theory of algorithms and practical software development. He combines examples from the development of the TeX typesetting system with clever jok...
Article
We discuss properties of recursive schemas related to McCarthy's ``91 function'' and to Takeuchi's triple recursion. Several theorems are proposed as interesting candidates for machine verification, and some intriguing open questions are raised.
Article
This note presents an elementary version of Sims's algorithm for computing strong generators of a given perm group, together with a proof of correctness and some notes about appropriate low-level data structures. Upper and lower bounds on the running time are also obtained. (Following a suggestion of Vaughan Pratt, we adopt the convention that perm...
Article
It is possible to compute gcd (x, y) efficiently with only O(log xy) additions and subtractions, when three arithmetic registers are available but not when there are only two. Several other functions, such as xy mod z, are also efficiently computable in a small number of registers, using only addition, subtraction, and comparison.
Article
Suppose $n$ boys and $n$ girls rank each other at random. We show that any particular girl has at least $({1\over 2}-\epsilon) \ln n$ and at most $(1+\epsilon)\ln n$ different husbands in the set of all Gale/Shapley stable matchings defined by these rankings, with probability approaching 1 as $n \to \infty$, if $\epsilon$ is any positive constant....
Article
A special case of the satisfiability problem, in which the clauses have a hierarchical structure, is shown to be solvable in linear time, assuming that the clauses have been represented in a convenient way. This algorithm for nested satisfiability works by essentially replacing each clause by a clause containing only two literals, using a special f...
Conference Paper
I have always been fascinated by the origin of ideas, so I am pleased that the organizers of this conference have asked me to open the proceedings by taking a look back at how the subject began. In other words, I’m glad that my job is to give this conference a “history attribute.” Attribute grammars were born in the exhilarating days of the mid-60s...
Article
As I was writing the TEX program, I needed to construct subroutines for many small tasks. The solution to one of those problems turned out to be especially interesting —to me at least— because it was a very short and simple piece of code, yet I could see no easy way to demonstrate its correctness by conventional methods.
Chapter
So that the identities themselves do not become buried on an obscure page, we summarize them immediately:
Chapter
Recurrence relations are traditionally divided into two classes: A recurrence with “finite history” depends on a fixed number of earlier values, $$ x_n = f(x_{n - 1} ,x_{n - 2} ,...,x_{n - m} ), n \geqslant m. $$ (2.1) An equation that depends on all preceding values has a “full history.”
Chapter
The following analysis of hashing, based on unpublished notes by Michael Paterson, relies on two concepts: eigenoperators and what he calls “induction from the other end.” The cookie monster example below illustrates the value of finding an eigenoperator. “Induction at the other end” will appear later when we apply the techniques to various hashing...
Chapter
There is no guarantee that the study of algorithms will produce sums and recurrences with straightforward closed form solutions. In fact much of the adventure of analysis of algorithms lies in the variety of mathematics to which researchers are drawn (at times kicking and screaming) in their attempts to understand algorithms. Frequently the researc...
Article
Elementary asymptotic methods suffice to establish asymptotic series for the coefficients of analytic functions with algebraic singularities.
Article
Elementary asymptotic methods suffice to establish asymptotic series for the coefficients of analytic functions with algebraic singularities.
Article
This paper is a case study of program evolution. The author kept track of all changes made to TEX during a period of ten years, including the changes made when the original program was first debugged in 1978. The log book of these errors, numbering more than 850 items, appears as an appendix to this paper. The errors have been classified into fifte...
Article
If successive connections are added at random to an initially disconnected set of n points, the expected length of the first cycle that appears will be proportional to n, with a standard deviation proportional to n. The size of the component containing this cycle will be of order n, on the average, with standard deviation of order n. The average le...
Article
The asymptotic behavior of the solutions to an interesting class of recurrence relations, which arise in the study of trees and random graphs, is derived by making uniform estimates on the elements of a basis of the solution space. We also investigate a family of polynomials with integer coefficients, which may be called the ”tree polynomials.“.
Article
A curious binary operation on the nonnegative integers is shown to be associative.
Article
This paper describes a technique for approximating real-valued pixels by two-valued pixels. The new method, called dot diffusion, appears to avoid some deficiencies of other commonly used techniques. It requires approximately the same total number of arithmetic operations as the Floyd-Steinberg method of adaptive grayscale, and it is well suited to...
Article
Coding schemes in which each codeword contains equally many zeros and ones are constructed in such a way that they can be efficiently encoded and decoded.
Article
This note describes a sorting technique that is similar to the well-known quicksort method, but it is undirectional and avoids recursion. The new approach, which assumes that the keys to be sorted are positive numbers, leads to a much shorter program.
Article
This note shows how to maintain a prefix code that remains optimum as the weights change. A Huffman tree with nonnegative integer weights can be represented in such a way that any weight w at level l can be increased or decreased by unity in O(l) steps, preserving minimality of the weighted path length. One-pass algorithms for file compression can...
Article
A cache memory that is maintained clairvoyantly, i.e., with perfect knowledge of the future, can be surprisingly effective even when it is applied to completely random data. It is shown that a cache of size h, applied optimally to a uniformly random sequence on an alphabet of size d, is able to avoid faults with probability of order . The analysis...
Article
My purpose in this paper is to stimulate discussion about a philosophical question that has been on my mind for a long time: What is the actual role of the notion of an algorithm in mathematical sciences? For many years I have been convinced that computer science is primarily the study of algorithms. My colleagues don't all agree with me, but it tu...
Article
It is shown that the multiplier, the increment, and the seed value of a linear congruential random number generator on a binary computer can be deduced from the leading bits of the 'random' numbers that are generated.
Article
An efficient algorithm for communicating letter-shape information from a high-speed computer with a large memory to a typesetting device that has a limited memory is presented. The encoding is optimum, in the sense that the total time for typesetting is minimized, using a model that generalizes well-known “demand paging” strategies to the case wher...
Article
An abstract is not available.
Article
An efficient binary technique is presented for determining, to prescribed accuracy, the location of the zeros of a stochastic functionB(x) that is a classical one-dimension Brownian motion.
Article
The past ten years have witnessed substantial improvements in programming methodology. This advance, carried out under the banner of “structured programming,” has led to programs that are more reliable and easier to comprehend; yet the results are not entirely satisfactory. My purpose in the present paper is to propose another motto that may be app...

Citations

... We hope this work promotes other tool-based studies on the implementation of important subroutines on various gaming platforms. Such studies will help improve CS history, as per Knuth's call [24]. 10 These matches do not include games that call the LFSR code found in the FDS BIOS. ...
... Then α i β i A ii = Q A ii ≤ ri n by the definition of r i . By this observation and the Van der Waerden inequality for Q A (see e.g., [38]), ...
... which can be rewritten in terms of binomial numbers and rising/falling factorials 3 [10] as ...
... Graham's technique was successively refined by Knuth [4], Wilf [11] , and Nicol [8] who found smaller pairs (x 0 , x 1 ). The current record is due to Vsemirnov [10] (2) (x 0 , x 1 ) = (106276436867, 35256392432). ...
... Consider the family of all ray paths of discrete length 2n − 2, n ≥ 1, that enter the ML structure and are transmitted or reflected 2n−1 times, and leave the ML at the surface after these 2n − 1 steps. The number of rays in this family is then given as the nth Catalan number c n [84][85][86]. A recursive algorithm to generate such families of rays is given in appendix B. ...
... The theoretical contribution proposed in this paper focused on the different components of schemes, on their relations and evolutions, in particular on the operational invariants and on how they pilot rules-of-action (operational knowledge, in Vergnaud's terms). While our aim here was not to study whether operational invariants in (p + m)-schemes are linked with computational thinking, mathematical thinking, or both, many interesting works address this difference (e.g., Knuth, 1985;Rogalski, 2015), and it constitutes a promising perspective for our future work. ...
... Moreover, mentality and principles behind Agile often contradict common performance engineering conjectures. For example, Fowler and Beck, namely two signatories of the Agile Manifesto (Beck et al. 2001), suggest to consider software performance only after making the software clear and maintainable (Auer and Beck 1996;Fowler 2002), thereby conceptually reflecting the famous quote from Knuth that "Premature optimization is the root of all evil in programming" (Knuth 2007). On the other hand, classical performance engineering literature argues that the "fix-it-late" attitude is one of the causes of major performance failures (Smith and Williams 2001). ...
... Blocking See, e.g., [8,18,19,35,58,73,79] on oriented matroids. Each of the 2 t maximal covectors T := (T (1), . . . ...
... Many authors have considered the problem of finding an explicit bijection between the positive rationals and positive integers, to find a way which bypasses this difficulty of winnowing out those rational representations that are not in lowest terms, e.g., [2], [3], [4], [7], [9], [10], [12], [13], [15]. However, not all of the proposed bijections can be considered efficient. ...
... In this paper, we obtain algebraic bounds for these functions on their entire domains. New inequalities are simple and comparable with (1.3) and (1.4) as well as they give Wilker [15] and Huygens [10] type inequalities for inverse hyperbolic functions. ...