An improved to ak max sat (max-sat problem)

11
By: Mohammad Khosravi , Reza Ramezani To: Dr Moosavi An improved to Ak-MaxSat 1 Electronic & Computer Department Isfahan University Of Technology

description

 

Transcript of An improved to ak max sat (max-sat problem)

Page 1: An improved to ak max sat (max-sat problem)

1

By: Mohammad Khosravi , Reza RamezaniTo: Dr Moosavi

An improved to Ak-MaxSat

Electronic & Computer Department

Isfahan University Of Technology

Page 2: An improved to ak max sat (max-sat problem)

2

Input:given a list of clauses C1, . . . ,Cm

Output:the maximum number of clauses which

satisfied. Unit Propagation (UP) algorithm use for

compute LB when we have at least one unit clause, otherwise we will use Failed literal detection.

Max-Sat Problem

Page 3: An improved to ak max sat (max-sat problem)

3

Let 1 be the Max-SAT instance{x1, x2, x3,¬x1 x4,¬x1 x5,¬x4 ¬x5,¬x1 ¬x2 ¬x3, x1 ¬x2}Q = [x1, x2, x3] x1 propagate{ x2, x3, x4, x5,¬x4 ¬x5, ¬x2 ¬x3}Q = [x2,x3,x4,x5] x2 propagate{x3, x4, x5,¬x4 ¬x5,¬x3}Q =[x3, x4, x5,¬x3]

UP, using one queue

Page 4: An improved to ak max sat (max-sat problem)

4

x3 propagate{#,x4, x5,¬x4 ¬x5}Inconsistent subformula detectedby UP is {x1, x2, x3,¬x1 ¬x2 ¬x3}The remaining clauses {¬x1 x4,¬x1 x5,¬x4 ¬x5, x1 ¬x2}

Continue UP processing

Page 5: An improved to ak max sat (max-sat problem)

5

{x1, x2, x3,¬x1 x4,¬x1 x5,¬x4 ¬x5,¬x1 ¬x2 ¬x3, x1 ¬x2}Q1 = [x1, x2, x3] x1 propagateQ1 = [ x2, x3]{ x2, x3, x4, x5,¬x4 ¬x5, ¬x2 ¬x3}Q2 = [x4, x5] x4 propagateQ2 = [x5,¬x5] x5 propagate

UP*, using two queues

Page 6: An improved to ak max sat (max-sat problem)

6

Inconsistent subformula : {x1,¬x1 x4,¬x1 x5,¬x4 ¬x5}

remaining clauses:{x2, x3,¬x1 ¬x2 ¬x3, x1 ¬x2}Q1 = [x2, x3] x2 propagate{x3,¬x1 ¬x3, x1 }Q1 = [x3]Q2 = [x1] x1 propagate

Continue UP* processing

Page 7: An improved to ak max sat (max-sat problem)

7

{x3, ¬x3 }Q2 = [¬x3 ] inconsistent subformula : {x2, x3,¬x1 ¬x2 ¬x3, x1 ¬x2}.

Continue UP* processing

Page 8: An improved to ak max sat (max-sat problem)

8

P={#,#, y ¬x,¬y z,¬y ¬z, y x} P U {x},with UP inconsistent subformula 1 = {x, y ¬x,¬y z,¬y ¬z},

P U {¬ x}, with UP inconsistent Subformula 2= {¬x,¬y z,¬y ¬z, y x} Final incosistant subformula=(1 U 2) \{x,¬x} = {y

¬x,¬y z,¬y ¬z, y x} We can use FL whit UP & UP*

Failed Literal Detection

Page 9: An improved to ak max sat (max-sat problem)

Solutions for solving maxsat efficiency:RulesUnit PropagationFailed Literal DetectionSelecting variables for propagationData Structure

Max-Sat Problem effective ways:

9

Page 10: An improved to ak max sat (max-sat problem)

10

Each variable order computed from: Binary-Length with two value. Unit-Length with one value. Total-Length that contain the number of clauses that

variable occurs.

W(i) is sum of all above weights. This weight will calculate for Var(i) and Var(-i). Final Variable’s weight is W(i) + W(-i) Each Variable with higher weight with select earlier for

propagation

AK Max-Sat idea

Page 11: An improved to ak max sat (max-sat problem)

11

Each variable order computed from: Binary-Length with three value. Unit-Length with two value. Third-Length with one value. Total-Length that contain the number of clauses that

variable occurs.

AKMax-Sat solver ReCompute this weights at each level, such as: propagate variable, remove variable and restore variable.

Our Max-Sat idea