arXiv++ Combinatorics

Browse math.CO papers from arXiv

Papers by Doron Zeilberger

202 paper(s) by this author · All BibTeX
The Distribution of Double Deficiencies in Pattern-Avoiding Permutations
We study the distribution of the number of double deficiencies (DD) in permutations of length n avoiding one or two patterns of length 3. Using structural decompositions of these avoidance classes--together with a lattice-path decomposition in the 321-avoiding case--we derive functional equations and convolution-type recurrences that efficiently compute the corresponding double-deficiency generating functions in all but one single-pattern case. In the 321-avoiding permutations, the resulting generating function is algebraic; we derive exact formulas for the mean and variance and prove that the distribution is close in total variation to Bin(n-2,1/4), with an explicit convergence rate. We also identify a DD-preserving symmetry that yields DD-Wilf equivalences, reducing the number of two-pattern cases that need to be considered separately. For the resulting two-pattern classes, we obtain explicit recurrences, including C-finite relations.
2026-07-28
The Combinatorics of Multi-Lane Merging
We extend the nice treatment of V. Bardenova, E. Insko, K. Johnson, and S. Sullivan of the combinatorics of two-lane mergings to the multi-lane case.
In How Many Ways can a Rectangle be Rectangled?
There are $2^{n-1}$ ways to tile a $1 \times n$ rectangle with rectangular tiles (of any length, of course they all must have width $1$), but in how many ways can you tile a $100 \times 100$ checkerboard with such tiles? Neither humankind, nor computer-kind, will (most probably) ever know the exact number. But it is possible to compute these numbers for $m \times n$ rectangular grids, if $m$ is not too big, while $n$ can be as big as one wishes. This was initially done in 1988 by David Klarner and Spyros Magliveras, and beautifully extended, around 2006, by, at-the-time, first-year LSU undergraduate Joshua Smith, in collaboration with his faculty mentor, Helena Verrill. Here we extend this to weighted-counting, also keeping track of the number of tiles (that ranges from $1$ to $mn$), and the number of participating grid-edges (that range from $2m+2n$ to $2mn+m+n$). This quickly leads to statistical analyses (mean, variance, and higher moments) of these quantities. While we admire the clever approaches of Klarner-Magliveras and Smith-Verrill, we use two alternative approaches to the original problem, that are more amenable for deriving these generalizations. At the same time, we illustrate the power and beauty of experimental-yet-rigorous enumerative combinatorics.
2026-03-25
Counting (and Randomly Generating) Hamiltonian Cycles in Rectangular Grids
We first fully implement, in Maple, the ingenious method of Robert Stoyan and Volker Strehl from 1995 to automatically derive generating functions for the number of Hamiltonian cycles in an m by n grid graph ,for a fixed width m, but general length n, and actually compute these generating functions for all m up to ten. We also show how to generate a uniformly-at-random such Hamiltonian cycle, and also derive more informative generating functions for other parameters besides the length of the grid graph.
2026-02-22
Statistical Analysis of Hairpins and BasePairs in RNA Secondary Structures
We derive precise asymptotic expressions for the expectations, variances, covariance, and quite a few further mixed moments for the number of hairpins and the number of basepairs in RNA secondary structures, and give convincing evidence that the central-scaled distribution of the pair of random variables (hairpins, basepairs) tends in distribution to the bi-variate normal distribution with correlation $\sqrt{5 \sqrt{5} -11}/2= 0.2123322205\dots$
2025-12-08
How many coin tosses would you need until you get $n$ Heads or $m$ Tails?
We harness both human ingenuity and the power of symbolic computation to study the number of coin tosses until reaching $n$ Heads or $m$ Tails. We also talk about the closely related problem of reaching $n$ Heads and $m$ Tails. This paper is accompanied by a Maple package that enables fast computation of expectations, variances, and higher moments of these quantities.
Cutting 4 by $n$ grids into two congruent pieces
In the March 2025 issue of Pour la Science, Jean-Paul Delahaye described a wonderful solution to the following problem: How many ways can you divide a 3 by 2n rectangle into two connected, congruent pieces? We show that this problem can be solved by the transfer matrix method, and demonstrate this by computing the generating function for the number of ways to divide a 4 by n rectangle into two connected, congruent parts.
2025-10-04
Every Fifth Real Number is Evil
Fifteen years ago, then-Carleton-undergrad Isaac Hodes, proved that the Golden Ratio is evil. In this modest contribution to human knowledge, we show that in fact, every fifth real number is evil, and we present lots of other interesting numbers that are evil. We also show (in addition to many other fascinating facts), that the expected evil-location of a random evil number is 148.185185185185185... . It follows that the Golden Ratio is a fairly average evil real number, since, as first computed by Hodes, the evil location of the Golden Ratio is 146.
The Challenge of Computing Geode Numbers
In a fascinating recent American Mathematical Monthly article, Norman Wildberger and Dean Rubine introduced a new kind of combinatorial numbers, that they aptly named the ``Geode numbers''. While their definition is simple, these numbers are surprisingly hard to compute, in general. While the two-dimensional case has a nice closed-form expression, that make them easy to compute, already the three-dimensional case poses major computational challenges that we do meet, combining experimental mathematics and the holonomic ansatz. Alas, things get really complicated in four and higher dimensions, and we are unable to efficiently compute, for example, the $1000$-th term of the four-dimensional diagonal Geode sequence. A donation of $100$ US dollars to the OEIS, in honor of the first person to compute this number, is offered.
2025-07-05 v2
Automated Counting of Spanning Trees for Several Infinite Families of Graphs
Using the theoretical basis developed by Yao and Zeilberger, we consider certain graph families whose structure results in a rational generating function for sequences related to spanning tree enumeration. Said families are Powers of Cycles and Powers of Path; later, we briefly discuss Torus graphs and Grid graphs. In each case we know, a priori, that the set of spanning trees of the family of graphs can be described in terms of a finite-state-machine, and hence there is a finite transfer-matrix that guarantees the generating function is rational. Finding this ``grammar'', and hence the transfer-matrix is very tedious, so a much more efficient approach is to use experimental mathematics. Since computing numerical determinants is so fast, one can use the matrix tree theorem to generate sufficiently many terms, then fit the data to a rational function. The whole procedure can be done rigorously a posteriori.
2025-06-22
Proofs Of Three Geode Conjectures
In the May 2025 issue of the Amer. Math. Monthly, Norman J. Wildberger and Dean Rubine intoduced a new kind of multi-indexed numbers, that they call `Geode numbers', obtained from the Hyper-Catalan numbers. They posed three intriguing conjectures about them, that are proved in this note.
Hitting k primes by dice rolls
Let $S=(d_1,d_2,d_3, \ldots )$ be an infinite sequence of rolls of independent fair dice. For an integer $k \geq 1$, let $L_k=L_k(S)$ be the smallest $i$ so that there are $k$ integers $j \leq i$ for which $\sum_{t=1}^j d_t$ is a prime. Therefore, $L_k$ is the random variable whose value is the number of dice rolls required until the accumulated sum equals a prime $k$ times. It is known that the expected value of $L_1$ is close to $2.43$. Here we show that for large $k$, the expected value of $L_k$ is $(1+o(1)) k\log_e k$, where the $o(1)$-term tends to zero as $k$ tends to infinity. We also include some computational results about the distribution of $L_k$ for $k \leq 100$.
2025-01-29 v2
Experimenting with the Garsia-Milne Involution Principle
Published in SIGMA 21 (2025), 015, 6 pages • View PublicationBIB
In 1981, Adriano Garsia and Steve Milne found the first bijective proof of the celebrated Rogers-Ramanujan identities. To achieve this feat, they invented a versatile tool that they called the Involution Principle. In this note we revisit this useful principle from a very general perspective, independent of its application to specific combinatorial identities, and will explore its complexity.
2025-01-07
Efficient Weighted Counting of Multiset Derangements
We use the Almkvist-Zeilberger algorithm, combined with a weighted version of the Even-Gillis Laguerre integral due to Foata and Zeilberger, in order to efficiently compute weight enumerators of multiset derangements according to the number of cycles. The present paper is inspired by important previous work by Mourad Ismail and his collaborators, done in the late 1970s, but still useful after all these years.
2024-12-15 v2
A Short Proof that the number of $(a,b)$-parking functions of length n $a(a+bn)^{n-1}$
We give a very short proof of the fact that the number of $(a,b)$-parking functions of length $n$ equals $a(a+bn)^{n-1}$. This was first proved in 2003 by Kung and Yan, via a very long and torturous route, as a corollary of a more general result. This new version contains a reference to previous work kindly communicated by Richard Stanley
The $O(1/n^{85})$ Asymptotic expansion of OEIS sequence A85
One of the most important sequences in enumerative combinatorics is OEIS sequence A85, the number of involutions of length n. In the Art of Computer Programming, vol. 3, Don Knuth derived the O(1/n) asymptotic formula for these numbers. In this modest tribute to our two heroes, Neil Sloane who just turned 85, and Don Knuth who was 85 a year ago, we go all the way to an $O(1/n^{85})$ asymptotic formula.
The (Symbolic and Numeric) Computational Challenges of Counting 0-1 Balanced Matrices
A chessboard has the property that every row and every column has as many white squares as black squares. In this mostly methodological note, we address the problem of counting such rectangular arrays with a fixed (numeric) number of rows, but an arbitrary (symbolic) number of columns. We first address the ``vanilla" problem where there are no restrictions, and then go on to discuss the still-more-challenging problem of counting such binary arrays that are not permitted to contain a specified (finite) set of horizontal patterns, and a specified set of vertical patterns. While we can rigorously prove that each such sequence satisfies some linear recurrence equation with polynomial coefficients, actually finding these recurrences poses major {\it symbolic}-computational challenges, that we can only meet in some small cases. In fact, just generating as many as possible terms of these sequences is a big {\it numeric}-computational challenge. This was tackled by computer whiz Ron H. Hardin, who contributed several such sequences, and computed quite a few terms of each. We extend Hardin's sequences quite considerably. We also talk about the much easier problem of counting such restricted arrays without balance conditions.
2024-08-18 v2
A combinatorial proof of Cramer's Rule
In 1750, Gabriel Cramer famously stated, without proof, his eponymous rule for solving a system of linear equations with as many equations as unknowns. We give a purely combinatorial, and purely self-contained, proof of this old chestnut, still useful after all these years.
von Neumann and Newman Pokers with Finite Decks
John von Neumann studied a simplified version of poker where the "deck" consists of infinitely many cards, in fact, all real numbers between $0$ and $1$. We harness the power of computation, both numeric and symbolic, to investigate analogs with finitely many cards. We also study finite analogs of a simplified poker introduced by D.J. Newman, and conclude with a thorough investigation, fully implemented in Maple, of the three-player game, doing both the finite and the infinite versions. This paper is accompanied by two Maple packages and numerous output files.
2024-07-16 v2
Exploring Werner Krandick's Binary Tree Jump Statistics
Twenty years ago, Werner Krandick defined two statistics on binary trees. The first one determines the number of jumps, when traversing the tree in depth-first-search, from a vertex to one closer to the root, and the second keeps tracks of the sum of the jump-distances. He used clever but ad hoc human-generated arguments to find explicit expressions for their expectations. In this methodological note, we illustrate the power of experimental mathematics and symbolic computation to do much more. We derive closed-form expressions for the actual weight-enumerators according to these statistics (from which not only the expectations, but also the variances, and as many higher moments as desired, can be obtained). We also actually give the first eight moments, and conjecture that the first statistic (number of jumps) is asymptotically normal, and prove that the second one (sum of jump distances) is definitely not. In this revised version we are happy to announce that Stephen Melczer and Tia Ruza fully proved the asymptotic normality, and we provide a link to their writeup.