Eroxl's Notes
Creating a Statement from Truth Tables

Statements can be created from truth tables using a variety of methods.

Brute-Force Solution

The brute force solution is easy to do and works on all truth tables but is inefficient and produces very large statements.

  1. Focus on rows that output true
  2. Each row should be translated as a conjunction between all inputs, with each variable that is false represented by its negation
  3. Connect each proposition you found as a Connect disjunction.

Example

Check if a Binary Number Number is Divisible by 4

Number
F F F F T
F F F T F
F F T F F
F F T T F
F T F F T
F T F T F
F T T F F
F T T T F
T F F F T
T F F T F
T F T F F
T F T T F
T T F F T
T T F T F
T T T F F
T T T T F

Notice how this expression uses 1 term for each true statement in the output .

Solving by Spotting Patterns

  1. Focus on the rows that output `true.
  2. Find something in common among some of the rows, that no other row has.
  3. Create a proposition for that pattern and now try to match the rows that are not represented yet.
  4. You may use a row more than once and you may use brute-force to represent one row that you can not match with any other.
  5. You have to use all rows that output true at least once.

Example

Check if a Binary Number Number is Divisible by 4

Number
F F F F T
F F F T F
F F T F F
F F T T F
F T F F T
F T F T F
F T T F F
F T T T F
T F F F T
T F F T F
T F T F F
T F T T F
T T F F T
T T F T F
T T T F F
T T T T F

You can notice that the rows where the binary number is divisible by 4 have a common pattern where the last two columns ( and ) are both false.

Notice how this expression is a lot simpler and more concise than the brute-force solution.