SearcharxivSearch

arXiv subjects

Donald E. Knuth

Publications and source records attributed to Donald E. Knuth.

At least 19 recordsLinked to original sources

Efficient coroutine generation of constrained Gray sequences

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 implemented carefully, they yield an algorithm that needs only a bounded amount of computation per bit change, thereby solving an open problem in the field of combinatorial pattern generation.

cs.DS

Dancing links

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 incrementally. The second trick is to add a ghost square that represents the identity of each polyomino. Thus puts the rule that each polyomino be used once on the same footing as the rule that each square be covered once. The coding simplifies to a more abstract form which is equivalent to 0-1 integer programming. More significantly for the total computation time, the search can naturally switch between placing a fixed polyomino or covering a fixed square at different stages, according to a combined heuristic. Finally the author reports excellent performance for his algorithm for some familiar puzzles. These include tiling a hexagon by 19 hexiamonds and the N queens problem for N up to 18.

cs.DS

Linear probing and graphs

Mallows and Riordan showed in 1968 that labeled trees with a small number of inversions are related to labeled graphs that are connected and sparse. Wright enumerated sparse connected graphs in 1977, and Kreweras related the inversions of trees to the so-called ``parking problem'' in 1980. A~combination of these three results leads to a surprisingly simple analysis of the behavior of hashing by linear probing, including higher moments of the cost of successful search.

cs.DS

Shellsort with three increments

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=Θ(n^{7/15})$ and $g=Θ(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$-sorted and $g$-sorted.

cs.DS

Irredundant intervals

This expository note presents simplifications of a theorem due to Győ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. The algorithm is of special interest because it solves a problem analogous to finding a maximum independent set, but on a class of objects that is more general than a matroid. This note is also a complete, runnable computer program, which can be used for experiments in conjunction with the public-domain software of {\sl The Stanford GraphBase}.

math.CO

On the inversion of $y^αe^y$ in terms of associated Stirling numbers

The function $y=Φ_α(x)$, the solution of $y^α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>(αe)^α$ for $α\ge 1$. It is also shown that new expansions can be obtained for $Φ_α$ in terms of associated Stirling numbers. The new expansions converge more rapidly and on a larger domain.

math.CA

Two-way rounding

Given $n$ real numbers $0\leq x_1,...,x_n<1$ and a permutation~$σ$ of $\{1,...,n\}$, we can always find $\xbar_1,...,\xbar_n\in\{0,1\}$ so that the partial sums $\xbar_1+... +\xbar_k$ and $\xbar_{σ1}+... +\xbar_{σk}$ differ from the unrounded values $x_1+... + x_k$ and $x_{σ1}+... +x_{σk}$ by at most $n/(n+1)$, for $1\leq k\leq n$. The latter bound is best possible. The proof uses an elementary argument about flows in a certain network, and leads to a simple algorithm that finds an optimum way to round.

math.OC

Polynomials involving the floor function

Some identities are presented that generalize the formula x^3 = 3x floor(x floor(x)) - 3 floor(x) floor(x floor(x)) + floor(x)^3 + 3 frac(x) frac(x floor(x)) + frac(x)^3 to a representation of the product x_0x_1 ... x_{n-1}.

math.NT

An exact analysis of stable allocation

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 and uniformly random. Therefore the average sum of final ranks is just $(n+1)H_n-n$, and the standard deviation is O(n). The proof involves a family of interesting one-to-one correspondences between permutations of a special kind.

math.OC

Overlapping Pfaffians

A combinatorial construction proves an identity for the product of the Pfaffian of a skew-symmetric matrix by the Pfaffian of one of its submatrices. Several applications of this identity are followed by a brief history of Pfaffians.

math.CO

The Knowlton-Graham partition problem

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.

math.CO

Leaper graphs

An $\{r,s\}$-leaper is a generalized knight that can jump from $(x,y)$ to $(x\pm r,y\pm s)$ or $(x\pm s,y\pm r)$ on a rectangular grid. The graph of an $\{r,s\}$-leaper on an $m\times n$ board is the set of $mn$~vertices $(x,y)$ for $0\leq x<m$ and $0\leq y<n$, with an edge between vertices that are one $\{r,s\}$-leaper move apart. We call $x$ the {\it rank} and $y$ the {\it file} of board position $(x,y)$. George~P. Jelliss raised several interesting questions about these graphs, and established some of their fundamental properties. The purpose of this paper is to characterize when the graphs are connected, for arbitrary~$r$ and~$s$, and to determine the smallest boards with Hamiltonian circuits when $s=r+1$ or $r=1$.

math.CO

Bracket notation for the `coefficient of' operator

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 coefficient of $z^n$. An alternative generalization of $[z^n] G(z)$, in which we define $[F(z)] G(z)$ to be a linear function of both $F$ and $G$, seems to be more useful because it facilitates algebraic manipulations. The purpose of this paper is to explore some of the properties of such a definition. The remarks are dedicated to Tony Hoare because of his lifelong interest in the improvement of notations that facilitate manipulation.

math.CA

Mini-indexes for literate programs

This paper describes how to implement a documentation technique that helps readers to understand large programs or collections of programs, by providing local indexes to all identifiers that are visible on every two-page spread. A detailed example is given for a program that finds all Hamiltonian circuits in an undirected graph.

cs.PL

The sandwich theorem

This report contains expository notes about a function $\vartheta(G)$ that is popularly known as the Lovász number of a graph~$G$. There are many ways to define $\vartheta(G)$, and the surprising variety of different characterizations indicates in itself that $\vartheta(G)$ should be interesting. But the most interesting property of $\vartheta(G)$ is probably the fact that it can be computed efficiently, although it lies ``sandwiched'' between other classic graph numbers whose computation is NP-hard. I~have tried to make these notes self-contained so that they might serve as an elementary introduction to the growing literature on Lovász's fascinating function.

math.CO

The birth of the giant component

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.9325$ as $n\to\infty$. The limiting probability that it consists of trees, unicyclic components, and at most one other component is approximately 0.9957; the limiting probability that it is planar lies between 0.987 and 0.9998. When a random graph evolves and the number of edges passes $\half n$, its components grow in cyclic complexity according to an interesting Markov process whose asymptotic structure is derived. The probability that there never is more than a single component with more edges than vertices, throughout the evolution, approaches $5π/18\approx0.8727$. A ``uniform'' model of random graphs, which allows self-loops and multiple edges, is shown to lead to formulas that are substantially simpler than the analogous formulas for the classical random graphs of Erdős and Rényi. The notions of ``excess'' and ``deficiency,'' which are significant characteristics of the generating function as well as of the graphs themselves, lead to a mathematically attractive structural theory for the uniform model. A general approach to the study of stopping configurations makes it possible to sharpen previously obtained estimates in a uniform manner and often to obtain closed forms for the constants of interest. Empirical results are presented to complement the analysis, indicating the typical behavior when $n$ is near 20000.

math.PR