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

First time here? Check out the FAQ!

Ask Your Question
0

Enumerate all solutions to linear system over finite field

asked 9 years ago

d125q gravatar image

updated 9 years ago

Assume I have a matrix A and a vector b, both over some finite field GF(q). I would like to enumerate _all_ solutions to Ax=b (there are only finitely many).

I can generate a particular solution using A \ b and I can generate the nullspace of A using A.right_kernel(), but how should I combine the two to enumerate all solutions?

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
0

answered 9 years ago

d125q gravatar image

updated 9 years ago

Okay, I found the solution. Finite vector spaces support iteration, so one can simply do:

particular_soln = A.solve_right(b)
for homogeneous_soln in A.right_kernel():
    particular_soln + homogeneous_soln
Preview: (hide)
link

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: 9 years ago

Seen: 1,236 times

Last updated: Nov 28 '15