1 / 27

Sat solving maximization and minimization problems

Student: Victoria Kravchenko Supervisors: P rof. Yoram Moses Liat Atsmon. Sat solving maximization and minimization problems. The Project Goal. Study and evaluate the approach of solving optimization problems through SAT reduction, and using SAT solvers to solve the reduced problems. SAT.

Télécharger la présentation

Sat solving maximization and minimization problems

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Student: Victoria Kravchenko Supervisors: Prof. Yoram Moses LiatAtsmon Sat solving maximization and minimization problems

  2. The Project Goal Study and evaluate the approach of solving optimization problems through SAT reduction, and using SAT solvers to solve the reduced problems.

  3. SAT • Boolean satisfiability problem (x1+x5’+x4) (x1’+x5+x3+x4) (x3’+x4’) • NP-Complete • CNF (Conjunctive Normal Form) – “AND of ORs”

  4. MiniSat • Developed at 2003 byNiklasEén and NiklasSörensson • Advantages: open-source, successful, small.

  5. The MiniSat input form For: (x1+x5’+x4) (x1’+x5+x3+x4) (x3’+x4’) p cnf 5 3 → p cnfnumber_of_variablesnumber_of_clauses 1 -5 4 0 → 0 is the end of the clause -1 5 3 4 0 -3 -4 0

  6. The Project • PART 1: Equation Checker • PART 2: SAT with Optimization • PART 3: Maximal Acyclic Subgraph

  7. The equation checker • Input: X, Y, Z – decimal numbers • Output: whether X+Y=Z or not • Calculates the binary form of the numbers • The program preparesthe input for MiniSatusing the table:

  8. The equation checker • For the LSB bit:

  9. The equation checker

  10. SAT with Optimization • Input: Vec – x0,x1,x2,… Phi – CNF expression • Output: maximal value of Vec (as a binary number) which satisfies Phi

  11. SAT with Optimization • Versions: • Bit by Bit: • MiniSat condition: MSB 1? 1 1? 0 1? 1 ?1 ? 1 ? 0 1 1 ? 0 0 ? 1 0 ? 1

  12. Maximal Acyclic Subgraph • Input: graph name nodes – [node_number],[node_weight] edges – [node_from],[node_to] For example: ex1 1,2-2,2-3,1 1,2-2,3-3,1 1(2) 2(2) 3(1)

  13. Maximal Acyclic Subgraph • Output: maximal acyclic subgraph 1(2) 2(2) 3(1)

  14. Example 1 P 1 (1) 2 (2) 3 (2) 4 (3) 5 (3) lsg ex1 1,1-2,2-3,2-4,3-5,3 1,2-1,3-2,3-2,4-4,5-5,3

  15. Example 2 1 (1) 2 (2) 3 (2) 4 (3) 5 (3) lsg ex2 1,1-2,2-3,2-4,3-5,3 1,2-3,1-2,3-2,4-4,5-5,3

  16. Example 3 1 (2) 2 (1) 3 (2) 4 (3) 5 (3) lsgex3 1,2-2,1-3,2-4,3-5,3 1,2-3,1-2,3-2,4-4,5-5,3

  17. Example 4 1 (1) 2 (2) 3 (2) 4 (3) 5 (3) lsgex4 1,1-2,2-3,2-4,3-5,3 1,2-3,1-2,3-2,4-4,5-5,2-5,3

  18. Example 5 1 (1) 2 (4) 3 (2) 4 (3) 5(1) lsgex5 1,1-2,4-3,2-4,3-5,1 1,2-3,1-2,3-2,4-4,5-5,2-5,3

  19. How Does It Work? For each edge: • Define: [node_from] > [node_to] • Condition: • Translate the condition to CNF using a tree (reduction to 3-SAT)

  20. How Does It Work? Building the weighted sum: • [node] x [weight]: Y1[m vars] ↔ X1[node number] x W1[m vars] Y2[m vars] ↔ X2[node number] x W2[m vars] • Sum the intermediate variables as in the Equation Checker: Z1[m vars]↔ Y1[m vars] + Y2[m vars] • Continue summing: Z2[m vars]↔ Z1[m vars] + Y3[m vars] • Save the last intermediate variables representing the accumulated sum: Z(n-1) [m vars] ↔ Z(n-2) [m vars] + Yn[m vars] • Zfinal↔ X1*W1 + X2*W2 + … + Xn*Wn

  21. How Does It Work? • Get a result from the MiniSat using only the edges conditions and extract the weight Wres • Demand a new result with a greater weight s.t. Zfinal > Wres • Continue until the conditions can not be saturated

  22. Results

  23. Results

  24. Results

  25. Results

  26. Conclusions • The graphs are polynomial and not exponential although the problem in NP complete – success! • Nodes have a stronger effect on the run time.

  27. Thank you for your attention!

More Related