Why it's hard to eliminate variables

Let’s examine why it’s hard to eliminate variables. I remember the code I looked at in SatElite that did it: it was crazy clean code and looked like it was pretty easy to perform. In this post I’ll examine how that simple code became more than a 1'000 lines of code today. What needs to be done, at first sight At first sight, variable elimination is easy. We just: Build occurrence lists Pick a variable to eliminate Resolve every clause having the positive literal of the variable with negative ones. Add newly resolved clauses into the system Remove original clauses. Goto 2. These are all pretty simple steps at first sight, and one can imagine that implementing them is maybe 50-100 lines of code, no more. So, let’s examine them one-by-one to see how they get complicated. ...

April 16, 2014 · 9 min · msoos

A note on learnt clauses

Learnt clauses are clauses derived while searching for a solution with a SAT solver in a CNF. They are at the heart of every modern so-called “CDCL” or “Conflict-Driven Clause-Learning” SAT solver. SAT solver writers make a very important difference between learnt and original clauses. In this blog post I’ll talk a little bit about this distinction, why it is important to make it, and why we might want to relax that distinction in the future. ...

December 6, 2013 · 7 min · msoos

Why CryptoMiniSat 3.3 doesn't have XORs

I’ve had a number of inquiries about why CryptoMiniSat 3.3 doesn’t have native XOR clause support. Let me explain what I think the benefits and the drawbacks are of having native XOR support and why I made the choice of removing them. Benefits The most trivial benefit is that users don’t have to translate XORs into plain CNF. Although transforming is rather easy, some prefer not to go through the hassle. The principle is to cut the XOR into smaller XORs by introducing new variables and then representing the cut-down XORs by banning all the wrong combinations. For example the the XOR x+y+z+w=0x+y+z+w=0x+y+z+w=0 is cut into two XORs x+y+r=0x+y+r=0x+y+r=0, z+w+r=0z+w+r=0z+w+r=0 and then x+y+r=0x+y+r=0x+y+r=0 is represented as x∨y∨r,x∨¬y∨¬r,…x \vee y \vee r, x \vee \neg y \vee \neg r, \ldotsx∨y∨r,x∨¬y∨¬r,…. ...

August 1, 2013 · 7 min · msoos