Disjunctive Normal Form - MATLAB Cody - MATLAB Central

Problem 1496. Disjunctive Normal Form

  • Created by G K
Difficulty:Rate

This problem is the companion to Problem 1484. In Boolean logic, a formula is in disjunctive normal form (DNF) if it is a disjunction of clauses, where each clause is a conjunction of literals. http://en.wikipedia.org/wiki/Disjunctive_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 DNF disjuncts are not restricted to 3 variables (3DNF).

Problem 11) Prev: 1486 Next:

Solution Stats

81.82% Correct | 18.18% Incorrect
Last Solution submitted on Oct 26, 2022

Problem Comments

Solution Comments

Show comments
R2025a Pre-release highlights
This topic is for discussing highlights to the current R2025a Pre-release.
14
6

Problem Recent Solvers17

Suggested Problems

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!
Go to top of page