Description-
Solving a 2-CNF formula (2-Satisfiability) by creating the corresponding implication graph, using Kosaraju's algorithm to find the Directly Connected Components (DCCs) and solving the 2-SAT
Examples-
Input : F = (x1 V x2) ^ (x2 V x1'}) ^ (x1' V x2')
Output : The given expression is satisfiable.
(for x1 = FALSE, x2 = TRUE)
Input : F = (x1V x2) ^ (x2 V x1') ^ (x1 V x2') ^ (x1' V x2')
Output : The given expression is unsatisfiable.
(for all possible combinations of x1 and x2)
2-SAT Solver using Kosaraju's Algorithm
Description- Solving a 2-CNF formula (2-Satisfiability) by creating the corresponding implication graph, using Kosaraju's algorithm to find the Directly Connected Components (DCCs) and solving the 2-SAT
Examples-
Input : F = (x1 V x2) ^ (x2 V x1'}) ^ (x1' V x2') Output : The given expression is satisfiable. (for x1 = FALSE, x2 = TRUE)
Input : F = (x1V x2) ^ (x2 V x1') ^ (x1 V x2') ^ (x1' V x2') Output : The given expression is unsatisfiable. (for all possible combinations of x1 and x2)