*Correspondence to Author:
Dr. Ahmad Hamza Al Cheikha Dep. of Mathematical Science, Col-lege of Arts-science and Education Ahlia Uni., Manama, Bahrain, al-cheikhaa @yahoo.com
How to cite this article:
Ahmad Hamza Al Cheikha. Com-pose Binary Matrices. American Journal of Computer Sciences and Applications, 2017; 1:10.
eSciPub LLC, Houston, TX USA. Website: http://escipub.com/
Ahmad Hamza Al Cheikha, AJCSA, 2017; 1:10
American Journal of Computer Sciences and Applications
(ISS
N
:2
5
7
5-
77
5X
)
Research Article AJCSA, 2017, 1:10
Compose Binary Matrices
Hadamard Matrices and M-Sequences (which formed a closed sets under the addition and with the corresponding null se-quence formed additive groups and generated by feedback registers) are used widely at the forward links of communica-tion channels to mix the informacommunica-tion on connecting to and at the backward links of these channels to sift through this information is transmitted to reach the receivers this information in correct form, specially in the pilot channels, the Sync channels, and the
Traffic channel.
This research is useful to generate new sets of sequences (which are also with the corresponding null sequence additive groups) by compose Hadamard matrices and M-sequences with the big-ger lengths and the bigbig-ger minimum distance that assists to in-crease secrecy of these information and inin-crease the possibility of correcting mistakes resulting in the channels of communica-tion.
Keywords: hadamard matrices, Walsh Sequences, M-sequenc-es, Additive group, Coefficient of Correlation, Orthogonal se-quences.
Dr. Ahmad Hamza Al Cheikha
Dep. of Mathematical Science, College of Arts-science and Education, Ahlia Uni., Manama,
Bah-rain
ABSTRACT
Http://escipub.com/american-journal-of-computer-sciences-and-applications/ 0002
Introduction
▪ M- Sequences: Let k be a positive integer and ,0,1,...,k1 are elements in the fieldF2, then the sequence a0,a1,...is called non homogeneous linear recurring sequence of order k iff :
) 1 ( 1
,..., 1 , 0 ,
, ...
1
0 2
0 2
2 1
1
k i
i n i k
n i
n k
n k k
n k k n
a a
or
k i
F
a a
a a
The elements a0,a1,...,ak1 are called the initial values (or the vector (a0,a1,...,ak1) is called the initial vector). If 0 then the sequence
... , , 1
0 a
a is called homogeneous linear recurring sequence (H. L. R. S.), except the zero-initial vector, and the polynomial
0 1 1
1 ...
)
(x x x x
f k k k (2)
is called the characteristic polynomial. In this study, we are limited to01.
If the characteristic polynomial is prime then the sequence a0,a1,... is called M-Sequence and
this sequence is periodic with period n2k 1, and each period contains n1 2k11of “0.s”
and n2 2k1of “1.s”.
The set of all n2k 1cyclic permutations of one period is closed under the addition by mod 2 and form an orthogonal set and any two different permutations contain 2k1of disagreements and (2k11) of agreements,
) 1 2
( 2
1
k
f of the agreements are “0.s” and
2
2 2
k
f of the agreements are “1.s”.
We can collect the all permutations of one period in one square matrix as following:
0 1 1
2 0
1
1 1
0
a a
a
a a
a
a a
a
A
n n n
n
Example 1: If is a root of the prime polynomial f(x)x2x1and generates
) 2 ( 2
GF and Suppose the Linear Binary Recurring Sequence be
n n
n
a
a
a
2
1
or an2an1an 0With the characteristic equation x2x10
and the characteristic polynomial
1 )
(x x2x
f , which is a prime then the general solution of equation For the initial position: a11,a2 0 is given by:
n n
n
a 22 , and the sequence is periodic with the period 22 13 and
x
1= (101), by the cyclic permutations onx
1we have
1 2 3
3 x ,x ,x
M where:
1
x
= (101),x
2
(110),x
3=(011), The first two digits in each sequence are the initial position of the feedback register, and the setM
3 is an orthogonal set. The matrix of the all cyclic permutations is:
1 1 0
0 1 1
1 0 1
A
2
2
,
1
1
2
,
2
2
,
1
1
2
.
3
1
2
1 2 2 1
2 1
1 2 2 1
2 1 2
f
f
n
n
n
Example 2: The prime polynomial
1 )
(x x3x
f is prime and generates GF(23)
Suppose the Linear Recurring Sequence be :
n n
n a a
a 3 1 or an3an1an 0
The characteristic equation x3x10 and the characteristic polynomial f(x)x3x1, which is a prime and generates 3
2
F and for the
initial position: a1 1 ,a2 0, a3 0, and the
sequence is periodic with the period2317
Ahmad Hamza Al Cheikha, AJCSA, 2017; 1:10
Http://escipub.com/american-journal-of-computer-sciences-and-applications/ 0003
1 2 3 4 5 6 7
7 y ,y ,y ,y ,y ,y ,y
M where:
y
2=(1100101) ,
y
3= (1110010),4
y = (0111001),
y
5=(1011100),y
6=(0101110), 7y
=(0010111), the first three digits in eachsequence are the initial position of the feedback register, and the set
M
7 is an orthogonal set. The matrix of the all cyclic permutations is:
1 1 1 0 1 0 0
0 1 1 1 0 1 0
0 0 1 1 1 0 1
1 0 0 1 1 1 0
0 1 0 0 1 1 1
1 0 1 0 0 1 1
1 1 0 1 0 0 1
B
4 2 ,
3 1 2
, 4 2 ,
3 1 2 .
7 1 2
1 3 2 1
3 1
1 3 2 1
3 1 3
f g
n m
m
[7], [10], [12], [15-18], [20], [27]
▪ Hadmard Matrices: Hadamard matrices seem such simple matrix structures: they are square, have entries +1 or −1 and have orthogonal row vectors and orthogonal column vectors.
A Hadamard matrix is invented by Sylvester (1867), 26 years before Hadamard (1893) considered them. The nnHadamard matrixHn
must have n(n1)/2 of “-1.s” and n(n1)/2 of ”1.s”. The binary representation of Hadamard matrix gets replaced each”1” by “0” and replaced each “-1” by”1”
Some basic properties of Hadamard matrices are given by following theorem:
LetHhbe an Hadamard matrix of order h then:
1. h
t h hH hI
H , where Ihis the identity matrix of order h;
2. H h2h
1
det ;
3. h
t h t h
hH H H
H ;
4. Hadamard matrices may be changed into other Hadamard matrices by permuting rows and columns and by multiplying rows and columns by −1.
5. Matrices which can be obtained from one another by these methods are referred to as H-equivalent (not all Hadamard matrices of the same order are H-equivalent).
6. Every Hadamard matrix is H-equivalent to an Hadamard matrix which has every element of its first row and column equal +1 – matrices of this latter form are called normalized.
7. If H4nis a normalized Hadamard matrix of order 4n, then every row (column), except the first, has 2n minus ones and 2n plus ones in each row (column), and the set these rows is called Walsh’s sequences
8. The order of an Hadamad matrix is 1, 2, 4n, where n is a positive integer.
(Sylvester) Let H1and H2be two Hadamard matrices of orders h1and h2, then the
Kronecker product of H1and H2 is an Hadamard matrix of order h1h2.
9. Standard Hadamard matrixHh have
orthogonal rows (columns) vectors and each row (column) except the first row and first column contains h/2 of “1.s” and h/2 of “-1” and h/2 of disagreements and h/2 of agreements h/4 of agreements are “1.s” and h/4 of agreements are “-1”. [1-6], [8,9], [13,14], [19-26], [28,32].
The smallest examples are:
,
1 1
1 1
1 1
1 1 1 1 ,
1 1 1 ,
1 1 2
0 2 2
2
H H
H
1 1 1 1 1
1 1
1 1 1 1 1 1 1
1 1 1 1 1 1 1
1 1 1 1 1 1 1
1 1 1 1 1 1 1
1 1 1 1 1 1 1
1 1
1 1 1 1 1
1 1 1 1 1 1 1
1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1
,
1 1 1 1
1 1 1
1
1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1 1 1 1 1
12
23 H
Http://escipub.com/american-journal-of-computer-sciences-and-applications/ 0004
Research method and Material
Definition 1.The Ultimately Periodic Sequence ....
, , 1
0 a
a with the smallest period r is called a periodic iff: anr an ; n0,1,... [1,2], [12], [15-18], [20-27]
Definition 2. The complement of the binary vector X (x1,x2,...,xn),xiF2{0,1}is the vector
) ,..., ,
(x1 x2 xn
X , where:
1 0
0 1
i i i
x if
x if
x . [1,2] (3)
Definition 3. Supposex (x0,x1,...,xn1)
and y(y0,y1,...,yn1)are binary vectors of
length n on F2={0,1}. The coefficient of correlations function of x and y , denoted by Rx,y, is:
) 4 ( )
1 ( 1
0
,
n
i
y x y
x
i i
R
Where xi + yi is computed mod 2. It is equal to the number of agreements components minus the number of disagreements corresponding to components or if xi,yi{1,1}(usually, replacing in binary vectors x and y each “1” by “-1” and each “0” by “1”) then
1
0 ,
n
i
i i y
x x y
R , [1,2],[13-18] (5)
Definition 4. Any Periodic Sequence a0,a1,....
over F2 with prime characteristic polynomial is an orthogonal cyclic code and ideal auto correlation [1-2], [12], [18].
Definition 5. Supposex (x0,x1,...,xn1)
and y(y0,y1,...,yn1)are binary vectors of
length n on GF(2)={0,1}, or components belong to {1, -1}, is said strictly orthogonal if Rx,y 0
and orthogonal if Rx,y {1,0.1} ). [1,2],[13-18]
Definition 6. Suppose G is a set of binary vectors of length n:
1 ,..., 1 , 0 }, 1 , 0 {
), ,...,
, ( ;
2
1 1
0
n i
F x
x x
x X
X G
i
n
Let’s 1*= -1 and 0* =1, The set G is said to be strictly orthogonal if the following two conditions are satisfied:
.
0
,
0
,
.
1
,01
0
x n
i
i
or
R
x
G
X
(6)
)
7
(
.
0
0
),
(
,
.
2
,1
0
y x n
i i
i
y
or
R
x
Y
X
G
Y
X
That is, the absolute value of "the number of agreements minus the number of disagreements" is equal to zero, and orthogonal if the following two conditions are satisfied:
. 1 ,
1 ,
.
1 ,0
1
0
x n
i
i or R
x G
X
(8)
) 9 ( . 1 1
), (
, .
2 ,
1
0
y x n
i i
i y or R
x Y X G Y X
That is, the absolute value of "the number of agreements minus the number of disagreements" is equal to zero. [1,2],[13-18] Definition 7. The matrix A[aij] is called Hadamard matrix if it is a square matrix and each entry is equals 1 or ”“ (where denotes -1) with the property that if the size of A is then
h T T
I h AA A
A , in the decimal counting system, and the distinct rows vectors are mutually orthogonal. [20-27]
Definition 8. If all entries of the first row and the first column in the Hadamard matrix are equal to “1” then the matrix is called standard Hadamard matrix.
Such matrices were first invented by Sylvester (1867) who observed that if H is an Hadamard matrix, then:
) 10 (
H H
H H H
Is also an Hadamard matrix. [3-12]
Theorem 1.
Ahmad Hamza Al Cheikha, AJCSA, 2017; 1:10
Http://escipub.com/american-journal-of-computer-sciences-and-applications/ 0005 ii. (1) then this sequence is periodic
iii. If this sequence is homogeneous linear recurring sequence, periodic with the period r, and its characteristic polynomial
) (x
f then r ord f(x).
iv. If the polynomial f(x) is primitive then the period of the sequence is 2k 1, and this sequence is called M – sequence. [7], [16], [17], [27]
Lema 2. (Sylvester (1867)): There is an Hadamard matrix of order t
2 for all nonnegative t. The matrices of order 2tconstructed using Sylvester’s construction are usually Referred to as Sylvester-Hadamard matrices. [3-6], [13,15], Hadamard (1983) gave examples for a few small orders. [5-6],[8],[13-14],[22-23],[31-32]
Results and Discussion
First. Suppose A and B are tow square binary matrices of orders n, m respectively, compose the matrix A with the matrix B or A(B) is a the result of replacing each entry “0” in the matrix A by the full matrix B and replacing each “1” in the matrix A by full Bcomplement of the matrix B and A(B) is a square matrix of order n.m .
The study is similar when A or B is rectangular matrix.
Example 3. If :
0 1
1 1
A and
1 0 1
1 1 0
0 1 1
B
then:
0 1 0
0 0 1
1 0 0
B
and:
1 0 1
1 1 0
0 1 1
0 1 0
0 0 1
1 0 0
0 1 0
0 0 1
1 0 0
0 1 0
0 0 1
1 0 0
) (B A
If:
n n
ij
A A A
a A
2 1
,
m m
kl
B B B
b B
2 1
m n m n n n
m m
B A
B A
B A
B A
B A
B A
B A
B A
B A
B A
. 2 1 2
2 2
1 2 1
2 1
1 1
) (
) (
) (
) (
) (
) (
) (
) (
) (
) (
(11)
And Aij Ai(Bj)the result of compose the ith row in the matrix A with the jth row of the matrix B.
If Aicontains n1 of “0.s” and n2 of ”1.s” then Ai contains n1 of “1.s” and n2 of ”0.s” and if Bj contains m1 of “0.s” and m2 of ”1.s” then Bj contains m1 of “1.s” and m2 of ”0.s” and
) ( j
i j
i A B
A contains n1m1n2m2of ‘0.s’ and
1 2 2
1m n m
n of “1.s” and Aij Ai(Bj)contains The same number of ‘0.s’ and of “1.s”, from example 1.:
] 1 0 1 0 1 0 [ ]) 1 0 1 ]([ 0 1 [ ) ( 3
2
23 A B
A .
Our purpose now to study the following: From the information about two rowsAi1,Ai2from the matrix A and two rows Bj1,Bj2from the matrix B then what is the number of agreements and the number of disagreements between
) ( )
( 1 2 2
1 j i j
i B and A B
A .
Http://escipub.com/american-journal-of-computer-sciences-and-applications/ 0006
2
1 n
n
n , where n1 is the number of “0.s” in each of them and n2 is the number of “1.s” in each of them and the number of agreements between them is f1 r1r2where r1 of theme are “0.s” and r2 of theme are”1.s” such the number of disagreements is
) ( [ ) (
)
( 1 1 2 2 1 2
1
2 n f n r n r n r r
f , by the
same way :
If there are two rows from the matrix B, for simplicityB1, B2have: the same length
2
1 m
m
m , where m1 is the number of “0.s” in each of them and m2 is the number of “1.s” in each of them and the number of agreements between them isg1 h1h2where h1 of theme are “0.s” and h2 of
theme are”1.s”such the number of
disagreements is
] 2 ) 1 ( [ ) 2 2 ( ) 1 1 ( 1
2 m g m h m h m h h
g .
Such the representation of the information as following:
Representation 1: Compare A1(B1) and A2(B2)
) ( 1
1 B
A 0 0 … 0 𝐵
1 𝐵1 . .. 𝐵1
⏞
𝑟1
0 0 … 0 𝐵1 𝐵1 . .. 𝐵1
⏞
(𝑛1−𝑟1)
⏞
𝑛1 𝑜𝑓 "0.𝑠"
1 1 … 1 𝐵̅1 𝐵̅1 . .. 𝐵̅1
⏞
(𝑛2−𝑟2)
1 1 … 1 𝐵̅1 𝐵̅1 . .. 𝐵̅1
⏞
𝑟2
⏞
𝑛2 𝑜𝑓 "1.𝑠""
) ( 2
2 B
A
𝐵2 𝐵2 … 𝐵2 0 0 … 0 ⏟
𝑟1
𝐵̅2 𝐵̅2 … 𝐵̅2 1 1 … 1 ⏟
(𝑛2−𝑟2)
⏟
𝑛1𝑜𝑓"0.𝑠"
𝐵2 𝐵2 … 𝐵2 0 0 … 0 ⏟
(𝑛1−𝑟1)
𝐵̅2 𝐵̅2 … 𝐵̅2 1 1 … 1 ⏟
𝑟2
⏟
𝑛2𝑜𝑓"1.𝑠"
• The number of agreements between A1 and A2 is: f1 r1r2 .
• The number of disagreements between A1 and A2 is: f2 n f1 [n1(r1r2)].
This representation showing a need to compare:B1 and B2, B1 and B2, B1 and B2and
2 1 and B
B ,
a. Compare B1 and B2 : The Representation of the rows B1 and B2 of matrix B is as following:
Representation 2: Compare B1 and B2
1
B
0 0 … 0 ⏞
ℎ1
0 0 … 0 ⏞
(𝑚1−ℎ1)
⏞
𝑚1 𝑜𝑓 "0.𝑠"
1 1 … 1 ⏞
(𝑚2−ℎ2)
1 1 … 1 ⏞
ℎ2
⏞
𝑚2 𝑜𝑓 "1.𝑠"
2
B
0 0 … 0 ⏟
ℎ1
1 1 … 1 ⏟
(𝑚2−ℎ2)
⏟
𝑚1𝑜𝑓"0.𝑠"
0 0 … 0 ⏟
(𝑚1−ℎ1)
1 1 … 1 ⏟
ℎ2
⏟
𝑚2𝑜𝑓"1.𝑠"
• The number of agreements between B1 and B2 is: g1 h1h2.
• The number of disagreements between B1 and B2 is: g2 mg1 [m(h1h2)].
b. Compare B1 and B2 : The Representation of the rows B1 and B2 of matrix B is as following:
Ahmad Hamza Al Cheikha, AJCSA, 2017; 1:10
Http://escipub.com/american-journal-of-computer-sciences-and-applications/ 0007
1
B
0 0 … 0 ⏞
ℎ1
0 0 … 0 ⏞
(𝑚1−ℎ1)
⏞
𝑚1 𝑜𝑓 "0.𝑠"
1 1 … 1 ⏞
(𝑚2−ℎ2)
1 1 … 1 ⏞
ℎ2
⏞
𝑚2 𝑜𝑓 "1.𝑠"
2
B 1 1 … 1⏟
ℎ1
0 0 … 0 ⏟
(𝑚2−ℎ2)
⏟
𝑚1𝑜𝑓"1.𝑠"
1 1 … 1 ⏟
(𝑚1−ℎ1)
0 0 … 0 ⏟
ℎ2
⏟
𝑚2𝑜𝑓"0.𝑠"
• The number of agreements between B1 and B2 is: g2 mg1 [m(h1h2)].
• the number of Disagreements between B1 and B2 is: g1 (h1h2).
c. Compare B1 and B2 : The Representation of the rows B1 and B2 of matrix B is as following:
Representation 4: Compare B1 and B2
1
B
1 1 … 1 ⏞
ℎ1
1 1 … 1 ⏞
(𝑚1−ℎ1)
⏞
𝑚1 𝑜𝑓 "1.𝑠"
0 0 … 0 ⏞
(𝑚2−ℎ2)
0 0 … 0 ⏞
ℎ2
⏞
𝑚2 𝑜𝑓 "0.𝑠"
2
B
0 0 … 0 ⏟
ℎ1
1 1 … 1 ⏟
(𝑚2−ℎ2)
⏟
𝑚1𝑜𝑓"0.𝑠"
0 0 … 0 ⏟
(𝑚1−ℎ1)
1 1 … 1 ⏟
ℎ2
⏟
𝑚2𝑜𝑓"1.𝑠"
• The number of agreements between B1 and B2is: g2 mg1 [m(h1h2)].
• The number of Disagreements between B1 and B2is: g1 h1h2.
d. Compare B1 and B2 : The Representation of the rows B1 and B2 of matrix B is as following:
Representation 5: Compare B1 and B2
1
B
1 1 … 1 ⏞
ℎ1
1 1 … 1 ⏞
(𝑚1−ℎ1)
⏞
𝑚1 𝑜𝑓 "1.𝑠"
0 0 … 0 ⏞
(𝑚2−ℎ2)
0 0 … 0 ⏞
ℎ2
⏞
𝑚2 𝑜𝑓 "0.𝑠"
2
B
1 1 … 1 ⏟
ℎ1
0 0 … 0 ⏟
(𝑚2−ℎ2)
⏟
𝑚1𝑜𝑓"1.𝑠"
1 1 … 1 ⏟
(𝑚1−ℎ1)
0 0 … 0 ⏟
ℎ2
⏟
𝑚2𝑜𝑓"0.𝑠"
• The number of agreements between B1and B2 is; g1 h1h2.
• The number of disagreements between B1and B2 is: g2 [m(h1h2)].
First Step: For one row Aiof the matrix A and two different rows Bj,Bkof the matrix B then
Http://escipub.com/american-journal-of-computer-sciences-and-applications/ 0008
Representation 6: Compare Ai(Bj) and Ai(Bk)
) ( j
i B
A 0 0 … 0 𝐵
𝑗 𝐵𝑗 . .. 𝐵𝑗
⏞
𝑟1
0 0 … 0 𝐵𝑗 𝐵𝑗 . .. 𝐵𝑗
⏞
(𝑛1−𝑟1)
⏞
𝑛1 𝑜𝑓 "0.𝑠"
1 1 … 1 𝐵̅𝑗 𝐵̅𝑗 . . . 𝐵̅𝑗
⏞
(𝑛2−𝑟2)
1 1 … 1 𝐵̅𝑗 𝐵̅𝑗 . .. 𝐵̅𝑗
⏞
𝑟2
⏞
𝑛2 𝑜𝑓 "1.𝑠""
) ( k
i B
A
𝐵𝑘 𝐵𝑘 … 𝐵𝑘 0 0 … 0 ⏟
𝑟1
𝐵𝑘 𝐵𝑘 … 𝐵𝑘 0 0 … 0 ⏟
(𝑛1−𝑟1)
⏟
𝑛1𝑜𝑓"0.𝑠"
𝐵̅𝑘 𝐵̅𝑘 … 𝐵̅𝑘 1 1 … 1 ⏟
(𝑛2−𝑟2)
𝐵̅𝑘 𝐵̅𝑘 … 𝐵̅𝑘 1 1 … 1 ⏟
𝑟2
⏟
𝑛2𝑜𝑓"1.𝑠"
We have :
• The length of Ai(Bj) and Ai(Bk)is: n.m .
• The number of “0.s” in each of them is:
2 2 1
1m n m
n .
• The number of “1.s” in each of them is:
1 2 2
1m n m
n .
• The number of agreements is:
)
( 1 2
1 n h h
g
n .
• The number of disagreements is:
)] (
[ 1 2
2 n m h h
g
n .
• The difference d between the disagreements and agreements is:
) (
)] (
[ 1 2 1 2
1
2 ng n m h h n h h
g n
d
)] (
2
[m h1 h2
n
d
Second Step: For two different rows Ai,Ajof the matrix A and one row Bkof the matrix B and from the representations (2-5) and from the following representation of Ai,Aj,Bk:
Representation 7: Compare Ai(Bk) and Aj(Bk)
) ( k
i B
A 0 0 … 0 𝐵𝑘 𝐵𝑘 . .. 𝐵𝑘
⏞
𝑟1
0 0 … 0 𝐵𝑘 𝐵𝑘 . .. 𝐵𝑘
⏞
(𝑛1−𝑟1)
⏞
𝑛1 𝑜𝑓 "0.𝑠"
1 1 … 1 𝐵̅𝑘 𝐵̅𝑘 . . . 𝐵̅𝑘
⏞
(𝑛2−𝑟2)
1 1 … 1 𝐵̅𝑘𝐵̅𝑘 . .. 𝐵̅𝑘
⏞
𝑟2
⏞
𝑛2 𝑜𝑓 "1.𝑠""
) ( k
j B A
𝐵𝑘 𝐵𝑘 … 𝐵𝑘 0 0 … 0 ⏟
𝑟1
𝐵̅𝑘 𝐵̅𝑘 … 𝐵̅𝑘
1 1 … 1 ⏟
(𝑛2−𝑟2)
⏟
𝑛1𝑜𝑓"0.𝑠"
𝐵𝑘 𝐵𝑘 … 𝐵𝑘 0 0 … 0 ⏟
(𝑛1−𝑟1)
𝐵̅𝑘 𝐵̅𝑘 … 𝐵̅𝑘
1 1 … 1 ⏟
𝑟2
⏟
𝑛2𝑜𝑓"1.𝑠"
We have :
• The length of Ai(Bk) and Aj(Bk)is: n.m .
• The number of “0.s” in each of them is:
2 2 1
1m n m
n .
• The number of “1.s” in each of them is:
1 2 2
1m n m
n .
• The number of agreements is:
)
(1 2
1 m r r
f
m .
• The number of disagreements is:
)] (
[ 1 2
2 m n r r
f
m .
• The difference d between the disagreements and agreements is:
m r r m r r n m f m f m
d 2 1 [ (1 2)] (1 2)
m r r n
Ahmad Hamza Al Cheikha, AJCSA, 2017; 1:10
Http://escipub.com/american-journal-of-computer-sciences-and-applications/ 0009 Third Step: For two different rows Ai,Ajof the matrix A and two different rows Bk,Blof the
Matrix B and from the representations (1-5) and from the following representation of Ai,Aj , Bk,Bl :
Representation 8: Compare Ai(Bk) and Aj(Bl)
) ( k
i B
A 0 0 … 0 𝐵𝑘 𝐵𝑘 . .. 𝐵𝑘
⏞
𝑟1
0 0 … 0 𝐵𝑘 𝐵𝑘 . .. 𝐵𝑘
⏞
(𝑛1−𝑟1)
⏞
𝑛1 𝑜𝑓 "0.𝑠"
1 1 … 1 𝐵̅𝑘 𝐵̅𝑘 . . . 𝐵̅𝑘
⏞
(𝑛2−𝑟2)
1 1 … 1 𝐵̅𝑘𝐵̅𝑘 . .. 𝐵̅𝑘
⏞
𝑟2
⏞
𝑛2 𝑜𝑓 "1.𝑠""
) ( l
j B A
𝐵𝑙 𝐵𝑙 … 𝐵𝑙 0 0 … 0 ⏟
𝑟1
𝐵̅𝑙 𝐵̅𝑙 … 𝐵̅𝑙
1 1 … 1 ⏟
(𝑛2−𝑟2)
⏟
𝑛1𝑜𝑓"0.𝑠"
𝐵𝑙 𝐵𝑙 … 𝐵𝑙 0 0 … 0 ⏟
(𝑛1−𝑟1)
𝐵̅𝑙 𝐵̅𝑙 … 𝐵̅𝑙
1 1 … 1 ⏟
𝑟2
⏟
𝑛2𝑜𝑓"1.𝑠"
We have:
• The number of agreements between Ai and Aj is: f1 (r1r2).
• The number of disagreements between Ai and Aj is: f2 [n(r1r2)]
• The number of agreements between Bk and Bl is: g1 (h1h2).
• The number of disagreements between Bk and Bl is: g2 [m(h1h2)]
• The length of Ai(Bk) and Aj(Bl)is: n.m .
• The number of “0.s” in each of them is:
2 2 1
1m n m
n .
• The number of “1.s” in each of them is:
1 2 2
1m n m
n .
• The number of agreements between
) ( k
i B
A and Aj(Bl)is: f1g1 f2g2, or is:
)] (
)][ (
[ ) )(
(r1r2 h1h2 n r1r2 m h1h2
• The number of disagreements between
) ( k
i B
A and Aj(Bl)is: f1g2 f2g1, or is:
) )](
( [ )] (
)[
(r1r2 m h1h2 n r1r2 h1h2
• The difference d between the agreements and disagreements of
) ( k
i B
A and Aj(Bl)is:
) (
)
(f1g1 f2g2 f1g2 f2g1
d
) )(
(f1 f2 g1 g2
d
Or:
) )( ( 4 ) ( 2 ) (
2n h1 h2 m r1 r2 r1 r2 h1 h2 nm
d
Example 4. Using binary representations of the standard Hadmard matrices:
,... , ,
1 1 0 1 0 1 0 1 0 1 0 0
1 1 0 0 1 1 1 0 0 0 1 0
0 0 1 1 1 1 0 0 0 1 1 0
0 1 0 1 1 0 1 0 1 1 0 0
1 0 0 1 1 0 0 1 1 0 1 0
0 0 0 0 0 1 1 1 1 1 1 0
1 0 1 0 1 0 1 1 0 1 0 0
0 1 1 1 0 0 1 1 0 0 1 0
1 1 1 0 0 0 0 0 1 1 1 0
1 0 1 1 0 1 1 0 1 0 0 0
0 1 1 0 1 1 0 1 1 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0
,
1 0
0 0 0 1
1 1
0 1
1 1 0 1
1 1
0 1
1 1 1 0
0 0
1 0
0 0 1 0
0 0
0 1
1 1 1 0
0 0
1 0
0 0 1 0
0 0
0 1
1 1 1 0
0 0
1 0
0 0 1 0
0 0
,... , 0 1
1 1 1 0
0 0
1 0
0 0 1 0
0 0 , 1 0
0 0
1
4 12
8 4
2 H H H H h
H
Http://escipub.com/american-journal-of-computer-sciences-and-applications/ 0010 The set of row of a standard Hadamard matrix
form an additive group for addition by mod 2 and the set of this rows except the first row also closed under the addition (Walsh’s Sequences).
Except H2 , First row contains only “0.s” each of the other rows contains 2h1of “0.s” , 2h1of “1.s”, 2h1of disagreements and 2h1of agreements, h1 of the agreements are “0.s” and the other
h1 are ”1.s”.
i. Is very clear: H2 (H2) = H4 is an Hadamard matrix.
ii. All entries of the first row in H2(H4h)are “0”
and each other row contains 4h of “0.s” and 4h of “1.s” and orthogonal with the first row, the order of the matrix H2(H4h)is 8h.
h h h h h H H H H H H 4 4 4 4 4
2( )
iii. Each row except the first row contains 4h of “0.s”, 4h of “1.s” and any two different rows except the first contain 4h of disagreements and 4h of agreements (from third. The difference between the agreements and
disagreements is:
0 ) 2 2 )( 1 1 ( ) )(
( 1 2 1 2
f f g g h h
d ) 2h
of the agreements are “0.s” and the other 2h are “1.s” also because this set of rows is closed under the addition. Thus these two rows are orthogonal and the columns of
) ( 4
2 H h
Ahmad Hamza Al Cheikha, AJCSA, 2017; 1:10
Http://escipub.com/american-journal-of-computer-sciences-and-applications/ 0011 In this matrix, except the first row (column),
each row (column) contains 12 0f “0.s” , 12 of “1.s”, 12 of disagreements and 12 of agreements, 6 of the agreements are “0” and 6 of agreements are “1.s”
iv. All entries of the first row in 4 ( 4 2)
1 h
h H
H are “0”
and each other row contains 8h1h2 of “0.s”
and 8h1h2 of “1.s” and orthogonal with the first
row and the order of the matrix is:16h1h2. For any two different rows, except the first row
• The number of agreements between Ai and Aj is: f1 (h1h1)2h1.
• The number of disagreements between Ai and Aj is: f2 [4h12h1]2h1
• The number of agreements between Bk and Bl is: g1 (h2 h2)2h2.
• The number of disagreements between Bk and Bl is: g2 [4h2 2h2]2h2
❖ In the compositionAi(Bj)and Ai(Bk):
• The number of agreements is:
2 1 2 1
1 4h (2h ) 8hh
g
n .
• The number of disagreements is:
2 1 2 1
2 4h (2h ) 8hh
g
n .
• The difference d between the disagreements and agreements is: d 0
Thus, second condition of the orthogonal is verified.
❖ In the compositionAi(Bk)and Aj(Bk):
• The number of agreements is:
2 1 1 2
1 4h (2h ) 8hh
f
m .
• The number of disagreements is:
) 2 (
4 2 1
2 h h
f
m .
• The difference d between the disagreements and agreements is: d 0
Thus, second condition of the orthogonal is verified.
❖ In the compositionAi(Bk)and Aj(Bl):
• The number of agreements is:
2 1 2 1 2 1 2 2 1
1g f g 2h (2h ) 2h (2h ) 8hh
f .
• The number of disagreements is:
2 1 2 1 2 1 1 2 2
1g f g 2h (2h ) 2h (2h ) 8hh
f .
• The difference d between the disagreements and agreements is “0”, or :
0 ) 2 2 )( 2 2
( 1 1 2 2
h h h h
d
• The columns of 4 ( 4 2)
1 h
h H
H have the same properties of the rows and H4h1(H4h2) is an Hadamard matrix. By the same way for
)
( 1
2 4
4h H h
H is an Hadamard matrix.
Thus, second condition of the orthogonal is verified and rows of A(B) except the first row form an orthogonal set
Second. Compose binary matrices is associative: We will prove that
) ))( ( ( )) (
(B C A B C
A for any A, B, C binary matrices.
Suppose:
3 3
2 2
1 1
2 1 2
1 2
1
] [ , ]
[ , ]
[
h h mn
h h kl
h h ij
C C C c
C B B B b
B A A A a
A
From the left side:
i.
1.
. , , 1,2,...,
)) ( ( )) ( (
3 2 1
h j
i C
B a C B A
h h h
ij
• If aij 0 then:
From the left side:
) ( ....
) ( ) (
... ... ... ... ...
) ( ... ) ( ) (
) ( ... ) ( ) (
) (
) (
) (
)) ( ( )) ( (
2 2 2
2
2 2
2 1 2 1
2 22
21
1 12
11 2
1
C b C
b C b
C b C
b C b
C b C
b C b
C B
C B
C B C B C B a
h h h
h
h h
h
ij
From the right side:
) ( .... ) ( ) (
... ... ... ... ...
) ( ... ) ( ) (
) ( ... ) ( ) (
) (
) (
) (
) )( ( ) ))( ( (
2 2 2
2
2 2
2 1 2 1
2 22
21
1 12
11 2
1
C b C b C b
C b C
b C b
C b C
b C b
C B
C B
C B
C B C B a
h h h
h
h h
h
ij
Thus: A(B(C)) = (A(B)(C)
• If aij 1 then:
Http://escipub.com/american-journal-of-computer-sciences-and-applications/ 0012 ) ( .... ) ( ) ( ... ... ... ... ... ) ( ... ) ( ) ( ) ( ... ) ( ) ( ) ( ) ( ) ( ) ) ( ( )) ( ( 2 2 2 2 2 2
2 1 2 1
2 22 21 1 12 11 2 1 C b C b C b C b C b C b C b C b C b C B C B C B C B C B a h h h h h h h ij
From the right side:
) ( .... ) ( ) ( ... ... ... ... ... ) ( ... ) ( ) ( ) ( ... ) ( ) ( ) ( ) ( ) ( )) ( ( ) ))( ( ( 2 2 2 2 2 2
2 1 2 1
2 22 21 1 12 11 2 1 C b C b C b C b C b C b C b C b C b C B C B C B C B C B a h h h h h h h ij
Is B(C)B(C)?
• If bkl 0
C C C b C C C b kl kl ) ( 0 ) ( ) ( 0 ) (
, if bkl 1
C C C C b C C C C b kl kl ) ( 1 ) ( ) ( 0 ) ( 1 ) (
Thus B(C)B(C)
Thus for any binary matrices A, B, C : A(B(C)) = (A(B)(C) and compose binary matrices is associative.
Result: If nn1n2n3 and there are Hadmard matrices of orders n1 , n2 , n3 then there is Hadmard matrix of order nn1n2n3.
Third. There is Identity for compose binary matrices that is Null matrix O = [0] and for any binary matrix A is A(O) = O(A) = A.
Forth. Compose binary matrices is not commutative: Example 6: 1 1 0 0 1 1 1 0 1 0 0 1 1 0 0 0 1 0 0 0 1 1 0 0 0 1 0 1 1 0 0 1 1 1 0 1 1 1 0 0 1 1 1 0 1 0 1 1 0 1 0 0 1 1 0 0 1 0 1 1 0 0 1 1 0 1 0 0 1 1 0 0 1 1 0 0 1 0 1 1 0 1 0 0 1 0 1 1 0 1 1 0 0 1 1 1 0 1
And clear that:
0
1
1
0
1
1
0
0
1
1
1
0
1
1
1
0
0
1
1
1
0
1
0
1
1
0
Fifth. For the binary matrix A there is no inverse A’ such A(A’) = A’(A) = O = [0].
Example 7: Suppose (a)a0,a1,a2,...,an1and
1 2
1 0, , ,...,
)
(b b b b bm are one period of two binary M-Sequences with the lengths n2k1 1
,m2k2 1 respectively, and the matrix A is the
all cyclic permutations of the sequence (a), the matrix B is the all cyclic permutation of the matrix (b).
Thus each row of the matrix A contains
) 1 2
( 1
1 1
k
n of “0.s”and n2 2k11of “1.s”.
The rows of the matrix A are closed under the addition mod 2 and any two different rows are orthogonal and contain f2 2k11disagreements
and f1 (2k111)of agreements, 2
1 2 1
k
r of
agreements are “1.s”and r2 (2k12 1) of
agreements are “0.s”.
Thus each row of the matrix B contains
) 1 2
( 1
1 2
k
m of “0.s” and m2 2k21of “1.s”.
The rows of the matrix B are closed under the addition mod 2 and any two different rows are orthogonal and contain g2 2k21
disagreements andg1 (2k211)of
agreements, h1 2k22of agreements are “1.s”
and h2 (2k22 1) of agreements are “0.s”.
Ahmad Hamza Al Cheikha, AJCSA, 2017; 1:10
Http://escipub.com/american-journal-of-computer-sciences-and-applications/ 0013
• The length of each row is:
1 ) 2 2 ( 2
) 1 2 )( 1 2
( 1 2 1 2 1 2
k k kk k k
nm
• The number of “1.s” is:
1 1 1
1 2
2 1
1 (2 1 1)(2 2 1) 2 1 2 2
k k k k
m n m n
1 ) 2 2
(
2 1 1 1
2 2 1
1 1 2 1 2
k k k
k m n m n
• The number of “0.s” is:
) 1 2
( 2 2
) 1 2
( 1 1 1 1
1 2 2
1 1 2 1 2
k k k
k m n m
n
) 2 2
(
2 1 1 1
1 2 2
1 1 2 1 2
k k k k
m n m n
• The difference between the number of “0.s” and the number of “1.s” is 1. Thus, the first condition of the orthogonal is exist.
❖ In the compositionAi(Bj)and Ai(Bk):
• The number of agreements is:
1 ) 2 2 ( 2
) 1 2 )( 1 2
( 1 1 1
1 1 2 1 2 1 2
k k k k
k k
g n
• The number of disagreements is:
1 1
1
2 (21 1)(2 2 ) 21 2 2 2
k k k k k
g
n .
• The difference d between the disagreements and agreements is:
1 2 1
k
d Thus, second condition of the orthogonal is unverified.
❖ In the compositionAi(Bk)and Aj(Bk):
• The number of agreements is:
1 ) 2 2
( 2
) 1 2 )( 1 2
( 2 1 1 1 2 1 1 1 2
1
k k k k
k k
f m
.
• The number of disagreements is:
1 1
1
2 (2 2 1)(21 ) 2 1 2 2 1
k k k k k
f
m .
• The difference d between the disagreements and agreements is:
1 2 2
k
d Thus, second condition of the orthogonal is unverified.
❖ In the compositionAi(Bk)and Aj(Bl):
• The number of agreements is: f1g1 f2g2.
• The number of disagreements is:
1 2 2
1g f g
f .
• The difference d between the disagreements and agreements is:
1 ] 2 ) 1 2 ][( 2 ) 1 2 [( ) )(
( 1 2 1 2 11 1 1 2 1 2 1
k k k k
g g f f d
Thus, second condition of the orthogonal is verified
For remove the non-orthogonal situations need think about extend the rows of the matrix A and the rows of the matrix B by adding “0” at the beginning each row of them, thus we have:
1 2
1 1 2
1
1 1 1 1
1, 2 , 2 , 2
2
k k k k
f f n
n n
1 2
1 1 2
1
1 2 2 2
2, 2 , 2 , 2
2
k k k k
g g m
m m
❖ In the composition A~(B~): where the “~” is the
signal of extending, and A~(B~)of the size
2 1 2
1 1)(2 1) 2 2
2
( k k k k .
• The length of each row is: 2
1 2 12 2
2k k k k
nm
• The number of “1.s” is:
1 1
1 1
1 2
2 1
1 21 2 2 2 1 2 2 2 1 2
k k k k k k
m n m n
• The number of “0.s” is:
1 1
1 1
1 1
2 2
1 21 2 2 2 1 2 2 2 1 2
k k k k k k
m n m n
• The difference between the number of “0.s” and the number of “1.s” is 0.
Thus, the first condition of the orthogonal is verified.
❖ In the compositionA~i(B~j)and A~i(B~k):
• The number of agreements is:
1 1
1 2 12 2 2 1 2
k k k k
g
n .
• The number of disagreements is:
1 1
2 212 2 2 1 2
k k k k
g
n .
• The difference d between the disagreements and agreements is: d 0 Thus, second condition of the orthogonal is verified.
❖ In the compositionA~i(B~k)and A~j(B~k):
• The number of agreements is:
1 1
1 2 221 2 1 2
k k k k
f
m .
• The number of disagreements is:
1 1
2 2 221 21 2
k k k k
f
m .
• The difference d between the disagreements and agreements is: d 0
Http://escipub.com/american-journal-of-computer-sciences-and-applications/ 0014 ❖ In the compositionA~i(B~k)and A~j(B~l):
• The number of agreements is: f1g1 f2g2.
• The number of disagreements is:
1 2 2
1g f g
f .
• The difference d between the disagreements and agreements is:
0 ) )(
( 1 2 1 2
f f g g d
Thus, second condition of the orthogonal is verified.
From example 1. And example 2.:
1 1 0 0 1 1 1 0 1 A , 0 0 0 1 0 1 1 1 0 0 0 1 0 1 1 1 0 0 0 1 0 0 1 1 0 0 0 1 1 0 1 1 0 0 0 0 1 0 1 1 0 0 0 0 1 0 1 1 0 , 1 1 1 0 1 0 0 0 1 1 1 0 1 0 0 0 1 1 1 0 1 1 0 0 1 1 1 0 0 1 0 0 1 1 1 1 0 1 0 0 1 1 1 1 0 1 0 0 1 B B And 0 0 0 1 0 1 1 1 0 0 0 1 0 1 1 1 0 0 0 1 0 0 1 1 0 0 0 1 1 0 1 1 0 0 0 0 1 0 1 1 0 0 0 0 1 0 1 1 0 0 0 0 1 0 1 1 1 0 0 0 1 0 1 1 1 0 0 0 1 0 0 1 1 0 0 0 1 1 0 1 1 0 0 0 0 1 0 1 1 0 0 0 0 1 0 1 1 0 1 1 1 0 1 0 0 0 1 1 1 0 1 0 0 0 1 1 1 0 1 1 0 0 1 1 1 0 0 1 0 0 1 1 1 1 0 1 0 0 1 1 1 1 0 1 0 0 1 1 1 1 0 1 0 0 0 1 1 1 0 1 0 0 0 1 1 1 0 1 1 0 0 1 1 1 0 0 1 0 0 1 1 1 1 0 1 0 0 1 1 1 1 0 1 0 0 1 0 0 0 1 0 1 1 1 0 0 0 1 0 1 1 1 0 0 0 1 0 0 1 1 0 0 0 1 1 0 1 1 0 0 0 0 1 0 1 1 0 0 0 0 1 0 1 1 0 0 0 0 1 0 1 1 1 0 0 0 1 0 1 1 1 0 0 0 1 0 0 1 1 0 0 0 1 1 0 1 1 0 0 0 0 1 0 1 1 0 0 0 0 1 0 1 1 0 0 0 0 1 0 1 1 1 0 0 0 1 0 1 1 1 0 0 0 1 0 0 1 1 0 0 0 1 1 0 1 1 0 0 0 0 1 0 1 1 0 0 0 0 1 0 1 1 0 1 1 1 0 1 0 0 0 1 1 1 0 1 0 0 0 1 1 1 0 1 1 0 0 1 1 1 0 0 1 0 0 1 1 1 1 0 1 0 0 1 1 1 1 0 1 0 0 1 0 0 0 1 0 1 1 1 0 0 0 1 0 1 1 1 0 0 0 1 0 0 1 1 0 0 0 1 1 0 1 1 0 0 0 0 1 0 1 1 0 0 0 0 1 0 1 1 0 ) (B A
❖ In the composition A(B):
• The length of each row is:
21 ) 7 ( 3 ) 1 2 )( 1 2
( 1 2
k k
nm
• The number of “1.s” is:
11 ) 4 ( 2 ) 3 ( 1 2 2 1
1m n m
n
• The number of “0.s” is:
10 ) 3 ( 2 ) 4 ( 1 1 2 2
1m n m
n
• The difference between the number of “0.s” and the number of “1.s” is 1.
Thus, the first condition of the orthogonal is exist.
❖ In the compositionAi(Bj)and Ai(Bk):
• The number of agreements is: ng1 3(3)9 • The number of disagreements is:
12 ) 4 ( 3
2
g
n .