ee1j2 discrete maths lecture 6
Download
Skip this Video
Download Presentation
EE1J2 – Discrete Maths Lecture 6

Loading in 2 Seconds...

play fullscreen
1 / 31

EE1J2 – Discrete Maths Lecture 6 - PowerPoint PPT Presentation


  • 234 Views
  • Uploaded on

EE1J2 – Discrete Maths Lecture 6. Adequacy of a set of connectives Disjunctive and conjunctive normal form Adequacy of { , , , }, { , , }, { , } and { , } Every formula is logically equivalent to one in conjunctive normal form (or disjunctive normal form). Truth tables.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'EE1J2 – Discrete Maths Lecture 6' - petra


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
ee1j2 discrete maths lecture 6
EE1J2 – Discrete Maths Lecture 6
  • Adequacy of a set of connectives
  • Disjunctive and conjunctive normal form
  • Adequacy of {, , , }, {, , }, {, } and {, }
  • Every formula is logically equivalent to one in conjunctive normal form (or disjunctive normal form)
truth tables
Truth tables
  • So far we have seen how to build a truth table Tfor a given formula fin propositional logic
  • Today we’ll look at the opposite problem: Given a set of atomic propositions p1,…,pNand a truth table T, can we construct a formula f such that T is the truth table for f?
adequacy
Adequacy
  • A set of propositional connectives is adequate if
    • For any set of atomic propositions p1,…,pNand
    • For any truth table for these propositions,
    • There is a formula involving only the given connectives, which has the given truth table.
adequacy4
Adequacy
  • The goal of today’s lecture is to show that the set {, , , } is adequate and contains redundancy, in the sense that it contains subsets which are themselves adequate
  • We shall also introduce other sets of adequate connectives
some more definitions
Some more definitions…
  • f1, f2,…,fn a set of n formulae
  • f1 f2… fnis called the disjunction of f1, f2,…,fn
  • f1 f2… fnis called the conjunction of f1, f2,…,fn
  • Let p be an atomic proposition. A formula of the form p or p is called a literal
disjunctive normal form
Disjunctive Normal Form
  • A formula is in Disjunctive Normal Form(DNF) if it is a disjunction of conjunctions of literals.
  • Examples: (p, q, rand s atomic propositions)

p  q

(p)  (q)

(p  q) (p  r  s)

conjunctive normal form
Conjunctive Normal Form
  • A formula is in Conjunctive Normal Form (CNF) if it is a conjunction of disjunctions of literals
  • Examples:

p  q

(p)  (q)

(p  q)  (p)

….

truth functions
Truth Functions
  • A truth functionis a function  which assigns to a set of atomic propositions {p1,…,pN} a truth table (p1,…,pN) in which one of the truth values T or F is assigned to each possible assignment of truth values to the atomic propositions {p1,…,pN}.
truth functions9
p

q

T

T

F

T

F

T

F

T

T

F

F

F

Truth functions
  • p, q and r atomic propositions
  • Example truth function in {p, q}

22 rows

truth functions10
p

q

r

T

T

T

T

T

T

F

F

T

F

T

T

T

F

F

T

F

T

T

F

F

T

F

T

F

F

T

F

F

F

F

F

Truth functions
  • Example truth function in 3 atomic propositions {p, q, r}

23 rows

first theorem disjunctive normal form
First Theorem (Disjunctive Normal Form)
  • Theorem: Let  be a truth function. Then there is a formula in disjunctive normal form whose truth table is given by 
the symbol
The symbol 
  • Recall that the symbol  means logical equivalence
  • Two formulae are logically equivalent if they have the same truth table
corollaries to first theorem
Corollaries to First Theorem
  • Corollary 1: Any formula is logically equivalent to a formula in disjunctive normal form
  • To see this:
    • Let f be a formula
    • Construct the truth table for f
    • By the First Theorem there is a formula g in DNF which has this truth table
    • Then fg by definition
corollaries to first theorem14
Corollaries to First Theorem
  • Corollary 2: {, ,} is an adequate set of connectives
  • To see this, note:
    • Given any truth table we can construct a formula f in DNF which has that truth table
    • By definition of DNF, f only involves the connectives , ,
proof of first theorem
Proof of First Theorem
  • Letp1, p2,…,pn be the atomic propositions
  • Want a formula  in disjunctive normal form whose truth table is given by 
  • If  assigns the value F to every row of the truth table, just choose  = 
  • Otherwise, there will be at least one row for which the truth value is T. Let that row be row r
proof continued
Proof (continued)
  • let be the formula defined by:
  • Let fr be the conjunction

f(r)1 f(r)2f(r)3…f(r)n

  • frtakes the truth value Tfor the rth row of the truth table and F for all other rows.
proof continued17
Proof (continued)
  • Suppose that there are R rows r1,…,rR for which the truth value is T.
  • Define =
  • Clearly  is in disjunctive normal form
  • By construction  has the truth table defined by 
dnf example
DNF - Example

Let p, qand r be atomic propositions

Consider f = (p(q  r))  ((p  q)  r)

How do we put this in disjunctive normal form?

Use the construction from the proof of the First Theorem (DNF) from lecture 5.

truth table for f
(p

(q

r))

((p

q)

r)

T

T

T

T

T

T

T

T

T

T

T

T

F

T

F

F

T

T

T

T

F

F

T

T

F

T

T

T

T

F

F

T

T

T

T

F

T

F

T

T

F

F

T

F

F

T

T

T

T

T

F

T

T

T

T

F

T

T

F

F

F

F

T

T

F

F

F

T

F

T

T

T

F

T

F

T

T

F

T

F

T

F

F

F

T

F

F

F

Truth table for f
example continued
Example (continued)
  • First identify the rows in the truth table for which f is true
  • Then use these rows to construct the components of the DNF version of f:
    • From row 1: (p  q  r)
    • From row 2: (p  q  r)
    • From row 3: (p  q  r)
    • From row 4: (p  q  r)
    • From row 5: (p  q  r)
    • From row 7: (p  q  r)
example continued21
Example (continued)
  • Now combine these using ‘or’ symbols to obtain the desired formula in DNF:
    • (pq r)  (pqr)  (pqr)  (pqr)  (pqr)  (pqr)
corollary 1
Corollary 1
  • Any formula is logically equivalent to a formula in disjunctive normal form
    • Any formula gdefines a truth table
    • By the above theorem there is a formula f in disjunctive normal form which has the same truth table as g
    • Hencef is logically equivalent to g
corollary 2
Corollary 2
  • {, ,} is an adequate set of connectives
    • From the theorem, any truth table can be satisfied by a formula in disjunctive normal form.
    • By definition, such a formula only employs the connectives ,  and .
corollary 3
Corollary 3
  • {, } is an adequate set of connectives
    • Enough to show that  and  can both be expressed in terms of the symbols  and .
    • To see this, note that if f and g are formulae in propositional logic:

f  gis logically equivalent to (f g)

f  g is logically equivalent to f  g

corollary 4
Corollary 4
  • {, } and {, } are both adequate sets of connectives
    • Proof – homework
theorem 2
Theorem 2
  • Let  be a truth function. Then there is a formula in Conjunctive Normal Form (CNF) whose truth table is given by 
switching circuits
Switching Circuits
  • Connections between propositional logic and switching circuits
  • Can think of a truth table as indicating the ‘output’ of a particular circuit once its inputs have been set to ‘On’ or ‘Off’
  • Now know that any desired behaviour can be obtained provided that the gates of the circuit can instantiate the connectives ,  and 
nand and nor gates
Truth tables for nand and nor

p

q

p nand q

pnorq

T

T

F

F

T

F

T

F

F

T

T

F

F

F

T

T

nand and nor gates
  • Most common gates are nand gates and nor gates. Their truth tables are given by
theorem 3 adequacy of nand and nor
Theorem 3Adequacy of nand and nor
  • Theorem: The sets {nand} and {nor} are both adequate
  • Proof

{nand}: Since {, } is adequate, it is enough to show that  and  can be expressed in terms of nand.

Let p and q be atomic propositions. Then:

pp nand p

and

p  q (p nand q) nand (p nand q)

proof continued30
Proof (continued)
  • For {nor}: It is enough to notice that:

pp nor p

p  q (p nor p) nor (q nor q)

summary of lecture 6
Summary of Lecture 6

Adequacy of a set of connectives defined

  • Disjunctive and conjunctive normal form defined
  • Adequacy of {, , , }, {, , }, {, }, {, }, {nand} and {nor}
  • Every formula is logically equivalent to one in disjunctive normal form (DNF)
ad