Symbolic Logic
• Logical Form and Equivalence
• Conditional Statements
• Valid and Invalid Arguments
• Digital Logic Circuits (Boolean Polynomials)
1.1.1
Logic of Compound Statements
• A statement (or proposition) is a sentence that is
true (T) or false (F), but not both or neither.
• Examples:
Today is Monday.
x is even and x > 7.
If x2 = 4, then x = 2 or x = -2.
1.1.2
Counterexamples
• If a sentence cannot be judged to be T or F or is
not even a sentence, it cannot be a statement.
• Examples:
Open the door! (imperative)
Did you open the door? (interrogative)
If x2 = 4. (fragment)
1.1.3
Compound Statements
• Denote statements using the symbols p, q, r, ...
• Denote the operations ~,  (to be defined
shortly), where:
p  q - conjunction of p and q (p and q);
p  q - disjunction of p and q (p or q);
~ p - negation of p (not p);
p  q - implication of p and q (p implies q);
1.1.4
Compound Statements (cont’d.)
• A Compound statement (or statement form) is a
statement which includes at least one operation
and one other “atomic” statement.
• For example, “x = 7 and y = 2” is a compound
statement based on the “atomic” statements
p = “x = 7” and q = “y = 2”.
• In this instance, we can symbolize the compound
statement as r = p  q.
1.1.5
Compound Statements (cont’d.)
• The Truth Table of a compound statement is the
collection of all the output truth values
corresponding to all possible combinations of
input truth values of the atomic statements.
• Since each atomic statement can take on 1 of 2
values, 2 inputs have 4 combinations, 3 inputs
have 8, 4 inputs have 16, 5 inputs have 32, etc.
1.1.6
Logical Operations
• Negation: p ~p
T F
F T
• Conjunction: • Disjunction:
p q (p  q) p q (p  q)
T T T T T T
T F F T F T
F T F F T T
F F F F F F
1.1.7
Example: (p  q)  ~r
• Proceed from left to right:
p q r (p  q) ~r (p  q)  ~r
T T T T F F
T T F T T T
T F T T F F
T F F T T T
F T T T F F
F T F T T T
F F T F F F
F F F F T F
1.1.8
Logical Equivalence
• Two compound statements are logically
equivalent if they have the same truth table. We
denote this as p  q.
• p ~p ~(~p)
T F T
F T F hence p  ~(~p).
• ~(p  q)  ~p  ~q ?
No, since ~(T  F)  T, but (~T  ~F)  F.
1.1.9
Tautology & Contradiction
• A statement whose truth table is all “T” is called
a tautology, denoted as p  t.
• A statement whose truth table is all “F” is called
a contradiction, denoted as p  c.
• Clearly, ~t  c and ~c  t.
• Are all logical statements either tautology or
contradiction?
1.1.10
Algebra of Symbolic Logic
• Commutative Laws:
p  q  q  p
p  q  q  p
• Associative Laws:
(p q)  r  p  (q r)
(p q)  r  p  (q r)
• Distributive Laws:
p (q r)  (p q) (p r)
p (q r)  (p q) (p r)
1.1.11
Algebra of Symbolic Logic
• Identity Laws:
p  t  p
p  c  p
• Negation Laws:
p  ~p  c
p  ~p  t
• Double Negative Laws: ~(~p)  p
• Negations of t and c: ~t  c ~c  t
1.1.12
Algebra of Symbolic Logic
• Idempotent Laws: p  p  p p  p  p
• DeMorgan’s Laws:
~(p q)  ~p  ~q
~(p q)  ~p  ~q
• Universal Bound Laws: p  c  c p  t  t
• Absorption Laws:
p (p q)  p
p (p q)  p
1.1.13
Section 1.2
• Conditional Statements
• Logical Equivalences Involving Conditionals
• Converses, Inverses, and Contrapositives
• Biconditional Statements
1.2.14
Conditional Statements
• If p and q are statement variables, the conditional
or implication of q by p is “If p then q” or
“p implies q” and is denoted by p  q.
• The truth table of the implication operator is:
p q p  q
T T T
T F F
F T T
F F T
• Example: If you mow my lawn, I’ll pay $20.
1.2.15
Hypotheses & Conclusions
• In the form “If p then q” the statement p is called
the hypothesis and the statement q is the
conclusion.
• Conditionals form the basis of “deductive”
reasoning. (Aristotilean Logic)
• In looking at the truth table, we consider the
cases where the hypothesis is false to yield
vacuous results. The interesting cases are when
the hypothesis is true.
1.2.16
Logical Equivalences
• In the framework of symbolic logic, the
implication operator would seem to be a new and
distinct process.
• However, this is not the case!
• Theorem: p  q  ~p  q.
• Thus, we can always rewrite an implication as a
disjunction.
• Corollary: ~(p  q)  p  ~q.
1.2.17
Negation of a Conditional
• From the previous corollary, the negation of
p  q is p  ~q.
• For example, the negation of
If today is Sunday, then I wash my car.
is:
Today is Sunday and I do not wash my car.
1.2.18
Converse of a Conditional
• Given the statement p  q, we define its
converse to be the statement q  p.
• For example, the converse of
If today is Sunday, then I wash my car.
is:
If I wash my car, then today is Sunday.
1.2.19
Contrapositive of a Conditional
• Given the statement p  q, we define its
contrapositive to be the statement ~q  ~p.
• For example, the contrapositive of
If today is Sunday, then I wash my car.
is:
If I do not wash my car, then today is not Sunday.
1.2.20
Inverse of a Conditional
• Given the statement p  q, we define its inverse
to be the statement ~p  ~q.
• For example, the inverse of
If today is Sunday, then I wash my car.
is:
If today is not Sunday, then I do not wash my car.
1.2.21
Equivalent Forms
• Theorem: Given the statement p  q, we have
that p  q  ~q  ~p.
• Corollary: Given the statement p  q, we have
that q  p  ~p  ~q.
• Therefore from the above, we see that a
conditional and its contrapositive are logically
equivalent.
• Moreover, the statement’s converse and inverse
forms are logically equivalent to each other.
1.2.22
Biconditional Statements
• Definition: Given the statement variables p and
q, the biconditional of p and q is read, “p if and
only if q,” denoted p  q and means that both
p  q and q  p .
• By direct calculation: p q p q
T T T
T F F
F T F
F F T
1.2.23
Using the Biconditional
• Looking closely at the truth table, we see that
p  q is T whenever p and q have the same truth
value.
• Theorem: p  q is a tautology implies p  q and
conversely, p  q implies p q is a tautology.
• This gives us a systematic way to calculate
logical equivalence, rather then just scan the
matches of truth values by eye.
1.2.24
Section 1.3
• Valid and invalid argument forms.
• Special valid argument forms.
• Dilemmas
• Fallacies.
• Contradictions and valid arguments.
1.3.25
Valid and Invalid Arguments
• An argument (or argument form) is a sequence of
statements.
• All statements but the final one are called
premises, assumptions, or hypotheses.
• The final statement is called the conclusion.
• An argument form is valid provided its
conclusion is always true whenever all of its
premises are true.
1.3.26
Valid and Invalid Arguments
• An argument (or argument form) is a sequence of
statements.
• All statements but the final one are called
premises, assumptions, or hypotheses.
• The final statement is called the conclusion.
• An argument form is valid provided its
conclusion is always true whenever all of its
premises are true.
• The truth of the conclusion follows inescapably
from the truth of the hypotheses.
1.3.27
Testing for Validity
• Identify the premises and conclusion.
• Construct a truth table for the premises and
conclusion.
• Find the critical rows, where all premises are T.
• For each critical row, if the conclusion is also T,
then the argument is valid.
• If at least one critical row leads to a conclusion
being F, the argument is invalid.
• If there are no critical rows, the argument is
vacuously valid.
1.3.28
A Valid Argument
p (q  r)
~r
 (p  q)
Truth Table: p q r [p (q  r)] ~r (p  q)
T T T T F T
T T F T T T
T F T T F T
T F F T T T
F T T T F T
F T F T T T
F F T T F F
F F F F T F
1.3.29
An Invalid Argument
p (q  r)
~r
 (p  r)
Truth Table: p q r [p (q  r)] ~r (p  r)
T T T T F T
T T F T T T
T F T T F T
T F F T T T
F T T T F T
F T F T T F
F F T T F T
F F F F T F
1.3.30
Special Argument Forms
Modus Ponens: p q
p
 q
Truth Table: p q p q p q
T T T T T
T F F T F
F T T F T
F F T F F
Premises: If today is Sunday, then I wash my car.
Today is Sunday.
Conclusion: I wash my car.
1.3.31
Modus Tollens
Modus Tollens: p q
~q
 ~p
Truth Table: p q p q ~q ~p
T T T F F
T F F T F
F T T F T
F F T T T
Premises: If today is Sunday, then I wash my car.
I do not wash my car.
Conclusion: Today is not Sunday.
1.3.32
Disjunctive Addition
Disjunctive Addition: p
 p  q
Truth Table: p q p q
T T T
T F T
F T T
F F F
Premise: Today is Sunday.
Conclusion: Today is Sunday or I wash my car.
1.3.33
Conjunctive Simplification
Conjunctive Simplification: p  q
 p
also  q
Truth Table: p q p q
T T T
T F F
F T F
F F F
Premise: Today is Sunday and I wash my car.
Conclusion 1: Today is Sunday.
Conclusion 2: I wash my car.
1.3.34
Disjunctive Syllogism
Disjunctive Syllogism: p  q p  q
~p ~q
 q  p
Truth Table: p q p q ~p
T T T F
T F T F
F T T T
F F F T
Premises: Today is Sunday or Saturday.
Today is not Sunday.
Conclusion: Today is Saturday.
1.3.35
Hypothetical Syllogism
Hypothetical Syllogism: p  q
q  r
 p  r
Premises: If x is an integer, then x is a rational.
If x is a rational, then x is a real.
Conclusion: If x is an integer, then x is real.
1.3.36
Dilemma: Division Into Cases
Dilemma: p  q
p  r
q  r
 r
Premises: x is positive or x is negative.
If x is positive , then x2 is positive.
If x is negative, then x2 is positive.
Conclusion: x2 is positive.
1.3.37
Application: Find My Glasses
1. If my glasses are on the kitchen table, then I saw them at
breakfast.
2. I was reading in the kitchen or I was reading in the
living room.
3. If I was reading in the living room, then my glasses are
on the coffee table.
4. I did not see my glasses at breakfast.
5. If I was reading in bed, then my glasses are on the bed
table.
6. If I was reading in the kitchen, then my glasses are on
the kitchen table.
1.3.38
Find My Glasses (cont’d.)
Let: p = My glasses are on the kitchen table.
q = I saw my glasses at breakfast.
r = I was reading in the living room.
s = I was reading in the kitchen.
t = My glasses are on the coffee table.
u = I was reading in bed.
v = My glasses are on the bed table.
1.3.39
Find My Glasses (cont’d.)
Then the original statements become:
1. p  q 2. r  s 3. r  t
4. ~q 5. u  v 6. s  p
and we can deduce :
1. p  q 2. s  p 3. r  s 4. r  t
~q ~p ~s r
 ~p  ~s  r  t
Hence the glasses are on the coffee table!
1.3.40
Fallacies
• A fallacy is an error in reasoning that
results in an invalid argument.
• Three common fallacies:
– Using vague or ambiguous premises;
– Begging the question;
– Jumping to a conclusion.
• Two dangerous fallacies:
– Converse error;
– Inverse error.
1.3.41
Converse Error
If Zeke cheats, then he sits in the back row.
Zeke sits in the back row.
 Zeke cheats.
• The fallacy here is caused by replacing the
impication (Zeke cheats  sits in back)
with its biconditional form (Zeke cheats 
sits in back), implying the converse (sits in
back  Zeke cheats).
1.3.42
Inverse Error
If Zeke cheats, then he sits in the back row.
Zeke does not cheat.
 Zeke does not sit in the back row.
• The fallacy here is caused by replacing the
impication (Zeke cheats  sits in back)
with its inverse form (Zeke does not cheat
 does not sit in back), instead of the
contrapositive (does not sit in back  Zeke
does not cheat).
1.3.43
Contradiction Rule
• If you can show that assuming statement p
is false leads logically to a contradiction,
then you can conclude that p is true.
• In argument form: ~p  c
 p
• This is the logical heart of the proof method
called Proof by Contradiction.
1.3.44
Section 1.4
• Digital Logic Circuits
• Boolean Polynomials
• Normal Forms (Disjunctive/Conjunctive)
• Designing Circuits with Specified
Conditions
• Showing Two Circuits Are Equivalent
1.4.45
Digital Logic Circuits
• Developed by Claude Shannon in 1938 to
model telephone switching circuits:
x y
Series Switch
x AND y
x
y
Parallel Switch
x OR y
1.4.46
Logical Gates
• Instead of working with switches, we model
digital circuits using gates: AND-gates, OR-
gates, and NOT-gates.
• We draw these as:
x
y
x + y
OR
x
y
xy
AND
x x’
NOT
1.4.47
Notation
• Modeling digital circuits leads to the
equivalent analysis of symbolic logic.
• Symbolic Logic Digital Circuits
T, t 1, 1
F, c 0, 0
p, q, r, ... x, y, z, ...
~p x’
p  q xy
p  q x + y
1.4.48
Boolean Polynomials
• When modeling, we use Boolean
polynomials to describe algebraically the
function of a combinatorial circuit.
• A combinatorial circuit is one in which the
output at any time depends on the inputs at
the previous time. (i.e. no feedback loops)
• A Boolean polynomial is a function which
takes 0,1 inputs and outputs a 0 or 1 using
the operations AND, OR, and NOT.
1.4.49
Examples of Boolean Polynomials
• When working with Boolean polynomials,
we must first know the specific input
variables.
• Examples:
f(x,y,z) = x + y + z
f(x,y) = x’ + xy
f(x,y,z) = x(y + z’)
1.4.50
Evaluating Boolean Polynomials
• Using: x y x’ y’ (x + y) xy
1 1 0 0 1 1
1 0 0 1 1 0
0 1 1 0 1 0
0 0 1 1 0 1
• Examples: Find f(x,y) = x’+ xy
x y x’ xy (x’+ xy)
1 1 0 1 1
1 0 0 0 0
0 1 1 0 1
0 0 1 0 1
1.4.51
Normal Forms
• Expressing a Boolean Polynomial in its
normal form provides an easy method to
calculate its truth table.
• We can create two different normal forms
for Boolean Polynomials: the disjunctive
and the conjunctive normal form.
• These forms are made up of special terms
called minterms or maxterms.
1.4.52
Disjunctive Normal Form
• A minterm is a Boolean polynomial that is
only the product of each variable or its
negation (but not both).
• Examples: f(x,y) = xy’
f(x,y,z) = x’yz’
f(w,x,y,z) = wx’y’z
• The disjunctive normal form (DNF) is a
Boolean polynomial that is the sum of
minterms (sum of products).
1.4.53
Disjunctive Normal Form (cont’d.)
• Express f(x,y,z) = x + x’z in its DNF.
f(x,y,z) = x + x’z
= x(y + y’)(z + z’) + x’(y + y’)z
= (xy + xy’)(z + z’) + (x’y + x’y’)z
= xyz + xyz’+ xy’z + xy’z’+ x’yz + x’y’z
• The thing to note here is that each minterm
has an output of 1 at only a single,
particular line of the truth table.
• i.e. xy’z = 1 at 101 and = 0 elsewhere.
1.4.54
Disjunctive Normal Form (cont’d.)
• We can now think of the inputs, in fact, as
their associated minterms to get outputs:
x y z x y z f(x,y,z)
1 1 1 x y z 1
1 1 0 x y z’ 1
1 0 1 x y’z 1
1 0 0 x y’z’ 1
0 1 1 x’y z 1
0 1 0 x’y z’ 0
0 0 1 x’y’z 1
0 0 0 x’y’z’ 0
1.4.55
Designing Circuits
with Specified Conditions
• In the other direction:
x y z f(x,y,z)
1 1 1 0 0 0 0 0
1 1 0 0 0 0 0 0
1 0 1 1 1 0 0 0
1 0 0 0  0 + 0 + 0 + 0
0 1 1 1 0 1 0 0
0 1 0 1 0 0 1 0
0 0 1 1 0 0 0 1
0 0 0 0 0 0 0 0
f(x,y,z) = xy’z + x’yz + x’yz’+ x’y’z
1.4.56
Conjunctive Normal Form
• In a similar fashion, we can analyze
functions using the conjunctive normal
form - the product of sums.
• In this case, we look for the 0’s in the
function’s output and associate each with a
maxterm, whose output is 0 at that row.
1.4.57
Equivalent Circuits
• Two logical circuits are equivalent if and
only if they have the same truth table.
• This can be thought similarly as holding
when the two circuits have the same
disjunctive (conjunctive) normal form.
1.4.58

logic_lec4.ppt

  • 1.
    Symbolic Logic • LogicalForm and Equivalence • Conditional Statements • Valid and Invalid Arguments • Digital Logic Circuits (Boolean Polynomials) 1.1.1
  • 2.
    Logic of CompoundStatements • A statement (or proposition) is a sentence that is true (T) or false (F), but not both or neither. • Examples: Today is Monday. x is even and x > 7. If x2 = 4, then x = 2 or x = -2. 1.1.2
  • 3.
    Counterexamples • If asentence cannot be judged to be T or F or is not even a sentence, it cannot be a statement. • Examples: Open the door! (imperative) Did you open the door? (interrogative) If x2 = 4. (fragment) 1.1.3
  • 4.
    Compound Statements • Denotestatements using the symbols p, q, r, ... • Denote the operations ~,  (to be defined shortly), where: p  q - conjunction of p and q (p and q); p  q - disjunction of p and q (p or q); ~ p - negation of p (not p); p  q - implication of p and q (p implies q); 1.1.4
  • 5.
    Compound Statements (cont’d.) •A Compound statement (or statement form) is a statement which includes at least one operation and one other “atomic” statement. • For example, “x = 7 and y = 2” is a compound statement based on the “atomic” statements p = “x = 7” and q = “y = 2”. • In this instance, we can symbolize the compound statement as r = p  q. 1.1.5
  • 6.
    Compound Statements (cont’d.) •The Truth Table of a compound statement is the collection of all the output truth values corresponding to all possible combinations of input truth values of the atomic statements. • Since each atomic statement can take on 1 of 2 values, 2 inputs have 4 combinations, 3 inputs have 8, 4 inputs have 16, 5 inputs have 32, etc. 1.1.6
  • 7.
    Logical Operations • Negation:p ~p T F F T • Conjunction: • Disjunction: p q (p  q) p q (p  q) T T T T T T T F F T F T F T F F T T F F F F F F 1.1.7
  • 8.
    Example: (p q)  ~r • Proceed from left to right: p q r (p  q) ~r (p  q)  ~r T T T T F F T T F T T T T F T T F F T F F T T T F T T T F F F T F T T T F F T F F F F F F F T F 1.1.8
  • 9.
    Logical Equivalence • Twocompound statements are logically equivalent if they have the same truth table. We denote this as p  q. • p ~p ~(~p) T F T F T F hence p  ~(~p). • ~(p  q)  ~p  ~q ? No, since ~(T  F)  T, but (~T  ~F)  F. 1.1.9
  • 10.
    Tautology & Contradiction •A statement whose truth table is all “T” is called a tautology, denoted as p  t. • A statement whose truth table is all “F” is called a contradiction, denoted as p  c. • Clearly, ~t  c and ~c  t. • Are all logical statements either tautology or contradiction? 1.1.10
  • 11.
    Algebra of SymbolicLogic • Commutative Laws: p  q  q  p p  q  q  p • Associative Laws: (p q)  r  p  (q r) (p q)  r  p  (q r) • Distributive Laws: p (q r)  (p q) (p r) p (q r)  (p q) (p r) 1.1.11
  • 12.
    Algebra of SymbolicLogic • Identity Laws: p  t  p p  c  p • Negation Laws: p  ~p  c p  ~p  t • Double Negative Laws: ~(~p)  p • Negations of t and c: ~t  c ~c  t 1.1.12
  • 13.
    Algebra of SymbolicLogic • Idempotent Laws: p  p  p p  p  p • DeMorgan’s Laws: ~(p q)  ~p  ~q ~(p q)  ~p  ~q • Universal Bound Laws: p  c  c p  t  t • Absorption Laws: p (p q)  p p (p q)  p 1.1.13
  • 14.
    Section 1.2 • ConditionalStatements • Logical Equivalences Involving Conditionals • Converses, Inverses, and Contrapositives • Biconditional Statements 1.2.14
  • 15.
    Conditional Statements • Ifp and q are statement variables, the conditional or implication of q by p is “If p then q” or “p implies q” and is denoted by p  q. • The truth table of the implication operator is: p q p  q T T T T F F F T T F F T • Example: If you mow my lawn, I’ll pay $20. 1.2.15
  • 16.
    Hypotheses & Conclusions •In the form “If p then q” the statement p is called the hypothesis and the statement q is the conclusion. • Conditionals form the basis of “deductive” reasoning. (Aristotilean Logic) • In looking at the truth table, we consider the cases where the hypothesis is false to yield vacuous results. The interesting cases are when the hypothesis is true. 1.2.16
  • 17.
    Logical Equivalences • Inthe framework of symbolic logic, the implication operator would seem to be a new and distinct process. • However, this is not the case! • Theorem: p  q  ~p  q. • Thus, we can always rewrite an implication as a disjunction. • Corollary: ~(p  q)  p  ~q. 1.2.17
  • 18.
    Negation of aConditional • From the previous corollary, the negation of p  q is p  ~q. • For example, the negation of If today is Sunday, then I wash my car. is: Today is Sunday and I do not wash my car. 1.2.18
  • 19.
    Converse of aConditional • Given the statement p  q, we define its converse to be the statement q  p. • For example, the converse of If today is Sunday, then I wash my car. is: If I wash my car, then today is Sunday. 1.2.19
  • 20.
    Contrapositive of aConditional • Given the statement p  q, we define its contrapositive to be the statement ~q  ~p. • For example, the contrapositive of If today is Sunday, then I wash my car. is: If I do not wash my car, then today is not Sunday. 1.2.20
  • 21.
    Inverse of aConditional • Given the statement p  q, we define its inverse to be the statement ~p  ~q. • For example, the inverse of If today is Sunday, then I wash my car. is: If today is not Sunday, then I do not wash my car. 1.2.21
  • 22.
    Equivalent Forms • Theorem:Given the statement p  q, we have that p  q  ~q  ~p. • Corollary: Given the statement p  q, we have that q  p  ~p  ~q. • Therefore from the above, we see that a conditional and its contrapositive are logically equivalent. • Moreover, the statement’s converse and inverse forms are logically equivalent to each other. 1.2.22
  • 23.
    Biconditional Statements • Definition:Given the statement variables p and q, the biconditional of p and q is read, “p if and only if q,” denoted p  q and means that both p  q and q  p . • By direct calculation: p q p q T T T T F F F T F F F T 1.2.23
  • 24.
    Using the Biconditional •Looking closely at the truth table, we see that p  q is T whenever p and q have the same truth value. • Theorem: p  q is a tautology implies p  q and conversely, p  q implies p q is a tautology. • This gives us a systematic way to calculate logical equivalence, rather then just scan the matches of truth values by eye. 1.2.24
  • 25.
    Section 1.3 • Validand invalid argument forms. • Special valid argument forms. • Dilemmas • Fallacies. • Contradictions and valid arguments. 1.3.25
  • 26.
    Valid and InvalidArguments • An argument (or argument form) is a sequence of statements. • All statements but the final one are called premises, assumptions, or hypotheses. • The final statement is called the conclusion. • An argument form is valid provided its conclusion is always true whenever all of its premises are true. 1.3.26
  • 27.
    Valid and InvalidArguments • An argument (or argument form) is a sequence of statements. • All statements but the final one are called premises, assumptions, or hypotheses. • The final statement is called the conclusion. • An argument form is valid provided its conclusion is always true whenever all of its premises are true. • The truth of the conclusion follows inescapably from the truth of the hypotheses. 1.3.27
  • 28.
    Testing for Validity •Identify the premises and conclusion. • Construct a truth table for the premises and conclusion. • Find the critical rows, where all premises are T. • For each critical row, if the conclusion is also T, then the argument is valid. • If at least one critical row leads to a conclusion being F, the argument is invalid. • If there are no critical rows, the argument is vacuously valid. 1.3.28
  • 29.
    A Valid Argument p(q  r) ~r (p  q) Truth Table: p q r [p (q  r)] ~r (p  q) T T T T F T T T F T T T T F T T F T T F F T T T F T T T F T F T F T T T F F T T F F F F F F T F 1.3.29
  • 30.
    An Invalid Argument p(q  r) ~r (p  r) Truth Table: p q r [p (q  r)] ~r (p  r) T T T T F T T T F T T T T F T T F T T F F T T T F T T T F T F T F T T F F F T T F T F F F F T F 1.3.30
  • 31.
    Special Argument Forms ModusPonens: p q p q Truth Table: p q p q p q T T T T T T F F T F F T T F T F F T F F Premises: If today is Sunday, then I wash my car. Today is Sunday. Conclusion: I wash my car. 1.3.31
  • 32.
    Modus Tollens Modus Tollens:p q ~q ~p Truth Table: p q p q ~q ~p T T T F F T F F T F F T T F T F F T T T Premises: If today is Sunday, then I wash my car. I do not wash my car. Conclusion: Today is not Sunday. 1.3.32
  • 33.
    Disjunctive Addition Disjunctive Addition:p p  q Truth Table: p q p q T T T T F T F T T F F F Premise: Today is Sunday. Conclusion: Today is Sunday or I wash my car. 1.3.33
  • 34.
    Conjunctive Simplification Conjunctive Simplification:p  q p also q Truth Table: p q p q T T T T F F F T F F F F Premise: Today is Sunday and I wash my car. Conclusion 1: Today is Sunday. Conclusion 2: I wash my car. 1.3.34
  • 35.
    Disjunctive Syllogism Disjunctive Syllogism:p  q p  q ~p ~q q p Truth Table: p q p q ~p T T T F T F T F F T T T F F F T Premises: Today is Sunday or Saturday. Today is not Sunday. Conclusion: Today is Saturday. 1.3.35
  • 36.
    Hypothetical Syllogism Hypothetical Syllogism:p  q q  r p  r Premises: If x is an integer, then x is a rational. If x is a rational, then x is a real. Conclusion: If x is an integer, then x is real. 1.3.36
  • 37.
    Dilemma: Division IntoCases Dilemma: p  q p  r q  r r Premises: x is positive or x is negative. If x is positive , then x2 is positive. If x is negative, then x2 is positive. Conclusion: x2 is positive. 1.3.37
  • 38.
    Application: Find MyGlasses 1. If my glasses are on the kitchen table, then I saw them at breakfast. 2. I was reading in the kitchen or I was reading in the living room. 3. If I was reading in the living room, then my glasses are on the coffee table. 4. I did not see my glasses at breakfast. 5. If I was reading in bed, then my glasses are on the bed table. 6. If I was reading in the kitchen, then my glasses are on the kitchen table. 1.3.38
  • 39.
    Find My Glasses(cont’d.) Let: p = My glasses are on the kitchen table. q = I saw my glasses at breakfast. r = I was reading in the living room. s = I was reading in the kitchen. t = My glasses are on the coffee table. u = I was reading in bed. v = My glasses are on the bed table. 1.3.39
  • 40.
    Find My Glasses(cont’d.) Then the original statements become: 1. p  q 2. r  s 3. r  t 4. ~q 5. u  v 6. s  p and we can deduce : 1. p  q 2. s  p 3. r  s 4. r  t ~q ~p ~s r ~p ~s r t Hence the glasses are on the coffee table! 1.3.40
  • 41.
    Fallacies • A fallacyis an error in reasoning that results in an invalid argument. • Three common fallacies: – Using vague or ambiguous premises; – Begging the question; – Jumping to a conclusion. • Two dangerous fallacies: – Converse error; – Inverse error. 1.3.41
  • 42.
    Converse Error If Zekecheats, then he sits in the back row. Zeke sits in the back row. Zeke cheats. • The fallacy here is caused by replacing the impication (Zeke cheats  sits in back) with its biconditional form (Zeke cheats  sits in back), implying the converse (sits in back  Zeke cheats). 1.3.42
  • 43.
    Inverse Error If Zekecheats, then he sits in the back row. Zeke does not cheat. Zeke does not sit in the back row. • The fallacy here is caused by replacing the impication (Zeke cheats  sits in back) with its inverse form (Zeke does not cheat  does not sit in back), instead of the contrapositive (does not sit in back  Zeke does not cheat). 1.3.43
  • 44.
    Contradiction Rule • Ifyou can show that assuming statement p is false leads logically to a contradiction, then you can conclude that p is true. • In argument form: ~p  c p • This is the logical heart of the proof method called Proof by Contradiction. 1.3.44
  • 45.
    Section 1.4 • DigitalLogic Circuits • Boolean Polynomials • Normal Forms (Disjunctive/Conjunctive) • Designing Circuits with Specified Conditions • Showing Two Circuits Are Equivalent 1.4.45
  • 46.
    Digital Logic Circuits •Developed by Claude Shannon in 1938 to model telephone switching circuits: x y Series Switch x AND y x y Parallel Switch x OR y 1.4.46
  • 47.
    Logical Gates • Insteadof working with switches, we model digital circuits using gates: AND-gates, OR- gates, and NOT-gates. • We draw these as: x y x + y OR x y xy AND x x’ NOT 1.4.47
  • 48.
    Notation • Modeling digitalcircuits leads to the equivalent analysis of symbolic logic. • Symbolic Logic Digital Circuits T, t 1, 1 F, c 0, 0 p, q, r, ... x, y, z, ... ~p x’ p  q xy p  q x + y 1.4.48
  • 49.
    Boolean Polynomials • Whenmodeling, we use Boolean polynomials to describe algebraically the function of a combinatorial circuit. • A combinatorial circuit is one in which the output at any time depends on the inputs at the previous time. (i.e. no feedback loops) • A Boolean polynomial is a function which takes 0,1 inputs and outputs a 0 or 1 using the operations AND, OR, and NOT. 1.4.49
  • 50.
    Examples of BooleanPolynomials • When working with Boolean polynomials, we must first know the specific input variables. • Examples: f(x,y,z) = x + y + z f(x,y) = x’ + xy f(x,y,z) = x(y + z’) 1.4.50
  • 51.
    Evaluating Boolean Polynomials •Using: x y x’ y’ (x + y) xy 1 1 0 0 1 1 1 0 0 1 1 0 0 1 1 0 1 0 0 0 1 1 0 1 • Examples: Find f(x,y) = x’+ xy x y x’ xy (x’+ xy) 1 1 0 1 1 1 0 0 0 0 0 1 1 0 1 0 0 1 0 1 1.4.51
  • 52.
    Normal Forms • Expressinga Boolean Polynomial in its normal form provides an easy method to calculate its truth table. • We can create two different normal forms for Boolean Polynomials: the disjunctive and the conjunctive normal form. • These forms are made up of special terms called minterms or maxterms. 1.4.52
  • 53.
    Disjunctive Normal Form •A minterm is a Boolean polynomial that is only the product of each variable or its negation (but not both). • Examples: f(x,y) = xy’ f(x,y,z) = x’yz’ f(w,x,y,z) = wx’y’z • The disjunctive normal form (DNF) is a Boolean polynomial that is the sum of minterms (sum of products). 1.4.53
  • 54.
    Disjunctive Normal Form(cont’d.) • Express f(x,y,z) = x + x’z in its DNF. f(x,y,z) = x + x’z = x(y + y’)(z + z’) + x’(y + y’)z = (xy + xy’)(z + z’) + (x’y + x’y’)z = xyz + xyz’+ xy’z + xy’z’+ x’yz + x’y’z • The thing to note here is that each minterm has an output of 1 at only a single, particular line of the truth table. • i.e. xy’z = 1 at 101 and = 0 elsewhere. 1.4.54
  • 55.
    Disjunctive Normal Form(cont’d.) • We can now think of the inputs, in fact, as their associated minterms to get outputs: x y z x y z f(x,y,z) 1 1 1 x y z 1 1 1 0 x y z’ 1 1 0 1 x y’z 1 1 0 0 x y’z’ 1 0 1 1 x’y z 1 0 1 0 x’y z’ 0 0 0 1 x’y’z 1 0 0 0 x’y’z’ 0 1.4.55
  • 56.
    Designing Circuits with SpecifiedConditions • In the other direction: x y z f(x,y,z) 1 1 1 0 0 0 0 0 1 1 0 0 0 0 0 0 1 0 1 1 1 0 0 0 1 0 0 0  0 + 0 + 0 + 0 0 1 1 1 0 1 0 0 0 1 0 1 0 0 1 0 0 0 1 1 0 0 0 1 0 0 0 0 0 0 0 0 f(x,y,z) = xy’z + x’yz + x’yz’+ x’y’z 1.4.56
  • 57.
    Conjunctive Normal Form •In a similar fashion, we can analyze functions using the conjunctive normal form - the product of sums. • In this case, we look for the 0’s in the function’s output and associate each with a maxterm, whose output is 0 at that row. 1.4.57
  • 58.
    Equivalent Circuits • Twological circuits are equivalent if and only if they have the same truth table. • This can be thought similarly as holding when the two circuits have the same disjunctive (conjunctive) normal form. 1.4.58