Skip to main content

solve_gf2

Function solve_gf2 

Source
pub fn solve_gf2(n: usize, rows: &[u64], rhs: &[bool]) -> Option<SolutionSpace>
Expand description

Solve a GF(2) system A x = b (each row a coefficient bit-vector in the low n bits, rhs the right-hand sides) for its entire solution space via Gaussian elimination to reduced row echelon form. Returns the symmetry-broken SolutionSpace (particular solution + kernel basis), or None iff the system is inconsistent. Generalizes crate::xorsat::solve, which returns just one witness.