Truth table to compound proposition

Given a truth table, how do we find an expression using the input variables and logical operators that has the output values specified in this table?

Application: design a circuit given a desired input-output relationship.

Input Output
\(p\) \(q\) \(mystery_1\) \(mystery_2\)
\(T\) \(T\) \(T\) \(F\)
\(T\) \(F\) \(T\) \(F\)
\(F\) \(T\) \(F\) \(F\)
\(F\) \(F\) \(T\) \(T\)

Expressions that have output \(mystery_1\) are

Expressions that have output \(mystery_2\) are

Idea: To develop an algorithm for translating truth tables to expressions, define a convenient normal form for expressions.

Dnf cnf definition

Definition An expression built of variables and logical operators is in disjunctive normal form (DNF) means that it is an OR of ANDs of variables and their negations.

Definition An expression built of variables and logical operators is in conjunctive normal form (CNF) means that it is an AND of ORs of variables and their negations.