Generating functions and counting symmetric (0,1) matrices
DOI:
https://doi.org/10.14393/BEJOM-v7-2026-77771Keywords:
Combinatorics, generating function, matrices, counting, number theoryAbstract
In this work we will present an original solution to the problem: how many symmetric (0,1) matrices (whose entries are all equal to 0 or 1) of order n can be constructed with the additional constraint that the sum of the elements of any row is fixed for each integer 0, 1, 2, . . . , n as for example:
How many symmetric (0,1) matrices of order 5 can be constructed such that the sum of the elements in any row is equal to 2?
• How many symmetric (0,1) matrices of order 4 can be constructed such that s(1) = 2, s(2) =(3) = 3 and s(4) = 4, where s(i) indicates the sum of the elements of row i?
The strategy for solving this problem involves the use of generating functions, an extremely important tool with diverse applications, but little studied in undergraduate courses in mathematics and exact sciences. In this sense, this text aims to offer an introduction to this tool through several examples, including the problem of symmetric matrices, whose solution can be modeled by a generating function of n variables with polynomial expansion in which the coefficient of x1^{t1}...xn^{tn}, ti ∈ {0, 1, 2, . . . , n} expresses the number of matrices in which the sum of row i is equal to ti. This work was presented in the form of a minicourse, without publication in the proceedings, at the XI Bienal de Matem´atica, held in S˜ao Carlos-SP, between July 29 and August 2, 2024.
Downloads
References
Santos, J. P. O., Mello, M. P. e Murari, I. T. C. Introdução `a an´alise combinat´oria. 4ª ed. Ciˆencia Moderna, 2008. ISBN: 978-8-57-393634-6.
Grimaldi, R. P. Discrete and combinatorial Mathematics: an applied introduction. Cambridge University Press, 1976.
Stanley, R. P. Enumerative combinatorics. Vol. 1. Cambridge University Press, 1997.
Wilf, H. S. Generatingfunctionology. 3ª ed. A K Peters, Ltd., 2006.
Barvinok, A. “Matrices with prescribed row and column sums”. Em: Linear Algebra and its Applications 436 (2012), pp. 820–844.
Greenhill, C. e McKay, B. D. “Asymptotic enumeration of sparse nonnegative integer matrices with specified row and column sums”. Em: Advances in Applied Mathematics 41 (2008), pp. 459–481.
Mcleod, J. C. e McKay, B. D. “Asymptotic enumeration of symmetric integer matrices with uniform row sums”. Em: Journal of the Australian Mathematical Society 92 (2012), pp. 367–384.
Andrews, G. E. The theory of partitions. Cambridge University Press, 1998.
Santos, J. P. O. Introdução `a teoria dos n´umeros. 3ª ed. Rio de Janeiro: IMPA, 2020. ISBN: 978-8-52-440496-2.
Downloads
Published
Issue
Section
License
Copyright (c) 2026 Carlos Eduardo de Oliveira, José Plínio Oliveira Santos

This work is licensed under a Creative Commons Attribution 4.0 International License.
- Articles published from 2025 onwards are licensed under the CC BY 4.0 license. By submitting material for publication, authors automatically agree to the journal’s editorial guidelines and affirm that the text has been properly reviewed. Simultaneous submission of articles to other journals is prohibited, as is the translation of articles published in this journal into another language without proper authorization.
- Articles published prior to 2025 are licensed under the CC BY-NC 4.0 license.






