Can anyone tell me how to generate a binary orthogonal complement of a given binary matrix ??

12 views (last 30 days)
I have been given a certain binary matrix of (K X N) dimension.
the matrix is S=
s =
[ 0 0 0 0 0 1 0 1 0 0 0 0;
0 0 0 1 0 0 0 0 1 0 0 0;
0 0 0 0 1 0 1 0 0 0 0 0;
1 0 0 1 0 0 0 0 1 0 1 0;
0 1 0 0 1 0 1 0 0 0 0 1;
0 0 1 0 0 1 0 1 0 1 0 0]
I need to find the binary orthogonal complement of S.

Answers (1)

Bruno Luong
Bruno Luong on 13 Oct 2022
I'm not expert of calculation in finit field, so just use brute force, there are 63 vectors that are orthogonal to the s you provide
s =[ 0 0 0 0 0 1 0 1 0 0 0 0;
0 0 0 1 0 0 0 0 1 0 0 0;
0 0 0 0 1 0 1 0 0 0 0 0;
1 0 0 1 0 0 0 0 1 0 1 0;
0 1 0 0 1 0 1 0 0 0 0 1;
0 0 1 0 0 1 0 1 0 1 0 0]
s = 6×12
0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 1 0 0 1 0 0 0 0 1 0 1 0 0 1 0 0 1 0 1 0 0 0 0 1 0 0 1 0 0 1 0 1 0 1 0 0
B=(dec2bin(1:2^size(s,2)-1)-'0')';
k=find(all(mod(s*B,2)==0,1));
t = B(:,k)
t = 12×63
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 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1
  6 Comments
saydur rahman
saydur rahman on 13 Oct 2022
the t needs to be binary . i think the inner product of two orthogonal complement matrix should be zero. if i chose t is the orthogonal complement basis and select any of the 6 form that, then multiplication of S^T(transpose of S) and t should be zero .
Torsten
Torsten on 14 Oct 2022
t is in the orthogonal complement of s if s*t = 0 (modulo 2).
This is true for all the 63 columns of t from above.
To get a basis of the orthogonal complement of s, you will have to check how many of the 6 rows of s are linear independent. If these are k <= 6, you will have to find 12 - k out of the 63 from the matrix t that are also linear independent.
Keep in mind that s*t = 0 means 0 modulo 2, not the "usual" 0. Thus results like 2, 4, 6,... for the entries of s*t are 0 (modulo 2).

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!