Given n Boolean variables x_1, x_2, ..., x_n in {0, 1} and an m-by-2 integer matrix clauses where each row [a, b] represents the disjunction (lit(a) OR lit(b)):
- Positive k (1 <= k <= n) denotes x_k
- Negative -k (-n <= -k <= -1) denotes NOT(x_k)
Return:
1. sat: logical scalar (true if satisfiable, false otherwise).
2. assign: if sat is true, a 1-by-n logical vector representing the LEXICOGRAPHICALLY SMALLEST satisfying assignment (minimizing x_1, then x_2, ..., then x_n). If sat is false, return false(1, 0).
Constraints:
- n <= 1000, m <= 6000.

Solution Stats

1 Solutions

1 Solvers

Last Solution submitted on Nov 30, 2026

Last 200 Solutions

Solution Comments

Show comments
Loading...

Problem Recent Solvers1

Suggested Problems

More from this Author31

Problem Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!