Problem 1484. Conjunctive Normal Form
In Boolean logic, a formula is in conjunctive normal form (CNF) or clausal normal form if it is a conjunction of clauses, where a clause is a disjunction of literals. http://en.wikipedia.org/wiki/Conjunctive_normal_form
You are given a cell array list of literals present in each clause, whose literal-names are indicated by numbers. The index is -ve if it is to be negated. You are also given the truth value of these variables as a row vector.
Output the truth value of the proposition.
Ex (A | B) & (~B | C | ~D ) & (D | ~E) is true for A=C=D=true, B=E=false is represented as { [1 2] [-2 3 -4] [4 -5]} , [1 0 1 1 0] and this evaluates to true
The CNF conjuncts are not restricted to 3 variables (3CNF).
Solution Stats
Problem Comments
Solution Comments
Show commentsProblem Recent Solvers17
Suggested Problems
-
Number of 1s in the Binary Representation of a Number
444 Solvers
-
What is the distance from point P(x,y) to the line Ax + By + C = 0?
372 Solvers
-
Sum the entries of each column of a matrix which satisfy a logical condition.
162 Solvers
-
640 Solvers
-
Find the index of the largest value in any vector X=[4,3,4,5,9,12,0,4.....5]
378 Solvers
More from this Author10
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!