Propositional Logic, Normal Forms

(命題論理、標準形)

Discrete Mathematics I

4th lecture, October 6, 2017

http://www.sw.it.aoyama.ac.jp/2017/Math1/lecture4.html

Martin J. Dürst

AGU

© 2005-17 Martin J. Dürst Aoyama Gakuin University

Today's Schedule

About Moodle

If you have not yet registered for "Discrete Mathematics I" at http://moo.sw.it.aoyama.ac.jp, you must come to the front immediately after this lecture.

 

Summary of Last Lecture

Overview of Logical Operations

disjunction conjunction negation
or and not
precedence low middle high
A B AB AB ¬B
F F F F T
F T T F F
T F T F
T T T T

Laws for Logical Operations

  1. Idempotent laws: AA = A,   AA = A
  2. Commutative laws: AB = BA,   AB = BA
  3. Associative laws: (AB) ∧ C = A ∧ (BC),   (AB) ∨ C = A ∨  (BC)
  4. Distributive laws: (AB) ∧ C =  AC ∨ BC,
    AB ∨ C =  (AC) ∧ (BC)
  5. Absorption laws: A ∧ (AB) = A,   A ∨ AB = A
  6. Double negative: ¬¬A = A
  7. Law of excluded middle: A∨¬A = T
  8. Law of (non)contradiction: A∧¬A = F
  9. Properties of true and false: T∧A = A,   T∨A = T,   F∧A = F,   F∨A = A
  10. De Morgan's laws: ¬(AB) = ¬A∨¬B,   ¬(AB) = ¬A∧¬B

 

Questions about the Laws

Rewriting Logical Formulæ (simplification)

(A ∨ ¬B) ∧ B = (AB) ∨ (¬BB) = (AB) ∨ F = AB

¬(A ∨ ¬B) = ¬A ∧ ¬¬B = ¬AB

Application: Proof of absorption law from other laws

A ∧ (AB) = (AF) ∧ (AB) = A ∨ F∧B = A ∨ F = A

The Duality Principle for Logical Operations

When looking at the laws of logical operations, we see the following:

If we exchange all instances of ∧ and ∨, and T and F, we get another law.

Examples:
T ∧ A = A; dual: F ∨ A = A
AB) ∧ C = C∧¬ABC; dual: ¬ABC = (C∨¬A) ∧ (BC)

This is true in general. It can be proved using the truth tables for ∧ and ∨.

This is the duality principle.

It is very useful for remembering the laws of logical operations.

 

From a Truth Table to a Logical Formula

Assume we are given a truth table (boolean function) such as the following:

A B C ?
F F F F
F F T T
F T F F
F T T T
T F F T
T F T F
T T F T
T T T F

Can you find a logical formula for this truth table?

Is there a way to find a logical formula for every truth table (boolean function)?

 

Normal Forms

Disjunctive normal form: Disjunction of conjunction (of negation) of variables

Conjunctive normal form: Conjunction of disjunction (of negation) of variables

Properties of Normal Forms

 

Construction of Normal Forms

For disjunctive normal form [conjunctive normal form is given in [], based on duality principle]

  1. Look only at the rows in the truth table where the result is T [F]
  2. For each of these rows, construct the conjunction [disjunction] of all the variables (A, B, C,...)
  3. If the variable's value in a row is F [T], then add a negation to this variable in this row
  4. Construct the disjunction [conjunction] of all the formulæ created

Example of Normal Form

A B C ? Disjunctive Normal Form Conjunctive Normal Form
F F F T ¬A ∧ ¬B ∧ ¬C
F F T T ¬A ∧ ¬BC
F T F F - A ∨ ¬BC
F T T F - A ∨ ¬B ∨ ¬C
T F F F - ¬ABC
T F T T A ∧ ¬BC
T T F F - ¬A ∨ ¬BC
T T T T ABC

DNF: ¬A∧¬B∧¬C ∨ ¬A∧¬BCA∧¬BCABC

CNF: (A∨¬BC) ∧ (A∨¬B∨¬C) ∧ (¬ABC) ∧ (¬A∨¬BC)

 

Reason for Correctness

The constructed normal form is correct because:

 

Simplification of Normal Forms

Normal forms can get very long. It helps to simplify them. There are two methods:

Both methods do the same, but with different tools (formulæ vs. a diagram).

The Karnaugh map keeps the structure of the normal form
(disjunction of conjunction (of negation) for Disjunctive NF).

Using a different structure may allow a shorter formula.

 

Manipulation of normal form

Example for three-variable normal form: ABCA∧¬BC ∨ ¬A∧¬BC ∨ ¬A∧¬B∧¬CAC ∨ ¬A∧¬B

Attention: There is no single solution to simplification. Different simplification paths with different steps may lead to different results.

 

Karnaugh Map Example

A=F
B=F
A=T
B=F
A=T
B=T
A=F
B=T
C=F
D=F
T T F T
C=T
D=F
F T T F
C=T
D=T
F T T F
C=F
D=T
F F F T

Karnaugh Map Construction

Creating a simplification of a conjunctive normal form:

  1. Create a two-dimensional truth table. Each dimension uses (roughly) half of the variables.
    (3 variables: 4×2; 4 variables: 4×4; 5 variables: 8×4;...)
  2. Think about this table as a torus:
    The rightmost field in each row is the left neigbor of the leftmost field.
    The bottommost field in each column is the top neighbor of the topmost field.
  3. Arrange the truth values in each direction so that only one variable's value differs from row to row and from column to column.
  4. Concentrate on the fields with a T (fields with F can be left blank)
  5. Surround any two neighboring (according to step 2) fields with a line.
  6. Combine any neighboring groups of two fields from step 5 by surrounding them with a differently colored line. Extend this to groups of eight fields, and so on.
  7. Select a minimal number of groups so that all Ts are included. The groups can overlap. There may be several equally minimal solutions.
  8. Each surrounded group corresponds to a term a simplified formula. Construct this formula as follows: Eliminating variables that are both T and F for fields in the group. Keep the variables that have an uniform value, adding a negation if that value is false.

The same procedure can be used to create a disjunctive normal form (based on the duality principle).

 

This Week's Homework

Submit the solutions to the following two problems to Moodle as assignment Boolean Formulæ and Normal Forms.

Deadline: Thursday October 12, 2017, 22:00.

Format: Start with example, use plain text only; use Windows Notepad or another plain text editor

Keep the format, only replace the question marks

Caution: NO Microsoft Word, Microsoft Excel,...

File name: solution4.txt

 

Homework Problem One: All Boolean Functions of Two Variables

 

Homework Problem Two: Normal Forms

 

宿題: 論理関数と標準形

提出: 来週の木曜日 (10月12日)、22:00 (厳守)、Moodle にて。形式はに厳守 (プレーンテキスト, メモ帳など)。ファイル名は solution4.txt

Glossary

idempotent law
べき等律 (冪等律)
commutative law
交換律
distributive law
分配律
distribute
分配する
absorption law
吸収律
double negative
二重否定
simplification
簡略化
law of excluded middle
排中律
law of (non)contradiction
矛盾律
properties of true and false
真偽の性質
De Morgan's law
ド・モルガンの法則
simplification
単純化
duality principle
双対原理
dual
双対
normal form
標準形
disjunctive normal form
加法標準形 (選言標準形、変数の (否定の) 積の和)
conjunctive normal form
乗法標準形 (連言標準形、変数の (否定の) 和の積)
property
性質
low depth
深さが浅い
(logical, electronic) circuit
回路
term
manipulate
操作する
transform
変換
Karnaugh map
カルノー図表
torus
トーラス (ドーナツ型)
format
形式
plain text
プレーンテキスト
notepad (Windows application)
メモ帳
deduction
減点