0% found this document useful (0 votes)
92 views45 pages

Logic & Circuit-2

This document provides information about the Discrete Mathematics course CSC1201 including the instructor's name and email. It then discusses logical implications and provides truth tables to examine the relationships between implications, converses, inverses, biconditionals, and other logical concepts. Examples of valid and invalid arguments are also presented using truth tables.

Uploaded by

Muhammed Ahmed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
92 views45 pages

Logic & Circuit-2

This document provides information about the Discrete Mathematics course CSC1201 including the instructor's name and email. It then discusses logical implications and provides truth tables to examine the relationships between implications, converses, inverses, biconditionals, and other logical concepts. Examples of valid and invalid arguments are also presented using truth tables.

Uploaded by

Muhammed Ahmed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 45

Course # CSC1201

Discrete Mathematics
Structures

Instructor: Aqil Khan

Email: 2019aqilkhan@gmail.com
Examples of Implies
Converse will not follow
p = Ali lives in Multan
q = Ali lives in Pakistan
If p then q not p unless q
p implies q q follows from p
If p, q q if p
p only if q q whenever p
p is sufficient for q
q is necessary for p
Implies →

1- An Implication is logically
equivalent to its counter positive.

2- the Converse and Inverse of


Implication are logically equivalent
3- An implication is not equivalent to
its converse.
Example when both Implies and
converse is equivalent
p= You work hard
q= You get good grades
p→q ≡ if p then q
If you work hard you get good grade
q→p ≡ if q then p
≡ q only if p
You get good grades only if you
work hard
Biconditional ↔
p if, only if, q
p↔q
if and only if, iff
It will be true if both p and q are true
or both false
p q p↔q
T T T
T F F
F T F
F F T
Example
1- 1+1=3 If and only if Earth is flat
F↔F = T
2- Sky is blue if 1=0
T↔F = F
3- Milk is white if birds lay eggs
T↔T = T
4- x > 5 if x ² > 25
F(-6<5 but -6²>25)
Biconditional ≡ Conjunction Of
Two conditional
p ↔ q ≡ (p → q )ʌ (q → p)

p q p↔q p→q q→p (p → q )ʌ (q → p)


T T T T T T
T F F F T F
F T F T F F
F F T T T T

p↔q≡q↔p
Example
1- If it is hot outside you buy an ice-
cream cone. And if you buy an ice-
cream cone it is hot outside
(p → q )ʌ (q → p)
You buy an ice-cream cone if and
only if it is hot outside
p↔q
Truth Table
(p → q ) ↔ (~q → ~p )

p q (p → q ) ~q ~p (~q → ~p ) (p → q ) ↔ (~q → ~p )
T T T F F T T
T F F T F F T
F T T F T T T
F F T T T T T

p ʌ ~r ↔ q ˅ r
Truth Table
(p ↔ q ) ↔ (r ↔ q )

p q r p↔q r↔q (p ↔ q ) ↔ (r ↔ q )
T T T T T T
T F F T F F
T T T F F T
T F F F T F
F T T F T F
F T F F F T
F F T T F F
F F F T T T
Truth Table
~(p  q ) ≡ p ↔ q

p q (p  q ) ~(p  q ) (p ↔ q )
T T F T T
T F T F F
F T T F F
F F F T T
Laws of Logic
1- Commutative Laws
e.g: p↔q ≡ q↔p

2- Implication Law
e.g: p→q ≡ ~ p ˅ q ≡ ~(p ʌ~ q)

3- Exportation Law
e.g: (p ʌ q)→ r ≡ p →(q → r)
Laws Of Logic
4- Equivalence Law
e.g: p ↔ q ≡ (p → q) ʌ (q → p)

5- Reduction And Absurdum Law


e.g: p → q ≡ (p ʌ ~q) → c
Application
p ʌ ~q → r
≡ p ʌ ~q → r Order Of Operations

≡ ~(p ʌ~q) ˅ r Implication Law


Application
~(p → q)→ p
≡ ~[~(p ʌ~q)]→p Implication Law
≡ (p ʌ~q)→p Double Negative Law
≡ ~(p ʌ~q) ˅p Implication Law
≡ (~p ˅q) ˅p Demorgan’s Law
≡ (q ˅~p)˅p Communicative Law
≡ q ˅(~p ˅p) Associative Law
≡q˅t Negation Law
≡t Universal Bound Law
Argument

An argument is a list of statements


called premises or assumptions or
hypotheses followed by an
statement called conclusion
Example
Premise
P1- An interesting teacher keeps me
awake
P2- I stay awake in discrete
mathematics class

Conclusion ∴C
Therefore my discrete mathematics
teacher is interesting
Valid Argument
An argument is valid if the
conclusion is True, when all the
premises are True.

Alternatively, an argument is valid if


conjunction of its premises imply
conclusion

That is (P1 P2  P3  . . .  Pn)  C


is a tautology.
Valid Argument
p implies q is mostly True
p implies q is False whenever p is
True and q is False

That is :
p True
q False
p→q
Example
Show that the following argument
form is valid:
pq Premise
p Premise
∴q Conclusion
Truth Table

Premises Conclusion

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

Argument is valid
Invalid Argument
An argument is invalid if the
conclusion is False when all the
premises are True.

Alternatively, an argument is invalid


if conjunction of its premises does
not imply conclusion.
Example
Show that the following argument
form is invalid:
pq Premise
q Premise
∴p Conclusion
Truth Table

Premises Conclusion

p q p→q q p
T T T T T
T F F F T
F T T T F
F F T F F

Argument is invalid
Example
Use truth table to determine the
argument form:
pq Premise
p  ~q Premise
pr Premise
∴r Conclusion

is valid or invalid ?
Truth Table

p q r p˅q p → ~q p→r r
T T T T F T T
T T F T F F F
T F T T T T T
T F F T T F F

HHKLLLKIJIUJU
F
F
T
T
T
F
T
T
T
T
T
T
T
F
F F T F T T T
F F F F T T F

Argument is invalid
Example
Let
t = Tariq is on team A
h = Hameed is on team B
If Tariq is not on team A, then
Hameed is on team B. ~ t  h
If Hameed is not on team B, then
Tariq is on team A. ~ h  t
∴ Tariq is not on team A or Hameed
is not on team B.  ~ t  ~ h
Truth Table
t h ~t ~h ~t→h ~h→t ~t˅~h
T T F F T T F
T F F T T T T
F T T F T T T
F F T T F F T

Argument is invalid
Example
t: my teacher is interesting
a: I stay awake
m:I am in Discrete Mathematics class

An interesting teacher keeps me awake


ta
I stay awake in discrete mathematic class
am
∴ Therefore my discrete mathematics
teacher is interesting ∴m  t
Truth Table
t a m t→a aʌm mʌr
T T T T T T
T T F T F F
T F T F F T
T F F F F F
F T T T T F
F T F T F F
F F T T F F
F F F T F F

Argument is invalid
Switches
Switches In Series
Switches Light Bulb
P Q State
Closed Closed On

Light bulb Closed Open Off


Open Closed Off
Open Open Off

P Q P Q

open T T T

T F F

F T F
closed
F F F
Switches
Switches In Parallel
Switches Light Bulb

P Q State
Q Closed Closed On
Light bulb
Closed Open On

Open Closed On

Open Open Off

P Q PQ

T T T
open
T F T

closed F T T

F F F
Gates
NOT-gate
 A NOT-gate (or inverter) is a circuit with one input and
one output signal. If the input signal is 1, the output signal
is 0. Conversely, if the input signal is 0, then the output
signal is 1.

Input Output

P R

1 0

0 1
Gates
AND-gate
An AND-gate is a circuit with two input signals and one
output signal. If both input signals are 1, the output signal
is 1. Otherwise the output signal is 0.
Symbolic representation & Input / Output Table

Input Output
P
AND R P Q R

Q 1 1 1

1 0 0

0 1 0

0 0 0
Gates
OR - gate
An OR-gate is a circuit with two input signals and one
output signal. If both input signals are 0, then the output
signal is 0. Otherwise, the output signal is 1. Symbolic
representation & Input / Output Table

P
R
Q OR
Rules Of Circuits
Rule 1 = Inputs can be combined directly using gates

Rule 2 = Inputs can be split and than can be used in


gates

Rule 3 = Output of one gate can be used as input of


other gate

Rule 4 = Output of one gate can’t be used as input of


same gate.
Combinational Circuits
A Combinational Circuit is a compound circuit
consisting of the basic logic gates
such as NOT, AND, OR
Determining Output For A Given
Input
Indicate the output of the circuit below when the input
signals are P = 1, Q = 0 and R = 0
Constructing The Input / Output Table
For Circuit
Labeling Indicate output as X, Y and S
P X Y
AND NOT
Q
S
OR
R
Boolean Expression For A
Circuit
Circuit For Boolean Expression
(PQ)  ~R
Circuit For Input / Output Table
Circuit From Table

P  Q  ~R
Exercise
Find the Boolean expressions for the circuits and show that
they are logically equivalent, when regarded as statement
forms
Exercise

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy