Download presentation
Presentation is loading. Please wait.
2
Information Technology Department
Propositional Logic Information Technology Department SKN-SITS,Lonavala.
3
Proposition A proposition is a statement that is either true or false, but not both. Atlanta was the site of the 1996 Summer Olympic games. 1+1 = 2 3+1 = 5 What will my CS1050 grade be?
4
Definition 1. Negation of p
Let p be a proposition. The statement “It is not the case that p” is also a proposition, called the “negation of p” or ¬p (read “not p”) Table 1. The Truth Table for the Negation of a Proposition p ¬p T F F T p = The sky is blue. p = It is not the case that the sky is blue. p = The sky is not blue.
5
Definition 2. Conjunction of p and q
Let p and q be propositions. The proposition “p and q,” denoted by pq is true when both p and q are true and is false otherwise. This is called the conjunction of p and q. Table 2. The Truth Table for the Conjunction of two propositions p q pq T T T T F F F T F F F F
6
Definition 3. Disjunction of p and q
Let p and q be propositions. The proposition “p or q,” denoted by pq, is the proposition that is false when p and q are both false and true otherwise. Table 3. The Truth Table for the Disjunction of two propositions p q pq T T T T F T F T T F F F
7
Definition 4. Exclusive or of p and q
Let p and q be propositions. The exclusive or of p and q, denoted by pq, is the proposition that is true when exactly one of p and q is true and is false otherwise. Table 4. The Truth Table for the Exclusive OR of two propositions p q pq T T F T F T F T T F F F
8
Definition 5. Implication pq
Let p and q be propositions. The implication pq is the proposition that is false when p is true and q is false, and true otherwise. In this implication p is called the hypothesis (or antecedent or premise) and q is called the conclusion (or consequence). Table 5. The Truth Table for the Implication of pq. p q pq T T T T F F F T T F F T
9
Implications If p, then q p implies q if p,q p only if q
p is sufficient for q q if p q whenever p q is necessary for p Not the same as the if- then construct used in programming languages such as If p then S
10
Related Implications Converse of p q is q p
Contrapositive of p q is the proposition q p Inverse of p q Is the proposition p q
11
Example implication: “If it rains today, I will go to college tomorrow” Converse: I will go to college tomorrow only if it rains today Contrapositive : If I do not go to college tomorrow, then it will not have rained today Inverse : If it does not rain today, then I will not go to college tomorrow
12
Definition 6. Biconditional
Let p and q be propositions. The biconditional pq is the proposition that is true when p and q have the same truth values and is false otherwise. “p if and only if q, p is necessary and sufficient for q” Table 6. The Truth Table for the biconditional pq. p q pq T T T T F F F T F F F T
13
Practice p p: You learn the simple things well.
q: The difficult things become easy. You do not learn the simple things well. If you learn the simple things well then the difficult things become easy. If you do not learn the simple things well, then the difficult things will not become easy. The difficult things become easy but you did not learn the simple things well. You learn the simple things well but the difficult things did not become easy. p q p pq p q p q
14
Well formed Formula (WFF)
A well formed formula can be produced using following rules: Rule 1 : A statement variable itself is a WFF Rule 2 : If p is WFF, then p is WFF Rule 3 : If p and q are WFF then (p q), (p q), (p q) and (p q) are also WFF Rule 4 : A string of symbols consisting of statement variables, connectives and parentheses is said to be WFF iff it can be produced by applying rule 1, 2 and 3 finitely many times
15
Bit Operations A computer bit has two possible values: 0 (false) and 1 (true). A variable is called a Boolean variable is its value is either true or false. Bit operations correspond to the logical connectives: OR AND XOR Information can be represented by bit strings, which are sequences of zeros and ones, and manipulated by operations on the bit strings.
16
Truth tables for the bit operations OR, AND, and XOR
0 1 0 1 0 1
17
Logical Equivalence An important technique in proofs is to replace a statement with another statement that is “logically equivalent.” Tautology: compound proposition that is always true regardless of the truth values of the propositions in it. Eg. p p Contradiction: Compound proposition that is always false regardless of the truth values of the propositions in it. Eg. p p
18
Logically Equivalent Compound propositions P and Q are logically equivalent if PQ is a tautology. In other words, P and Q have the same truth values for all combinations of truth values of simple propositions. This is denoted: PQ (or by P Q)
19
Example: DeMorgans Prove that (pq) (p q)
p q (pq) (pq) p q (p q) T T T F F T F F T F F F F T F F T F T F T F F F T T T T
20
Illustration of De Morgan’s Law
(pq) p q
21
Illustration of De Morgan’s Law
p p
22
Illustration of De Morgan’s Law
q q
23
Illustration of De Morgan’s Law
p q p q
24
Example: Distribution
Prove that: p (q r) (p q) (p r) p q r qr p(qr) pq pr (pq)(pr) T T T T T T T T T T F F T T T T T F T F T T T T T F F F T T T T F T T T T T T T F T F F F T F F F F T F F F T F F F F F F F F F
25
Prove: pq(pq) (qp)
p q pq pq qp (pq)(qp) T T T T T T T F F F T F F T F T F F F F T T T T We call this biconditional equivalence.
26
List of Logical Equivalences
pT p; pF p Identity Laws pT T; pF F Domination Laws pp p; pp p Idempotent Laws (p) p Double Negation Law pq qp; pq qp Commutative Laws (pq) r p (qr); (pq) r p (qr) Associative Laws
27
List of Equivalences p(qr) (pq)(pr) Distribution Laws
(pq)(p q) De Morgan’s Laws (pq)(p q) Miscellaneous p p T Or Tautology p p F And Contradiction (pq) (p q) Implication Equivalence pq(pq) (qp) Biconditional Equivalence
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.