Can anyone tell me how to generate a binary orthogonal complement of a given binary matrix ??
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.
Answers (1)
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
saydur rahman
on 13 Oct 2022
Edited: saydur rahman
on 13 Oct 2022
saydur rahman
on 13 Oct 2022
Edited: saydur rahman
on 13 Oct 2022
What is the underlying field for the vector space you consider ? Is it IR or Z_2 ? If it's IR, you don't need to consider binary vectors for the orthogonal complement, you you can just use Gram-Schmidt. So I guess it's Z_2. And in this case, you get the 63 vectors from above. Now it's up to you to sort out a basis.
saydur rahman
on 13 Oct 2022
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).
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!