ФИЗИКО-МАТЕМАТИЧЕСКИЕ НАУКИ
УДК 512.643, 519.115.1
DETERMINANTS OF GENERALIZED BINARY BAND MATRICES D.B. EFIMOV
Department of Mathematics, Komi Science Centre, Syktyvkar, Russia [email protected]
Under binary matrices we mean matrices whose entries take one of two values. In this paper, explicit formulae for calculating the determinant of some type of binary Toeplitz matrices are obtained. Examples of the application of the determinant of binary Toeplitz matrices for the enumeration of even and odd permutations of different types are given.
Keywords: binary matrix, Toeplitz matrix, band matrix, determinant, enumeration of permutations
Д.Б. ЕФИМОВ. ОПРЕДЕЛИТЕЛИ ОБОБЩЕННЫХ БИНАРНЫХ ЛЕНТОЧНЫХ МАТРИЦ
Под бинарными матрицами мы понимаем матрицы, элементы которых принимают одно из двух значений. Матрицы такого типа возникают в различных как чисто математических, так и прикладных задачах. Одним из основных понятий теории матриц является понятие определителя. Для вычисления определителя существуют эффективные алгоритмы, которые работают за полиномиальное время. Тем не менее в случае некоторых видов матриц для выражения определителя удается получить хорошие явные формулы, которые, с одной стороны, позволяют делать определенные выводы о свойствах матриц, с другой, дают еще больший выигрыш в скорости вычисления. В представленной работе получены такого рода явные формулы для определителей некоторых видов бинарных теплицевых матриц. Рассматриваемые матрицы близки по своей структуре к ленточным матрицам и получили в данной работе название обобщенных ленточных матриц. Одной из областей их применения является перечислительная комбинаторика. В работе приведено несколько примеров использования определителя рассматриваемых матриц для нахождения числа четных и нечетных перестановок различных типов.
Ключевые слова: бинарная матрица, теплицева матрица, ленточная матрица, определитель, перечисление перестановок
Introduction
Under binary matrices we mean matrices whose elements can take only two values. Matrices of this kind arise in different mathematical questions. For example, this type includes popular objects in mathematics and its applications such as matrices over the field GF(2) [1]. The Hadamard's problem of finding the maximal determinant of (—1,1)-matrices, i.e. matrices consisting from 1 and —1, is well known [2]. Further, (0,1)-matrices are one of the favorite objects of the enumerative combinatorics [3-6]. Also one can use binary (1, ^-matrices for enumerative problems [6]. These examples can be extended.
One of the basic notion of the matrix theory is the notion of determinant. There exist effective algorithms forthe determinant calculation, for example, the modified method of Gaussian elimination, which run in polynomial time. Nevertheless, in cases of some kinds of matrices it is possible to obtain good explicit formulae for the de-
terminant expression. On the one hand, these formulae allowto draw certain conclusions about properties of matrices. On the other hand, they give even greater gain in the speed of the determinant calculation.
Our paper is motivated to some extent by the recent work [7] in which the explicit formula for the determinant of some binary circulant matrices has been obtained. In the present paper we get explicit formulae for determinants of some kinds of binary Toeplitz matrices. Considered matrices are close in their structure to band matrices, therefore we call them generalized band matrices. For our purpose we use quite elementary methods. Applying the Laplace expansion we obtain recurrent formulae leading to the required result.
In the second section we give and prove the formulae, which allow to efficiently calculate determinants of generalized binary band matrices in an explicit form. In the third section we give a few examples of the application of the determinant of such matrices for the enumeration of even and odd permutations of different types.
1. The main part
Let n, k, l be integers, 1 < l < k < n. Consider
a binary Toeplitz matrix A following elements:
(aij) of order n with the
if - l < j - i < otherwise,
where a and b (a = b) belong to a commutative associative ring with a unit. In the case a = 0 we get a so-called band matrix ( [8], p.16). So we can say that we consider generalized binary band matrices. Our purpose is to get explicit formulae for calculating the determinant of the matrix A. We will divide this problem into two cases. Case 1. Let l = 1. In other words, let the first row of the matrix A have the form:
зЬ
and the (i + 1)-st row is obtained from the first row by the removal of i elements on the right and addition of i elements a on the left:
( b ... b b ... b b ...
A
\
V
(1)
b
Theorem 1. Let n = p (mod k), where 0 < p < k. Then the determinant of the matrix (1) is equal to:
det A = (b - a)
n— 1
(b +
(2)
For the proof of Theorem 1 one can apply the method given in [7] for the proof of explicit formulae of the determinants of circulant matrices (using the formula of the determinant of a 2 x 2 block matrix). But in this case another method will be more convenient. First let us formulate some auxiliary statements. Consider a square matrix of order n of the form:
f b ... b
b ... b a
b ... b
a
a a a
(3)
a
The given matrix is obtained from the matrix (1) of order (n — 1) by addition of one more (the last) row and one more (the last) column, consisting entirely of elements a. Let fn denote the determinant of such matrix. Lemma 1. The determinant of the matrix (3) is equal to:
fn = (b - a)
n-1
a.
(4)
Proof. Subtracting the penultimate row from the last row and expanding the determinant along the last row, we get that fn = (b — a)fn-i. Using the given formula consecutively to fn-i, fn-2 and so on, we get (4). □
Suppose that k = n, i.e. consider the matrix of order n of the form:
b
V
b b b
b
(5)
By gn denote the determinant of such matrix. Lemma 2. One can calculate the determinant of the matrix (5) by the formula:
gn = (b - a)n-1b.
(6)
Proof. Similarly to the proof of the previous lemma. □
Consider the matrix (1) of order n with k < n. Let dn denote the determinant of such matrix. Lemma 3. The following equality holds:
dn —
(b - a)kdn-k + (b -(b - a)n-1(b + a),
n1
к < n; к > n.
(7)
Proof. Let k < n, i e. the number of elements b in the first row of the matrix (1) is less than the number of elements a. Let us subtract the penultimate row of the matrix from the last row and expand the determinant along the last row. Performing this procedure consecutively k times, we come to the equality:
dn = (b — a)k dn-k + (b — a)k fn-k ■
Substituting here the formula (4), we get the first row of the equality (7).
Let n < k, i.e. the number of elements b in the first row of the matrix (1) is more or equal to the number of elements a, but less than n. Executing the same k consecutive expansions along the last row as in the first case, we come to the equality:
dn = (b — a)k (fn-k + gn-k )■
Substituting here the formulae (4) and (6), we get the second row of (7). □
Proof. (of the Theorem 1). Suppose that n = p (mod k), where 0 < p < k, i.e. n = km + p, where m is a non-negative integer. Assume that k < n. Then m > 0 and, using the first row of the formula (7) recurrently m — 1 times, we obtain the equality:
dn = (b - a)n- pdk+p +(m - l)(b - a)
n- 1
a.
Since < k, then applying the second row of the formula (7) to dk+p and performing obvious transformations, we get (2).
If k = n, i.e. the first row of the matrix (1) entirely consists from elements b, then p = n and the formula (2) gives us dn = (b — a)n-lb, which corresponds to the statement of the Lemma 2. □
к
a
a
a
b
b
a
b
a
b
a
a
a
a
a
Case 2. Let l > 1. matrix A, i = 1,..
In other words, let the i-th row of the ., l, have the form:
k+i-1
[6 ... b a ... a],
and the (l + j)-th row is obtained from the l-th one by the removal of j elements on the right and addition of j elements a on the left:
and second rows differ also only in the (k + 1)-st column. Performing this procedure l — 1 times, we obtain that det A = (—1)(k-1)(l-1)(b — a)'-1 det A'', where
/ b ... b
( b
A
b
\
A"
V
b
(8)
V
\
b
b
b
The matrix A is not symmetric in general, but it is per-symmetric (i.e. symmetric with respect of the secondary diagonal) like all Toeplitz matrices. Lemma 4. In the matrix (8) exactly max (k + l — n, 0) rows consist entirely from elements b. Proof. First note that each row of the matrix A contains no more than k + l — 1 elements b by definition. Let k +1 — n < 0. Hence k +1 — 1 < n, i.e. there is at least one element a in each row and there are no rows, consisting entirely from elements b. Let now k+1—n > 0 or, alternatively, k +1 — 1 > n. If n = k + i — 1, 1 < i < l, then the number of rows, that consist entirely from elements b, will be equal to l — i + 1 = k + l — n. □
The part of the matrix A' that is located above the horizontal line consists from k rows, and in the first row there are exactly k elements b. In the lower right corner of the matrix A'' there is a submatrix, which is formed by intersection of the last n — k — l + 1 rows and columns of A. The given submatrix, in turn, also has the form (8).
The algorithm can be repeated s times with an obvious shift at each step in the k rows down and in the k columns to the right. Thus in the second step we subtract the (k + 1)-st row of the matrix A'' from the (k + 2)-nd one and expand the determinant along the (k + 2)-nd row, and repeat this procedure l — 1 times and so on. As a result we will get that
det A = (—1)(k-1)(l-1)s(b — a)(l-1)s det A''', (10)
where
Theorem 2. Let 1 < l < k < n (mod k + l - 1), 0 < p < k + l - 1. terminant ofthe matrix (8) is equal to:
and n = p Then the de-
t b ... b
(-1)г> (b a) , p = 0, A = b
(-iy(n-1)p (b + n-1 a) , p =1, (9) a
0, P> 1, b
where
\
M
5
(k - 1)(l - 1) k + l - 1 '
p = (b - a)n-1, а = k + l - 1.
Proof. By the theorem condition n > 2. Let n = p (mod k + l — 1), 0 < p < k + l — 1. This is equivalent to n = (k + l — 1)s + p, where s is a non-negative integer.
First consider the case when s = 0, i.e. when p = n and, respectively, n < k + l — 1. By lemma 4 at least 2 rows ofthe matrix A will consist entirely from elements b in this case, therefore the determinant of the matrix A will be equal to 0, that corresponds to the formula (9).
Now assume that s > 1. The first row of the matrix A differs from the second one only by an element in the (k + 1)-st column. Let us subtract the first row from the second one and expand the determinant along the second row. We will get that det A = (—1)k-1(b — a) det A', where A' is a matrix, whose first
The part ofthe matrix A''' that is located above the horizontal line consists from ks rows, and in the first row there are exactly k elements b. In the lower right corner ofthe matrix A'' there is a submatrix M, which is formed by intersection ofthe last n — (k +1 — 1)s = p rows and columns of the matrix A.
It is not hard to see that if 1 < p < k +1 — 1 then M contains two identical rows, hence the matrix A''' also contains two identical rows, and therefore its determinant and the determinant of the matrix A are equal to 0.
If p = 0 then the matrix A''' is the matrix ofthe form (1) of order ks. Then by Theorem 1 we get:
det A''' = (b - a)
ks-1
/ ks - k \ [b +—a)
= (b — a)ks-1 [b + (s — 1)a] . Then, substituting the given formula in (10) and taking
a
b
b
a
b
a
a
b
a
b
a
a
a
a
a
into account that n = (k + l — 1)s, we finally obtain:
det A =
= (—i)(k-i)(i-i)s(b — a)(k+i-i)s-i [b + (s — i)a]
(fc-i)g-iw ^n-if, n — k — l + 1
= (—1) (b—a)nl\ b + k + l — 1 <
If p = 1 then the matrix A!" will be the matrix of the form (1) of order ks + 1. Then from Theorem 1 we get:
det A"
(b - b + kS - 1 a
к
(b - a)ks(b + sa).
Then, substituting the given formula in (10) and taking into account that n = (k +1 — 1)s + 1, we finally obtain:
det A = (-1)(k-1)(l-1)s(b - a)(k+l-1)s(b + sa)
n — 1
(k-l)(l-l)(n-l)
(-1) k+l-1 (b-a)
n— 1
b +
к + l - 1
□
2. The application of determinants of binary matrices to the enumeration of permutations
As mentioned in the Introduction, the binary matrices are one of the favorite objects of the enumerative combinatorics. In particular, they are applied for enumeration of permutations with restricted positions. Following [6] let us describe briefly this mechanism.
Let A = (aij) be a (0,1)-matrix of order n. Each of such matrices defines a class B(A) of restricted permutations. Namely a permutation p belongs to B(A) if and only if the inequality Mp < A holds for its incidence matrix Mp, i.e. each element of the matrix Mp is not more than the corresponding element of the matrix A. The matrix A is called the characteristic matrix of the class B(A). It is not hard to see that the number of permutations in the class B(A) is equal to the permanent of the matrix A: |B(A)| = per A. By EA and OA denote the number of even and odd permutations from the class B(A), respectively. It is obvious that EA + OA = per A. It is easy to see also that EA—OA = det A. This implies the following formulae for calculating the total number of even and odd permutations from the class B(A):
E
A
per A + det A 2 '
O
A
per A - det A
(11)
As an example we calculate the number of even and odd permutations n e Sn such that n(i) = i,i + 1 for i = 1,.. .n — 1 and n(n) = n. The characteristic matrix of this class of permutations is the following (0,1)-matrix An of order n:
An
/00 \ 0 0 1
00 0
Such matrices arise in the variation of the famous ménage problem, where not a round table, but one side of a rectangular table is considered ( [5], ch. 8).
If we denote the permanent of such matrix by pn, then the sequence of permanents will satisfy the following recurrence relation:
(n — 1)pn = (n2 — n — 1)pn-l + npn-2 + 2( — 1)n+1, Pi = p2 = 0.
One can also calculate these permanents by the following explicit formula:
Pn =
£ (27k)
k=0 4 7
(n - k)!(—1)k.
Let dn denote the determinant of the matrix An
Substituting b get
0,
1, к = 2 to the formula (2), we
dn = (—1)n-1 n1—P, n = p (mod 2), 0 <p < 2.
One can also rewrite this equality in the following form:
n1
dn = (-1)
n- 1
n-1 2
n-2 2 '
if n - odd; if n - even.
Applying formulae (11), we obtain sequences of the number of even (en) and odd (on) permutations of the given type depending on the permutation order:
n 1 2 3 4 5 6 7 8
Pn 0 0 1 3 16 96 675 5413
dn 0 0 1 -1 2 -2 3 -3
en 0 0 1 1 9 47 339 2705
On 0 0 0 2 7 49 336 2708
As a second example, we will calculate the number of even and odd permutations n e Sn such that ln(i) — il > 1, i = 1,... ,n. The characteristic matrix of the given class of permutations is the matrix of order n Bn whose main diagonal and its neighboring diagonals are zero, and all other elements are equal to 1:
Bn
0 0
\
\
0 0
This example is linked with another variation of the ménage problem, where a rectangular table is considered and additional restriction on the placement of men is imposed. The explicit formula of the total number of such permutations of order n or, alternatively, of the value of the permanent of Bn was found by V.S. Shevelev (see the review [6]). Here we will not give it, but indicate only that the sequence {p'n} of such numbers has the id-number A001883 in [9]. Let d!n denote the determinant of the matrix Bn. Substituting b = 0, a =1, k = l = 2 to the formula (9), we get
—, if p = 0; d'n =4 n-i, if p = 1; 0, if p = 2,
a
1
0
1
0
where n = p (mod 3). Applying formulae (11), we ob- and we get the following table: tain sequences of the number of even (e'n) and odd (o'n) permutations of the given type depending on the permutation order:
n 1 2 3 4 5 6 7 8
p'n 0 0 0 1 4 29 206 1708
d'n 0 0 0 1 0 -1 2 0
e en 0 0 0 1 2 14 104 854
o'n 0 0 0 0 2 15 102 854
Another version of the application of binary matrices to enumeration of permutations has been described also in [6]. It consists in the following. Let us consider a binary matrix A of order n in which some elements are equal to the variable b, and other elements are equal to 1. It is easy to see that the coefficient on bk in the permanent per A will be equal to the number of permutations n e Sn whose incidence matrices have exactly k units in the positions, in which there are elements b in the matrix A. Respectively, the coefficient on bk in the determinant det A will be equal to the difference between the number of even and odd permutations of such type. Then calculating in expressions 1 (det A ± per A) the coefficient on bk, we get the number of even and odd permutations of such kind.
Let us give an example of the application of this scheme. Let n be a permutation. Recall that a number i for which n(i) > i is called a weak excedance of n ( [10], p. 40). Let us find the number of even and odd permutations of order n with exactly k weakexcedances. Consider a binary matrix of order n Cn whose elements on the main diagonal and above it are equal to b, and other elements are equal to 1:
/ b b b ... b \ b b . .. b
b ... b
Cn
1
V
4
It is well known ( [10], p. 39-40) that the permanent of this matrix is equal to the Eulerian polynomial of order n, and, respectively, the coefficient on bk is equal to the Eulerian number T(n, k) (A008292 in [9]). By the formula (2) we get that det Cn = (b - 1)n_1b. It follows that the coefficient on bk in det Cn is equal to:
c(n,k) = (-1)
n—k
(n - 0-
Hence the number of even and odd permutations of order n with exactly k weak excedances is equal to:
en,k
on,k
1 (t (n,k) + (-1)n-k/n 1
2 (T(n,k) - (-1)n-k
k-1 n - 1 k1
Let, for example, k = 2. Then
en,2 = 2(T(n, 2) + (—1)n(n - 1)), On,2 = 1(T(n, 2) - (-1)n(n - 1))
n 1 2 3 4 5 6 7 8
T (n, 2) 0 1 4 11 26 57 120 247
c(n, 2) 0 1 -2 3 -4 5 -6 7
en,2 0 1 1 7 11 31 57 127
on,2 0 0 3 4 15 26 63 120
Let us write out all permutations of order 4 with 2 weak excedances: 1423, 2143, 2413, 3124, 3142, 3412, 3421, 4132, 4213, 4312, 4321 — total 7 even and 4 odd permutations (weak excedances are in bold, even permutations are underlined).
The study is supported by Program of UD RAS, project 15-16-1-3.
Acknowledgment. The author is grateful to V.S. Shevelev for useful pointers to the literature and comments.
References
1.
Boston N. Spaces of constant rank matrices over GF(2) // Electronic Journal of Linear Algebra.
2010. Vol. 20. P. 1-5.
Seberry J., Xia T., Koukouvinos C., Mitrouli M. The maximal determinant and subdeterminants of ±1 matrices // Linear Algebra and its Applications. 2003. Vol. 373. P. 297-310. Brualdi R. A., Ryser H. J. Combinatorial matrix theory. Cambridge University Press, 1991. Mine H. Permanents. Reading, MA: Addison-Wesley, 1978.
Ryser H. J. Combinatorial Mathematics. Mathematical Association of America, 1963. Shevelev V. S. Some problems of the theory of enumerating the permutations with restricted position // Journal of Soviet Mathematics. 1992. Vol. 61(4). P. 2272-2317. Kravvaritis Ch. Determinant evaluations for binary circulant matrices // Special Matrices. 2014. Vol. 2. P. 187-199.
Golub J. H., Van Loan C. F. Matrix computations. The Johns Hopkins University Press, 1996.
Sloane N. J. A. The On-Line Encyclopedia of Integer Sequences. Available at http://oeis.org/ 10. Stanley R. P. Enumerative Combinatorics. Vol. 1. Cambridge University Press, 2nd edition,
2011. 642 p.
Литература
1. Boston N. Spaces of constant rank matrices over GF(2) // Electronic Journal of Linear Algebra. 2010. Vol. 20. P. 1-5.
2. Seberry J., Xia T., Koukouvinos C., Mitrouli M. The maximal determinant and subdeterminants of ±1 matrices // Linear Algebra and its Applications. 2003. Vol. 373. P. 297-310.
3. Brualdi R. A., Ryser H. J. Combinatorial matrix theory. Cambridge University Press, 1991.
4. Минк X. Перманенты. M.: Мир, 1982.
5. Райзер Г. Дж. Комбинаторная математика. М.: Мир, 1965.
2.
3.
4.
5.
6.
7.
8.
9.
6. Шевелев В. С. Некоторые вопросы теории перечисления перестановок с ограниченными позициями. Итоги науки и техники. Серия «Теория вероятностей. Математическая статистика. Теоретическая кибернетика». T.30. М.: ВИНИТИ, 1992. C. 113-177.
7. Kravvaritis Ch. Determinant evaluations for binary circulant matrices // Special Matrices. 2014. Vol. 2. P. 187-199.
8. Golub J. H., Van Loan C. F. Matrix computations. The Johns Hopkins University Press, 1996.
9. Sloane N. J. A. The On-Line Encyclopedia of Integer Sequences. Available at http://oeis.org/
10. Стэнли P. Перечислительная комбинаторика. M.: Мир, 1990.
Статья поступила в редакцию 01.10.2016.