Avoiding Some 01 Matrices
Avoiding Some 01 Matrices
Seunghyun Seo
Department of Mathematics
Chonnam National University,
Kwangju 500-757, South Korea
Abstract
We enumerate the number of (0, 1)-matrices avoiding 22 submatrices satisfying
certain conditions. We also provide corresponding exponential generating functions.
Introduction
Let M(k, n) be the set of k n matrices with entries 0 and 1. It is obvious that the
number of elements in the set M(k, n) is 2kn . It would be interesting to consider the
number of elements in M(k, n) with certain conditions. For example, how many matrices
of M(k, n) do not have 2 2 submatrices of the forms ( 10 10 ) and ( 01 01 )? In this article we
will give answers to the previous question and other questions.
Consider M(2, 2), the set of all possible 2 2 submatrices. For two elements P and
Q in M(2, 2), we denote P Q if Q can be obtained from P by row or column exchanges. It is obvious that is an equivalence relation on M(2, 2). With this equivalence
relation, M(2, 2) is partitioned with seven equivalent classes having the following seven
representatives.
1 0
1 1
1 0
,
, C=
, =
I=
0 0
1 0
0 1
1 1
1 0
1 1
0 0
T =
, L=
, J=
, O=
.
0 0
1 0
1 1
0 0
Here C, T , and L mean corner, top, and left, respectively. Let S be the set of
these representatives, i.e.,
S := {I, , C, T, L, J, O}.
Given an element S in S, a matrix A is an element of the set M(S) if and only if for
every permutation 1 of the rows and 2 of the columns, the resulting matrix does not
have the submatrix S. Equivalently, A M(S) means that A has no submatrices in the
equivalent class [S]. For a subset of S, M() is defined by the set S M(S). Note that
the definition of M(S) (also M()) is different from that in [13, 17]. If A belongs to M(),
then we say that A avoids . We let (k, n; ) be the number of k n (0, 1)-matrices in
M().
Our goal is to express (k, n; ) in terms of k and n explicitly for each subset of
the set S. For || = 1, We can easily notice that (k, n; ) = (k, n; C) and (k, n; J) =
(k, n; O) by swapping 0 and 1. We also notice that (k, n; T ) = (n, k; L) by transposing
the matrices. The number (k, n; I) is well known (see [2, 7, 8]) and (0, 1)-matrices
avoiding type I are called (0, 1)-lonesum matrices (we will define and discuss this in 2.2).
In fact, lonesum matrices are the primary motivation of this article and its corresponding
work. The study of M(J) (equivalently M(O)) appeared in [9, 13, 17], but finding a closed
form of (k, n; J) = (k, n; O) is still open. The notion of -free matrix was introduced
by Spinrad [16]. He dealt with a totally balanced matrix which has a permutation of the
rows and coluums that are -free. We remark that the set of totally balanced matrices is
different from M().
In this paper we calculate (k, n; ), where s are {} (equivalently {C}) and {T }
(equivalently {L}). We also enumerate M() where s are {, C}, {T, L}, and {J, O}.
For the other subsets of S, we discuss them briefly in the last section. Note that some
of our result (subsection 3.5) is an independent derivation of some of the results in [11,
section 3] by Kitaev et al.; for other relevant papers see [10, 12].
2
2.1
Preliminaries
Definitions and Notations
A matrix P is called (0, 1)-matrix if all the entries of P are 0 or 1. From now on we
will consider (0, 1)-matrices only, so we will omit (0, 1) if it causes no confusion. Let
M(k, n) be the set of k n-matrices. Clearly, if k, n 1, M(k, n) has 2kn elements.
For convention we assume that M(0, 0) = {} and M(k, 0) = M(0, n) = for positive
integers k and n.
Given a matrix P , a submatrix
rows and columns
P is formed by selecting certain
a b c of
d
f
h
from P . For example, if P = e f g h , then P (2, 3; 2, 4) = j l .
i j k l
Given two matrices P and Q, we say P contains
Q is equal to a submatrix
Q, whenever
1 0 1
of P . Otherwise say P avoids Q. For example, 0 0 1 contains ( 01 10 ) but avoids ( 10 01 ).
1 0 0
For a matrix P and a set of matrices, we say that P avoids the type set if P avoids
all the matrices in . If it causes no confusion we will simply say that P avoids .
2
XX
(k, n; )
n0 k0
XX
xk y n
xk y n
(k, n; )
=1+
.
k! n!
k! n!
n1 k1
(n, n; )
n0
zn
.
n!
Given f, g C[[x, y]], we denote f = g if the coefficients of xk y n in f and g are the same,
for each k, n 2.
2.2
1 0 0
Theorem 2.1 (Brewbaker [2]). A matrix is a lonesum matrix if and only if it avoids I.
Theorem 2.1 implies that (k, n; I) is equal to the number of k n lonesum matrices.
Definition 2.2. Bernoulli number Bn is defined as following:
X
Bn
n0
xn
x ex
= x
.
n!
e 1
n
X
(1)m+n
m=0
m! S(n, m)
,
m+1
where S(n, m) is the Stirling number of the second kind. The poly-Bernoulli number,
introduced first by Kaneko [7], is defined as
X
n0
Bn(k)
Lik (1 ex )
xn
=
,
n!
1 ex
P
xm
where the polylogarithm Lik (x) is the function Lik (x) := m1 m
k . Bernoulli numbers
are nothing but poly-Bernoulli numbers with k = 1. Sanchez-Peregrino [15] proved that
(k)
Bn has the following simple expression:
min(k,n)
Bn(k)
m=0
Brewbaker [2] and Kim et. al. [8] proved that the number of k n lonesum matrices
(k)
is the poly-Bernoulli number Bn , which yields the following result.
Proposition 2.3 (Brewbaker [2]; Kim, Krotov, Lee [8]). The number of k n matrices
(k)
avoiding I is equal to Bn , i.e.,
min(k,n)
(k, n; I) =
(1)
m=0
(x, y; I) = e
ex+y
[(e 1)(e 1)] = x
.
e + ey ex+y
m0
x
(2)
(n, n; I)
n0
XX
zn
zn
=
(1)m+n m!S(n, m)(m + 1)n
n!
n!
n0 m0
X
X
((m + 1)z)n
=
(1)m m!
S(n, m)
n!
m0
n0
X
=
(1 e(m+1)z )m .
(3)
m0
3
3.1
Main Results
-avoiding matrices (or C)
By row exchange and column exchange we can change the original matrix into a block
matrix as in Figure 1. Here [0] (resp. [1]) stands for a 0-block (resp.1-block) and [0 ]
stands for a 0-block or an empty block. Diagonal blocks are [1]s except for the last block
[0 ], and the off-diagonal blocks are [0]s.
Theorem 3.1. The number of k n matrices avoiding is given by
min(k,n)
(k, n; ) =
m=0
(4)
[1]
[0]
[0]
[0*]
[0]
[1]
[0]
[0*]
[0]
[0]
[1]
[0*]
[0*]
[0*]
[0*]
[0*]
2
4
[0]
[0]
[1]
[0]
= 4/135/26/7
= 25/6/378/149
[1]
[0]
[0]
[0]
= 3124
[0]
[1]
[0]
[0]
[0]
[0]
6
7
M=
[0]
[0]
X 1 X
xk X
yn
m! S(k + 1, m + 1)
m! S(n + 1, m + 1)
m! k0
k! n0
n!
m0
X 1
ex (ex 1)m ey (ey 1)m
=
m!
m0
= exp[(ex 1)(ey 1) + x + y] .
(6)
3.2
{, C}-avoiding matrices
Given the equivalence relation on M(2, 2), which is defined in Section 1, if we define
the new equivalent relation P Q by P Q or P ( 11 11 ) Q, then [] [C] becomes a
single equivalent class. Clearly (k, n; {, C}) is the number of k n (0, 1)-matrix which
does not have a submatrix in [] [C]. From now on we simply write (k, n; , C), instead
of (k, n; {, C}). The reduced form of a matrix M avoiding {, C} is very simple as in
Figure 3. In this case if the first row and the first column of M are determined then the
rest of the entries of M are determined uniquely. Hence the number (k, n; , C) of such
matrices is
(k, n; , C) = 2k+n1
(k, n 1),
(7)
and its exponential generating function is
(x, y; , C) = 1 +
1 2x
(e 1)(e2y 1) .
2
6
(8)
[1]
[1]
[0]
[1]
[0]
[1]
[0]
[0]
[1]
[0]
3.3
1 4z
(e + 1) .
2
(9)
Given a (0, 1)-matrix, 1-column (resp. 0-column) is a column in which all entries consist
of 1s (resp. 0s). We denote a 1-column (resp. 0-column) by 1 (resp. 0). A mixed
column is a column which is neither 0 nor 1. For k = 0, we have (0, n; T ) = 0,n . In
case k 1, i.e., there being at least one row, we can enumerate as follows:
case 1: there are no mixed columns. Then each column should be 0 or 1. The
number of such k n matrices is 2n .
case 2: there is one mixed column. In this case each column should be 0 or 1 except
for one mixed column. The number of k n matrices of this case is 2n1 n (2k 2).
case 3: there are two mixed columns. As in case 2, each column should be 0 or 1
except for two mixed columns, say, v1 and v2 . The number of k n matrices of this
case is the sum of the following three subcases:
- v1 + v2 = 1 : 2n2 n2 2! S(k, 2)
- v1 + v2 has an entry 0 : 2n2 n2 3! S(k, 3)
- v1 + v2 has an entry 2 : 2n2 n2 3! S(k, 3)
Adding up all numbers in the previous cases yields the following theorem.
(10)
Proof.
n
k
n2 n
( 2! S(k, 2) + 3! 2 S(k, 3) )
(2 2) + 2
(k, n; T ) = 2 + 2
2
1
n
X
nm+1 n
( m! S(k, m) + (m + 1)! S(k, m + 1) )
+
2
m
m=3
n
X
nm n
m!S(k + 1, m + 1) + (n2 n 4) 2n2 n(n + 3) 2n+k3
= 2
2
m
m=0
X
n
lk + (n2 n 4) 2n2 n(n + 3) 2n+k3.
= 2
l1
l1
n
n1
1
k! n!
n1 k1
l1
XX
xk y n X X
xk y n
n(n + 3) 2n+k3
k! n! n1 k1
k! n!
n1 k1
x
= 1 + 2ex (ey(e +1) 1) 2e2y + 2
1
+(ex 1) (y 2 1)e2y + 1 y(y + 2)e2y (e2x 1)
2
2
y
+
2y
y 2 2y+2 2y
x
= 2ey(e +1)+x
e2x+2y +(y 2 1)ex+2y ex
e +2 . (11)
2
2
+
(n2 n 4) 2n2
y 2 + 2y 2x+2y
e
+(y 2 1)ex+2y .
2
8
1
l1
Thus the generating function (n, n; T ) is given by
X
X X n + 1
zn
zn
(n, n; T )
ln+1
= 2
n!
l
(n + 1)!
n0
n0
l1
+
4
n!
8
n!
n0
=
=
2 X (lz)l X (lz)nl+1
+ (z 2 1)e2z 2z(z + 1)e4z
z l1 l! nl1 (n l + 1)!
2 X ll z l
(ze ) + (z 2 1)e2z 2z(z + 1)e4z
z l1 l!
2
(zez W (zez )) + (z 2 1)e2z 2z(z + 1)e4z
z
2 W (zez )
=
+ (z 2 1)e2z 2z(z + 1)e4z ,
z
z + z W (ze )
=
where
W (x) :=
X
n1
(n)
(12)
n
n1 x
n!
is the Lambert W -function which is the inverse function of f (W ) = W eW . See [3] for
extensive study about the Lambert W -function.
Remark 2. The sequence (n, n; T ) is not listed in the OEIS [14]. The first few terms
of (n, n; T ) (0 n 9) are as follows:
1, 2, 14, 200, 3536, 67472, 1423168, 34048352, 927156224, 28490354432, . . .
3.4
Given the equivalence relation on M(2, 2), which is defined in Section 1, if we define
the new equivalent relation P Q by P Q or P Qt , then [T ] [L] becomes a single
equivalent class. Clearly (k, n; {T, L}) is the number of k n (0, 1)-matrix which does
not have any submatrix in [T ] [L]. By the symmetry of {T, L}, we have
(k, n; T, L) = (n, k; T, L).
So it is enough to consider the case k n. For k 2 or n 1, we have
(1, n; T, L) = 2n ,
(0, n; T, L) = 0,n ,
Given a (0, 1)-vector v with a length of at least 3, v is called 1-dominant (resp. 0dominant) if all entries of v are 1s (resp. 0s) except one entry.
Theorem 3.3. For k 3 and n 2, the number of k n matrices avoiding {T, L} is
equal to twice the number of rook positions in the k n chessboard. In other words,
min(k,n)
X
n
k
(k, n; T, L) = 2
m! .
(13)
m m
m=0
Proof. Suppose M is a k n matrix avoiding {T, L}. It is easy to show each of the
following steps:
(i) If M has a mixed column v, then v should be either 0-dominant or 1-dominant.
(ii) Assume that v is 0-dominant. This implies that other mixed columns(if any) in M
should be 0-dominant.
(iii) Any non-mixed column in M should be a 0-column.
(iv) The location of 1s in M corresponds to a rook position in the k n chessboard.
If we assume v is 1-dominant in (ii) then the locations of 0s again corresponds to a rook
position. The summand of RHS in (13) is the number of rook positions in the k n
chessboard with m rooks. This completes the proof.
The generating function (x, y; T, L) is given by
(xy)2
2
x
y
2xy + 3 2e 2e + x(ey 2y 1)(ey 1) + y(ex 2x 1)(ex 1).
(x, y; T, L) = 2exy+x+y
(14)
Here the crucial part of the equation (14) can be obtained as follows:
!
!
!
X X k n
X
X n yn
X k xk
xk y n
m!
=
m!
m m
m k!
m n!
k! n!
m0
n0
k,n0 m0
k0
X
ym y
xm x
= exp(xy + x + y).
e
e
=
m!
m!
m!
m0
2
(x, y; T, L) = 2exy+x+y
(xy)2
.
2
2 e 1z
1 2z z 2 .
(z; T, L) =
1z
(15)
!
z
n 2
X
n
zn
e 1z
m!
=
,
m
n!
1
z
m=0
3.5
Recall the equivalence relation defined in subsection 3.2. With this relation, {J, O}
becomes a single equivalent class. Due to the symmetry of {J, O} it is obvious that
(k, n; J, O) = (n, k; J, O).
The k-color bipartite Ramsey number br(G; k) of a bipartite graph G is the minimum
integer n such that in any k-coloring of the edges of Kn,n there is a monochromatic
subgraph isomorphic to G. Beineke and Schwenk [1] had shown that br(K2,2 ; 2) = 5.
From this we can see that
(k, n; J, O) = 0 (k, n 5) .
For k = 1 and 2, we have
(1, n; J, O) = 2n ,
Note that the sequence (n2 + 3n + 4) 2n2 appears in [14, A007466] and its exponential
generating function is (1 + x)2 e2x .
For k 3, we have
(3, n; J, O) = (4, n; J, O) = 0
(5, n; J, O) = (6, n; J, O) = 0
(k, n; J, O) = 0
for n 7,
for n 5,
for k 7 and n 3.
For exceptional cases, due to the symmetry of {J, O}, it is enough to consider the
followings:
(3, 3; J, O) = 156, (3, 4; J, O) = 408, (4, 4; J, O) = 840,
(3, 5; J, O) = (3, 6; J, O) = (4, 5, J, O) = (4, 6; J, O) = 720 .
The sequence (k, n; J, O) is listed in Table 1. Note that Kitaev et al. have already calculated (k, n; J, O) in [11, Proposition 5], but the numbers of (3, 3; J, O) and (4, 4; J, O)
are different with ours.
11
kn
1
2
3
4
5
6
7
..
.
1
2
2
4
4
14
8
44
16 128
32 352
64 928
128 2368
..
..
.
.
3
8
44
156
408
720
720
0
0
4
5
6
7
16 32 64 128
128 352 928 2368
408 720 720
0
0
840 720 720
0
0
720 0
0
0
0
720 0
0
0
0
0
0
0
0
0
0
(17)
Concluding remarks
Table 2 summarizes our results (except the I-avoiding case). Due to the amount of
difficulty, we are not able to enumerate the number (k, n; J), hence (k, n; O). Note
that (k, n; J) is equal to the following:
(a) The number of labeled (k, n)-bipartite graphs with girth of at least 6, i.e., the
number of C4 -free labeled (k, n)-bipartite graphs, where C4 is a cycle of length 4.
(b) The cardinality of the set {(B1 , B2 , . . . , Bk ) : Bi [n] i, |Bi Bj | 1 i 6= j}.
For the other subsets of S which is not listed in Table 2, we have calculated (k, n; )
in [6]. Note that if the size of increases then enumeration of M() becomes easier.
For further research, we suggest the following problems.
1. In addition to (0, 1)-matrices, one can consider (0, 1, . . . , r)-matrices with r 2.
2. Consideration of the results of adding the line sum condition to each individual case
given in the first column of Table 2.
12
I
(or C)
{, C}
T (or L)
{T, L}
J (or O)
{J, O}
(k, n; ) (x, y; )
(z; )
(1)
(2)
(3)
(4)
(6)
complicated
(7)
(8)
(9)
(10)
(11)
(12)
(13)
(14)
(15)
unknown unknown
unknown
Table 1
(16)
(17)
Acknowledgement
The Authors are thankful to Sergey Kitaev in the University of Strathclyde for his helpful
comments and suggestions.
References
[1] L. W. Beineke and A. J. Schwenk, On a bipartite form of the Ramsey problem,
Proceedings of the 5th British Combinatorial Conference, 1975, Congr. Numer. XV
(1975).
[2] C. Brewbaker, A combinatorial interpretation of the poly-Bernoulli numbers and two
Fermat analogues, Integers, 8, A02 (2008).
[3] R. M. Corless, G. H. Gonnet, D. E. G. Hare, D. J. Jeffrey, and D. E. Knuth, On the
Lambert Function, Adv. Comput. Math., 5, 329359 (1996).
[4] P. Flajolet and R. Sedgewick, Analytic Combinatorics, Cambridge University Press
(2009).
[5] R. Graham, D. Knuth, and O. Patashnik, Concrete Mathematics, 2nd ed., AddisonWesley (1994).
[6] H.-K. Ju and S. Seo, Counting (0, 1)-matrices avoiding of size greater than 1,
Preprint, available at: http://shseo.info/.
[7] M. Kaneko, Poly-Bernoulli numbers, Journal de Theorie des Nombres de Bordeaux,
9, 221228 (1997).
[8] H.-K. Kim, D. Krotov, and J.-Y. Lee, Poly-Bernoulli numbers and lonesum matrices,
availabe at: arXiv:1103.4884v1
[9] J.-R. Kim, U. Peled, I. Perepelitsa, V. Pless, and S. Friedland, Explicit construction of
families of LDPC codes with no 4-cycles, IEEE Transactions on Information Theory,
50(10), 23782388 (2004).
13
14