Null Space Binary Matrix : Java

隐身守侯 提交于 2019-12-06 16:53:55

The kernel of binary m-by-n matrix A is defined to be the set of binary vectors x such that Ax = 0.

Addition on the space is Boolean XOR: 0 + 0 = 1 + 1 = 0; 0 + 1 = 1 + 0 = 1.
Multiplication on the space is Boolean AND: 0 * 0 = 0 * 1 = 1 * 0 = 0; 1 * 1 = 1.

To compute the kernel basis for A, construct [A; I] and then perform elementary column operations to obtain [B; C] where B is in column echelon form. The columns of C underneath zero-columns of B are the kernel basis.

The process is described in more detail here: http://en.wikipedia.org/wiki/Kernel_(matrix)#Basis Note that the described algorithm will work for the binary case as well, even though it is not mentioned on the Wikipedia page.

I'd be surprised if you find a library that already does this, and it's trivial to implement, so I advise just coding it up yourself rather than looking for an existing solution.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!