Ask Your Question
1

Find binary solution over non square matrix

asked 2021-07-06 20:53:51 +0100

Sanu gravatar image

I have system of m homogeneous linear equations of n variables over GF(2) where m>n. We know all zero is a solution. How to find any other solution? I know there are other solutions as rank of the corresponding matrix < n.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2021-07-06 21:32:54 +0100

Max Alekseyev gravatar image

updated 2021-07-06 21:33:42 +0100

So you have a matrix equation over $GF(2)$ of the form $${\bf M}x = {\bf 0},$$ where $M$ is an $m\times n$ matrix. The solutions to this equation form the (right) kernel of $M$, which is a linear subspace of $GF(2)^n$.

In Sage, the kernel can be computed with function .right_kernel() - like in the example below:

sage: M = matrix(GF(2), [[1, 0, 1, 1], [1, 0, 0, 1]])                                                                                                                                                      
sage: K = M.right_kernel()                                                                                                                                                                                 
sage: K                                                                                                                                                                                                    
Vector space of degree 4 and dimension 2 over Finite Field of size 2
Basis matrix:
[1 0 0 1]
[0 1 0 0]
sage: list(K)                                                                                                                                                                                              
[(0, 0, 0, 0), (1, 0, 0, 1), (0, 1, 0, 0), (1, 1, 0, 1)]

In this example, the kernel $K$ of $M$ is spanned by two vectors. So, $K$ is composed of $2^2=4$ vectors, including the zero vector.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2021-07-06 20:53:51 +0100

Seen: 372 times

Last updated: Jul 06 '21