&
will stand forAND
|
will stand forOR
!
will stand forNOT
(A & B) | (C & D & E) | F
(A | B) & (C | D | E) & F
A solution will stand for any subsitution of variables (to 1s or 0s) that results in the general equation being a tautology
Converting (A | B) & (C | D | E) & F
to DNF
Concept1: split up and foil, then repeat
- Split up :
((A | B) & (C | D | E)) & F
- Foil :
(((A | B) & C) | ((A | B) & D) | ((A | B) & E))) & F
- Foil :
((A & C) | (B & C) | (A & D) | (B & D) | (A & E) | (B & E)) | F
- Foil :
(A & C & F) | (B & C & F) | (A & D & F) | (B & D & F) | (A & E & F) | (B & E & F)
Vice versa works with DNF to CNF.
DNF form is a concise representation of every single possible "solution" to a boolean equation.
Ways of operating on DNFs, while keeping them as DNFs
DNF1
=> stays DNFDNF1 | DNF2
=> stays DNFDNF1 & DNF2
=> foil
DNF1 = (A & B) | (A & C & D) DNF2 = (E & F) | (G & H & I) | K [(A & B) | (A & C & D)] & [(E & F) | (G & H & I) | K] == (A & B & [(E & F) | (G & H & I) | K]) | (A & C & D & [(E & F) | (G & H & I) | K]) == (A & B & E & F) | (A & B & G & H & I) | (A & B & K) | (A & C & D & E & F) | (A & C & D & G & H & I) | (A & C & D & K) Resulting DNF (A & B & E & F) | (A & B & G & H & I) | (A & B & K) | (A & C & D & E & F) | (A & C & D & G & H & I) | (A & C & D & K)
!DNF1
=> de morgans then apply&
's foil (CNF to DNF)
DNF1 = (A & B) | (A & C & D) ![(A & B) | (A & C & D)] == (!A | !B) & (!A | !C | !D) ;; Demorgans results in this ;; worth noting that now this is just an `&` between two (simple) DNFs == (!A & !A) | (!A & !C)| (!A & !D) | (!B & !A) | (!B & !C) | (!B & !D) Resulting DNF (!A & !A) | (!A & !C)| (!A & !D) | (!B & !A) | (!B & !C)| (!B & !D)
&
and !
take polynomial time, while |
takes O(1)
Rules of DNF simplification:
Fact: every DNF is a series of CNF's bounded by
OR
s
- Subclause simplification
(0 & ...X)
=>0
(1 & ...X)
=>(...X)
(A & !A & ...X)
=>0
(A & A & ...X)
=>(...X)
- Global simplification
(...X) | (...X) | ...Y
=>X | ...Y
(A & ...X) | (!A & ...X) | ...Y
=>(...X) | ...Y