## Abstract

Let *s, t, m, n* be positive integers such that *sm* = *tn*. Let *M*(*m, s; n, t*) be the number of *m*×*n* matrices over {0, 1, 2, …} with each row summing to *s* and each column summing to *t*. Equivalently, *M*(*m, s*; *n, t*) counts 2-way contingency tables of order *m*×*n* such that the row marginal sums are all *s* and the column marginal sums are all *t*. A third equivalent description is that *M*(*m, s*; *n, t*) is the number of semiregular labelled bipartite multigraphs with *m* vertices of degree *s* and *n* vertices of degree *t*. When *m* = *n* and *s* = *t* such matrices are also referred to as *n*×*n* magic or semimagic squares with line sums equal to *t*. We prove a precise asymptotic formula for *M*(*m, s*; *n, t*) which is valid over a range of (*m, s*; *n, t*) in which *m, n*→∞ while remaining approximately equal and the average entry is not too small. This range includes the case where *m/n*, *n/m*, *s/n* and *t/m* are bounded from below.

This is a preview of subscription content, access via your institution.

## References

- [1]
M. Beck and S. Robins:

*Computing the Continuous Discretely: Integer-Point Enumeration in Polyhedra*, Springer, 2007. - [2]
M. Beck and D. Pixton: The Ehrhart polynomial of the Birkhoff polytope,

*Discrete Comput. Geom.***30**(2003), 623–637. - [3]
A. Békéssy, P. Békéssy and J. Komlós: Asymptotic enumeration of regular matrices,

*Studia Sci. Math. Hungar.***7**(1972), 343–353. - [4]
E. A. Bender: The asymptotic number of nonnegative integer matrices with given row and column sums,

*Discrete Math.***10**(1974), 345–353. - [5]
A. Barvinok and J. A. Hartigan: An asymptotic formula for the number ofnon-negative integer matrices with prescribed row and column sums, arXiv:0910.2477v2.

- [6]
A. Barvinok, A. Samorodnitsky and A. Yong: Counting magic squares in quasipolynomial time, arXiv:math/0703227v1.

- [7]
R. Brualdi:

*Combinatorial Matrix Classes*, Cambridge University Press, 2006. - [8]
E. R. Canfield, C. Greenhill and B. D. McKay: Asymptotic enumeration of dense 0–1 matrices with specified line sums,

*J. Combin. Theory Ser. A***115**(2008), 32–66. - [9]
E. R. Canfield and B. D. McKay: Asymptotic enumeration of dense 0–1 matrices with equal row sums and equal column sums,

*Electron. J. Combin.***12**(2005), R29. - [10]
E. R. Canfield and B. D. McKay: The asymptotic volume of the Birkhoff polytope,

*Online J. Anal. Comb.***4**(2009), Article No. 2. - [11]
E. R. Canfield and B. D. McKay: Asymptotic enumeration of highly oblong integer matrices with given row and column sums, in preparation.

- [12]
Y. Chen, P. Diaconis, S. P. Holmes and J. S. Liu: Sequential Monte Carlo methods for statistical analysis of tables,

*J. Amer. Statist. Assoc.***100**(2005), 109–120. - [13]
S. X. Chen and J. S. Liu: Statistical Applications of the Poisson-Binomial and conditional Bernoulli distributions,

*Statist. Sinica***7**(1997), 875–892. - [14]
P. Diaconis and B. Efron: Testing for independence in a two-way table: new interpretations of the chi-square statistic (with discussion),

*Ann. Statist.***13**(1985), 845–913. - [15]
P. Diaconis and A. Gangolli: Rectangular arrays with fixed margins, in:

*IMA Volumes on Mathematics and its Applications*, volume**72**, pages 15–41. (Proceedings of the conference on Discrete Probability and Algorithms, Minneapolis, MN, 1993.) - [16]
M. Dyer, R. Kannan and J. Mount: Sampling contingency tables,

*Random Structures Algorithms*,**10**(1997), 487–506. - [17]
C. J. Everett, Jr. and P. R. Stein: The asymptotic number of integer stochastic matrices,

*Discrete Math.***1**(1971), 33–72. - [18]
M. Gail and N. Mantel: Counting the number of

*r*×*c*contingency tables with fixed margins,*J. Amer. Statist. Assoc.***72**(1977), 859–862. - [19]
I. J. Good:

*Probability and the Weighing of Evidence*, Charles Griffin, London, 1950. - [20]
I. J. Good: On the application of symmetric Dirichlet distributions and their mixtures to contingency tables,

*Ann. Statist.***4**(1976), 1159–1189. - [21]
I. J. Good and J. F. Crook: The enumeration of arrays and a generalization related to contingency tables,

*Discrete Math.***19**(1977), 23–45. - [22]
C. S. Greenhill and B. D. McKay: Asymptotic enumeration of sparse nonnegative integer matrices with specified row and column sums,

*Adv. Appl. Math.***41**(2008), 459–481. - [23]
F. Greselin: Counting and enumerating frequency tables with given margins,

*Statistica & Applicazioni (Univ. Milano, Bicocca)***1**(2003), 87–104. Preprint available at http://hdl.handle.net/10281/4643. - [24]
W. Hoeffding: Probability inequalities for sums of bounded random variables,

*J. Amer. Statist. Assoc.***58**(1963), 13–30. - [25]
R. B. Holmes and L. K. Jones: On uniform generation of two-way tables with fixed margins and the conditional volume Test of Diaconis and Efron,

*Ann. Statist*.**24**(1996), 64–68. - [26]
P. A. Macmahon: Combinatorial analysis. The foundation of a new theory,

*Philos. Trans. Roy. Soc. London Ser. A***194**(1900), 361–386. (Paper 57 of Volume**I**of the*Collected Papers*.) - [27]
P. A. Macmahon: Combinations derived from

*m*identical sets of*n*different letters,*Proc. London Math. Soc. (2)***17**(1918), 25–41. (Paper 89 of Volume**I**of the*Collected Papers*.) - [28]
B. D. McKay: Applications of a technique for labelled enumeration,

*Congressus Numerantium***40**(1983), 207–221. - [29]
B. D. McKay: Asymptotics for 0–1 matrices with prescribed line sums, in:

*Enumeration and Design*, pages 225–238, Academic Press, 1984. - [30]
B. D. McKay and J. C. McLeod: Asymptotic enumeration of symmetric integer matrices with uniform row sums, submitted.

- [31]
B. D. McKay and X. Wang: Asymptotic enumeration of 0–1 matrices with equal row sums and equal column sums,

*Linear Algebra Appl.***373**(2003), 273–288. - [32]
B. D. McKay and N. C. Wormald: Asymptotic enumeration by degree sequence of graphs of high degree,

*European J. Combin.***11**(1990), 565–580. - [33]
B. Morris: Improved bounds for sampling contingency tables,

*Random Structures and Algorithms***21**(2002), 135–146. - [34]
E. Ordentlich and R. M. Roth: Two-dimensional weight-constrained codes through enumeration bounds,

*IEEE Trans. Inform. Theory***46**(2000), 1292–1301. - [35]
R. C. Read: Some enumeration problems in graph theory (Doctoral Thesis), University of London, (1958).

- [36]
R. P. Stanley:

*Enumerative Combinatorics*, Vol.**1**, corrected reprint of the 1986 original, Cambridge Studies in Advanced Mathematics, vol.**49**, Cambridge University Press, Cambridge, 1997. - [37]
R. P. Stanley:

*Combinatorics and Commutative Algebra*, volume**41**of the Progress in Mathematics series, Birkhäuser, 1983. - [38]
R. P. Stanley: Decompositions of rational convex polyhedra,

*Ann. Discrete Math.***6**(1980), 333–342. - [39]
R. P. Stanley: Magic labelings of graphs, symmetric magic squares, systems of parameters, and Cohen-Macaulay rings;

*Duke Math. J.***43**(1976), 511–531.

## Author information

### Affiliations

### Corresponding author

## Additional information

Research supported by the NSA Mathematical Sciences Program.

Research supported by the Australian Research Council.

## Rights and permissions

## About this article

### Cite this article

Rodney Canfield, E., McKay, B.D. Asymptotic enumeration of integer matrices with large equal row and column sums.
*Combinatorica* **30, **655 (2010). https://doi.org/10.1007/s00493-010-2426-1

Received:

Revised:

Published:

### Mathematics Subject Classification (2000)

- 05A16
- 05C30
- 62H17