Loading [MathJax]/jax/output/HTML-CSS/jax.js
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

answered 3 years ago

Max Alekseyev gravatar image

So you have a matrix equation over GF(2) of the form Mx=0, where M is an m×n matrix. The solutions to this equation form the (right) kernel of M, which forms a linear subspace in 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 22 vectors, including the zero vector.

click to hide/show revision 2
No.2 Revision

So you have a matrix equation over GF(2) of the form Mx=0, where M is an m×n matrix. The solutions to this equation form the (right) kernel of M, which forms is a linear subspace in 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 22 vectors, including the zero vector.

click to hide/show revision 3
No.3 Revision

So you have a matrix equation over GF(2) of the form Mx=0, where M is an m×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 22 22=4 vectors, including the zero vector.