I have two matrices. One is PR1
an identity matrix and another inverse identity matrix PR2
. Reference Matrix A is mentioned that can be 5x5 10x10 etc. According to that I1,I2 is created.Here it is mentioned 5x5 matrix.
The logical operations start with And= PR1 AND PR2 followed by Xor= PR1 XOR PR2.
A
matrix:
A =
0 1 1 1 0
1 0 1 1 0
1 1 0 1 1
1 1 1 0 1
0 0 1 1 0
I
is identity matrix
PR1 =
1 0 0 0 0
0 1 0 0 0
0 0 1 0 0
0 0 0 1 0
0 0 0 0 1
PR2 =
0 0 0 0 1
0 0 0 1 0
0 0 1 0 0
0 1 0 0 0
1 0 0 0 0
And =
0 0 0 0 0
0 0 0 0 0
0 0 1 0 0
0 0 0 0 0
0 0 0 0 0
Xor =
1 0 0 0 1
0 1 0 1 0
0 0 0 0 0
0 1 0 1 0
1 0 0 0 1
Now scan left to right of each row in And and Xor matrices. Place the first 1 as it is in the new row that is in R1 matrix. Trace for second one and do NOR operation between first one 1 row and second 1 row in A matrix in above matrix (1,5) is second 1 place so do NOR operation between 1st and 5th row place the answer in R1matrix. Similarly it has R1.
R1 =
1 0 0 0 1
0 0 0 0 0
0 0 1 0 0
0 1 0 0 0
1 0 0 0 1
Now replace R1 to PR2 new PR2 =
1 0 0 0 1
0 0 0 0 0
0 0 1 0 0
0 1 0 0 0
1 0 0 0 1
Again repated same process PR1 AND PR2 followed by PR1 XOR PR2
And =
1 0 0 0 0
0 0 0 0 0
0 0 1 0 0
0 0 0 0 0
0 0 0 0 1
Xor =
0 0 0 0 1
0 1 0 0 0
0 0 0 0 0
0 1 0 1 0
1 0 0 0 0
Now scan left to right of each row in And and Xor matrices. Place the first 1 as it is in the new row that is in R1 matrix. Trace for second one and do NOR operation between first one 1 row and second 1 row in A matrix in above matrix (1,5) is second 1 place so do NOR operation between 1st and 5th row place the answer in R2matrix.
R2=
1 0 0 0 1
0 1 0 0 0
0 0 1 0 0
0 0 0 1 0
1 0 0 0 1
check all column has minimum one 1 and stop
Logical Operations
) – kkuilla