Self-subsuming resolution

Self-subsuming resolution in SAT uses the resolution operator to carry out its magic. Resolution can be used on two clauses if they share a variable, but the sign of the variable is inverted, e.g. v1 V v2 -v1 V v3 V v4 (where v1..v4 are binary variables and " V" means binary OR) can be resolved on v1, producing the clause: v2 V v3 V v4 In SAT this is used to simplify problems as follows. Let’s assume we have many clauses, among which there are these three: a V c (1) a V -c V d V f (2) a V -c V g (3) In this case, if we use the resolution operator on (1) and (2), we get: a V d V f (4) The interesting thing about (4) is that it is a strict subset of (2). In other words, we could simply replace (2) with (4), thus shortening clause (2). If we use the resolution operator on (1) and (3) we get: a V g (5) whose literals form a strict subset of those of (3), so we can replace (3) with (5), again shortening a clause. We shortened 2 clauses, each with one literal. For completeness, this technique can be applied in a recursive manner on all possible clause-pairs. ...

August 4, 2010 · 2 min · msoos

Asymmetric branching

Asymmetric branching is an algorithm that shortens CNF clauses in SAT Solvers. A clause, for instance v1 V v2 V v3 V v4 (where letters are binary variables and V represents binary OR) could possibly be shortened to v1 V v2 V v3. To find out if it can be, all we have to do is to put -v1,-v2 and -v3 into the propagation queue and then propagate. If we receive a conflict from the propagation engine, we can learn the clause v1 V v2 V v3, which (incidentally, though this was the point), subsumes the original clause, so we can simply remove variable v4 from the original clause. ...

July 28, 2010 · 3 min · msoos

Propagating faster

Propagation (BCP) in SAT is the single most expensive operation. The algorithm essentially does the following: while (queue_head < trail.size()) { Literal p = trail[queue_head]; vector<Watch>& thiswatch = watches[p]; for (i = thiswatch.begin(); i!=thiswatch[p].end(); i++) { confl = prop_confl(i->clause); if (confl != NULL) return confl; } queue_head++; } where the function prop_confl() executes the propagation or returns a conflict, if necessary. The problem with the above function is that clauses come in all shapes and sizes. In CryptoMiniSat, there are two kinds of clauses, normal clauses and XOR clauses. Naturally, these need to be handled differently. Furthermore, if the clause’s size is small, it is more efficient to handle it differently. The way CryptoMiniSat has done this before was to have a separate " watches" for each of these. As you can guess, this is very suboptimal. ...

July 26, 2010 · 3 min · msoos