Can anyone tell me how to generate a binary orthogonal complement of a given binary matrix ??
12 views (last 30 days)
Show older comments
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.
0 Comments
Answers (1)
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]
B=(dec2bin(1:2^size(s,2)-1)-'0')';
k=find(all(mod(s*B,2)==0,1));
t = B(:,k)
6 Comments
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).
See Also
Categories
Find more on Logical in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!