sat solver

User Generated

cts13

Computer Science

Description

Goal

  • Write a program (python or java or c/c++) that solves 3-coloring using the MiniSat solver
    • Input: a graph to be 3-colored
    • Output: corresponding boolean formula (as explained in previous video)that can be fed into MiniSAT
    • Input FormatIn the input files, the graphs are represented with adjacency lists:Each row represents the list for a node: first row for node a, second row for node b etc....Example:b c
      a c d
      a b
      brepresents a graph where:1) Node a is connected to nodes b and c
      2) Node b is connected to nodes a, c, and d
      3) Node c is connected to nodes a and b
      4) Node d is connected to nodes b

Unformatted Attachment Preview

SAT Solvers • SAT is NP-Complete • In practice SAT-solvers routinely solve instances of thousands of variables Solving Hard Problems • One way to solve a hard NP-complete problem is to reduce it to SAT • Then use a SAT solver (example: MiniSAT) MiniSAT • You can install MiniSAT on your machine but you can also use an online MiniSAT here https://msoos.github.io/cryptominisat_web/ How to use MiniSAT • Consider boolean expression • 3 clauses 3 variables • Format for MiniSAT is p cnf 3 3 1 -2 0 2 -3 0 -1 3 0 3-Coloring • Watch here how to reduce an instance of 3-coloring to a SAT formula https://www.youtube.com/watch?v=HhFSgXbWiWY Goal of the Assignment Write a program (python or java or c++) that solves 3-coloring using the MiniSat solver • • Input: a graph to be 3-colored • Output: corresponding boolean formula (as explained in previous video) that can be fed into MiniSAT b c a c d a b b b a e c a d f e a e b c c d f b d a e f d f c b b a a b d a b c d e f g h i j i h g f g c d e e c j j i h f
Purchase answer to see full attachment
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Explanation & Answer

Hello, I used python because it was...

Similar Content

Related Tags