Chapter 15

Binary Matrices

[12/67%]
Show
LaTeX
Problem 15.1.1

Consider the four 2×22 \times 2 binary matrices

A=(1100),B=(0101),C=(1010),D=(0011) A = \begin{pmatrix} 1 & 1 \\ 0 & 0 \end{pmatrix}, \quad B = \begin{pmatrix} 0 & 1 \\ 0 & 1 \end{pmatrix}, \quad C = \begin{pmatrix} 1 & 0 \\ 1 & 0 \end{pmatrix}, \quad D = \begin{pmatrix} 0 & 0 \\ 1 & 1 \end{pmatrix}

with the underlying field F\mathbb {F}, char⁡(F)=2\operatorname {char}(\mathbb {F}) = 2. Find A+B+C+DA+B+C+D and ABCDABCD.

?
Problem 15.1.2

For a 2×22 \times 2 binary matrix

A=(a11a12a21a22),ajk∈{0,1} A = \begin{pmatrix} a_{11} & a_{12} \\ a_{21} & a_{22} \end{pmatrix}, \quad a_{jk} \in \left\{ 0,1\right\}

we define the determinant as

det⁡(A)=(a11⋅a22)⊕(a12⋅a21) \operatorname {det}\left(A\right) = (a_{11} \cdot a_{22}) \oplus (a_{12} \cdot a_{21})

where ⋅\cdot is the AND-operation and ⊕\oplus is the XOR-operation.

?
(i)

Find the determinant for the following 2×22 \times 2 matrices

(1001),(0110),(1101),(0111),(1011),(1110). \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix}, \quad \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix}, \quad \begin{pmatrix} 1 & 1 \\ 0 & 1 \end{pmatrix}, \quad \begin{pmatrix} 0 & 1 \\ 1 & 1 \end{pmatrix}, \quad \begin{pmatrix} 1 & 0 \\ 1 & 1 \end{pmatrix}, \quad \begin{pmatrix} 1 & 1 \\ 1 & 0 \end{pmatrix}.
(ii)

Find the determinant for the following 2×22 \times 2 matrices

(0000),(1000),(0100),(1000),(0001) \begin{pmatrix} 0 & 0 \\ 0 & 0 \end{pmatrix}, \quad \begin{pmatrix} 1 & 0 \\ 0 & 0 \end{pmatrix}, \quad \begin{pmatrix} 0 & 1 \\ 0 & 0 \end{pmatrix}, \quad \begin{pmatrix} 1 & 0 \\ 0 & 0 \end{pmatrix}, \quad \begin{pmatrix} 0 & 0 \\ 0 & 1 \end{pmatrix} (1100),(1010),(0011),(0101),(1111). \begin{pmatrix} 1 & 1 \\ 0 & 0 \end{pmatrix}, \quad \begin{pmatrix} 1 & 0 \\ 1 & 0 \end{pmatrix}, \quad \begin{pmatrix} 0 & 0 \\ 1 & 1 \end{pmatrix}, \quad \begin{pmatrix} 0 & 1 \\ 0 & 1 \end{pmatrix}, \quad \begin{pmatrix} 1 & 1 \\ 1 & 1 \end{pmatrix}.
Problem 15.1.3

The determinant of a 3×33 \times 3 matrix A=(ajk)A = (a_{jk}) is given by

a11a22a33+a12a23a31+a13a21a32−a13a22a31−a11a23a32−a12a21a33. a_{11}a_{22}a_{33} + a_{12}a_{23}a_{31} + a_{13}a_{21}a_{32} - a_{13}a_{22}a_{31} - a_{11}a_{23}a_{32} - a_{12}a_{21}a_{33}.

For a binary matrix BB we replace this expression by

det⁡(B)=(b11⋅b22⋅b33)⊕(b12⋅b23⋅b31)⊕(b13⋅b21⋅b32)⊕(b13⋅b22⋅b31)⊕(b11⋅b23⋅b32)⊕(b12⋅b21⋅b33). \begin{split} \operatorname {det}\left(B\right) = {} & (b_{11} \cdot b_{22} \cdot b_{33}) \oplus (b_{12} \cdot b_{23} \cdot b_{31}) \oplus (b_{13} \cdot b_{21} \cdot b_{32}) \\ & \oplus (b_{13} \cdot b_{22} \cdot b_{31}) \oplus (b_{11} \cdot b_{23} \cdot b_{32}) \oplus (b_{12} \cdot b_{21} \cdot b_{33}). \end{split}
?
(i)

Calculate the determinant for the binary matrices

(100010001),(111011001). \begin{pmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{pmatrix}, \quad \begin{pmatrix} 1 & 1 & 1 \\ 0 & 1 & 1 \\ 0 & 0 & 1 \end{pmatrix}.
(ii)

Calculate the determinant for the binary matrices

(110110000),(100100100),(101010101). \begin{pmatrix} 1 & 1 & 0 \\ 1 & 1 & 0 \\ 0 & 0 & 0 \end{pmatrix}, \quad \begin{pmatrix} 1 & 0 & 0 \\ 1 & 0 & 0 \\ 1 & 0 & 0 \end{pmatrix}, \quad \begin{pmatrix} 1 & 0 & 1 \\ 0 & 1 & 0 \\ 1 & 0 & 1 \end{pmatrix}.
Problem 15.1.4

The finite field GF(2)GF(2) consists of the elements 00 and 11 (bits) which satisfies the following addition (XOR) and multiplication (AND) tables

⊕01001110⋅01000101 \begin{array}{c|cc} \oplus & 0 & 1 \\ \hline 0 & 0 & 1 \\ 1 & 1 & 0 \end{array} \qquad \begin{array}{c|cc} \cdot & 0 & 1 \\ \hline 0 & 0 & 0 \\ 1 & 0 & 1 \end{array}

Find the determinant of the binary matrices

A=(101010101),B=(111011001). A = \begin{pmatrix} 1 & 0 & 1 \\ 0 & 1 & 0 \\ 1 & 0 & 1 \end{pmatrix}, \qquad B = \begin{pmatrix} 1 & 1 & 1 \\ 0 & 1 & 1 \\ 0 & 0 & 1 \end{pmatrix}.
?
Problem 15.1.5

A boolean function f:{0,1}n→{0,1}f : \left\{ 0,1\right\}^{n} \rightarrow \left\{ 0,1\right\} can be transformed from the domain {0,1}\left\{ 0,1\right\} into the spectral domain by a linear transformation

Ty=s Ty = s

where TT is a 2n×2n2^{n} \times 2^{n} orthogonal matrix, y=(y0,y1,…,y2n−1)Ty = (y_{0}, y_{1}, \ldots , y_{2^{n}-1})^{T}, is the two valued ({+1,−1}\left\{ +1,-1\right\} with 0↔10 \leftrightarrow 1, 1↔−11 \leftrightarrow -1) truth table vector of the boolean function and sjs_{j} (j=0,1,…,7j = 0, 1, \ldots , 7) are the spectral coefficients (s=(s0,s1,…,s2n−1)Ts = (s_{0}, s_{1}, \ldots , s_{2^{n}-1})^{T}). Since TT is invertible we have

T−1s=y. T^{-1}s = y.

For TT we select the Hadamard matrix. The 2n×2n2^{n} \times 2^{n} Hadamard matrix H(n)H(n) is recursively defined as

H(n)=(H(n−1)H(n−1)H(n−1)−H(n−1)),n=1,2,… H(n) = \begin{pmatrix} H(n-1) & H(n-1) \\ H(n-1) & -H(n-1) \end{pmatrix}, \qquad n = 1, 2, \ldots

with H(0)=(1)H(0) = (1) (1×11 \times 1 matrix). The inverse of H(n)H(n) is given by

H−1(n)=12nH(n). H^{-1}(n) = \frac{1}{2^{n}} H(n).

Now any boolean function f(x1,…,xn)f(x_{1}, \ldots , x_{n}) can be expanded as the arithmetical polynomial

12n+1(2n−s0−s1(−1)xn−s2(−1)xn−1−⋯−s2n−1(−1)x1⊕x2⊕⋯⊕xn) \frac{1}{2^{n+1}} \left(2^{n} - s_{0} - s_{1}(-1)^{x_{n}} - s_{2}(-1)^{x_{n-1}} - \cdots - s_{2^{n}-1}(-1)^{x_{1} \oplus x_{2} \oplus \cdots \oplus x_{n}}\right)

where ⊕\oplus denotes the modulo-2 addition.

Consider the boolean function f:{0,1}3→{0,1}f : \left\{ 0,1\right\}^{3} \rightarrow \left\{ 0,1\right\} given by

f(x1,x2,x3)=xˉ1⋅xˉ2⋅xˉ3+xˉ1⋅x2⋅xˉ3+x1⋅x2⋅xˉ3. f(x_{1}, x_{2}, x_{3}) = \bar{x}_{1} \cdot \bar{x}_{2} \cdot \bar{x}_{3} + \bar{x}_{1} \cdot x_{2} \cdot \bar{x}_{3} + x_{1} \cdot x_{2} \cdot \bar{x}_{3}.

Find the truth table, the vector yy and then calculate, using H(3)H(3), the spectral coefficients sjs_{j}, (j=0,1,…,7j = 0, 1, \ldots , 7).

?
Problem 15.1.6

Consider the binary matrices

A=(0110),B=(1111). A = \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix}, \qquad B = \begin{pmatrix} 1 & 1 \\ 1 & 1 \end{pmatrix}.

Calculate the Hadamard product A∙BA \bullet B and the star product A⋆BA \star B.

?
Problem 15.1.7

A binary Hadamard matrix is an n×nn \times n matrix MM (where nn is even) with entries in {0,1}\left\{ 0,1\right\} such that any two distinct rows or columns of MM have Hamming distance n/2n/2. The Hamming distance between two vectors is the number of entries at which they differ. Find a 4×44 \times 4 binary Hadamard matrix.

?
Problem 15.1.8

How many 2×22 \times 2 binary matrices can one form which contain two 11's? Find the commutator between these matrices.

?
Problem 15.2.1

How many 3×33 \times 3 binary matrices can one form which contain three 11's? Write down these matrices. Which of them are invertible?

?
Problem 15.2.2

Consider the four 8×88 \times 8 binary matrices

S0=(0000000000000000000000000001100000011000000000000000000000000000),S1=(0000000000000000001001000000000000000000001001000000000000000000), S_{0} = \begin{pmatrix} 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 1 & 1 & 0 & 0 & 0 \\ 0 & 0 & 0 & 1 & 1 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \end{pmatrix}, \qquad S_{1} = \begin{pmatrix} 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 1 & 0 & 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 1 & 0 & 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \end{pmatrix}, S2=(0000000001000010000000000000000000000000000000000100001000000000),S3=(1000000100000000000000000000000000000000000000000000000010000001). S_{2} = \begin{pmatrix} 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 & 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 & 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \end{pmatrix}, \qquad S_{3} = \begin{pmatrix} 1 & 0 & 0 & 0 & 0 & 0 & 0 & 1 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 1 & 0 & 0 & 0 & 0 & 0 & 0 & 1 \end{pmatrix}.

Find the 8×88 \times 8 matrices Q0,Q1,Q2,Q3Q_{0}, Q_{1}, Q_{2}, Q_{3} such that

Q0S0Q0T=S1,Q1S1Q1T=S2,Q2S2Q2T=S3,Q3S3Q3T=S0. Q_{0} S_{0} Q_{0}^{T} = S_{1}, \quad Q_{1} S_{1} Q_{1}^{T} = S_{2}, \quad Q_{2} S_{2} Q_{2}^{T} = S_{3}, \quad Q_{3} S_{3} Q_{3}^{T} = S_{0}.
?
Problem 15.2.3

Consider the four 2×22 \times 2 binary matrices AA and BB with the underlying field F\mathbb {F}, char⁡(F)=2\operatorname {char}(\mathbb {F}) = 2. Find the condition on AA and BB such that A+B=ABA+B = AB.

?
Problem 15.2.4

Consider the two permutation matrices (NOT-gate and XOR-gate)

N=(0001001001001000),X=(1000010000010010). N = \begin{pmatrix} 0 & 0 & 0 & 1 \\ 0 & 0 & 1 & 0 \\ 0 & 1 & 0 & 0 \\ 1 & 0 & 0 & 0 \end{pmatrix}, \qquad X = \begin{pmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 1 \\ 0 & 0 & 1 & 0 \end{pmatrix}.

Can we generate all other permutation matrices from these two permutation matrices? Note that N2=I4N^{2} = I_{4}, X2=I4X^{2} = I_{4} and

NX=(0010000101001000),XN=(0001001010000100). NX = \begin{pmatrix} 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \\ 0 & 1 & 0 & 0 \\ 1 & 0 & 0 & 0 \end{pmatrix}, \qquad XN = \begin{pmatrix} 0 & 0 & 0 & 1 \\ 0 & 0 & 1 & 0 \\ 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \end{pmatrix}.
?