2-SAT (X1V-X2)A(X2V-x3)A(X4VX3)(x5VX1)(X4V-X5) clauses X1 X2 X3 Xa X5 current F T F T Find an unsatisfied clause:(XV-X2) flip one of the value of xi and x2 randomly -If we flip x1,then we jump from 3 to 4 If we flip x2,then we jump from 3 to 2
2-SAT • (x1∨¬x2 )∧(x2∨¬x3 )∧(x4∨x3 )∧(x5∨x1 )∧(x4∨¬x5 ) • Find an unsatisfied clause: (x1∨¬x2 ) • flip one of the value of x1 and x2 randomly – If we flip x1 , then we jump from 3 to 4 – If we flip x2 , then we jump from 3 to 2 x1 x2 x3 x4 x5 current F T T F T clauses
2-SAT (X1V-X2)^(X2V-X3)^(X4VX3)A(x5VX1)A(X4V-X5) clauses X1 X2 X3 Xa X5 current F F T F T Find an unsatisfied clause:(X2 V-X3) flip one of the value of x2 and x3 randomly If we flip x2,then we jump from 2 to 3 If we flip x3,then we jump from 2 to 1
2-SAT • (x1∨¬x2 )∧(x2∨¬x3 )∧(x4∨x3 )∧(x5∨x1 )∧(x4∨¬x5 ) • Find an unsatisfied clause: (x2∨¬x3 ) • flip one of the value of x2 and x3 randomly – If we flip x2 , then we jump from 2 to 3 – If we flip x3 , then we jump from 2 to 1 x1 x2 x3 x4 x5 current F F T F T clauses
2-SAT (X1V-X2)A(X2V-x3)A(X4VX3)(x5VX1)(X4V-X5) clauses X1 X2 X3 Xa X5 current F T T F T Find an unsatisfied clause:(XV-X2) flip one of the value of xi and x2 randomly -If we flip x1,then we jump from 3 to 4 If we flip x2,then we jump from 3 to 2
2-SAT • (x1∨¬x2 )∧(x2∨¬x3 )∧(x4∨x3 )∧(x5∨x1 )∧(x4∨¬x5 ) • Find an unsatisfied clause: (x1∨¬x2 ) • flip one of the value of x1 and x2 randomly – If we flip x1 , then we jump from 3 to 4 – If we flip x2 , then we jump from 3 to 2 x1 x2 x3 x4 x5 current F T T F T clauses
2-SAT (X1V-X2)^(X2V-X3)^(X4Vx3)A(x5VX1)A(X4V-X5) clauses X1 X2 X3 Xa s current T T T F T Find an unsatisfied clause:(X4V-X5) flip one of the value of x4 and x5 randomly If we flip xa,then we jump from 4 to 5 If we flip xs,then we jump from 4 to 3
2-SAT • (x1∨¬x2 )∧(x2∨¬x3 )∧(x4∨x3 )∧(x5∨x1 )∧(x4∨¬x5 ) • Find an unsatisfied clause: (x4∨¬x5 ) • flip one of the value of x4 and x5 randomly – If we flip x4 , then we jump from 4 to 5 – If we flip x5 , then we jump from 4 to 3 x1 x2 x3 x4 x5 current T T T F T clauses
2-SAT (X1V-X2)A(X2V-x3)(X4VX3)(x5VX1)(X4V-X5) clauses X1 X2 X3 Xa X5 current T T T T T Find an unsatisfied clause:none We have a satisfying assignment!=
2-SAT • (x1∨¬x2 )∧(x2∨¬x3 )∧(x4∨x3 )∧(x5∨x1 )∧(x4∨¬x5 ) • Find an unsatisfied clause: none • We have a satisfying assignment! =) x1 x2 x3 x4 x5 current T T T T T clauses