0% found this document useful (0 votes)
146 views29 pages

DS Lecture 2 (Compound Statements)

This document provides an overview of discrete structures and logical connectives. It discusses symbolic representation of statements using logical connectors like AND, OR and NOT. It provides examples of translating statements to symbolic forms and vice versa. It also explains truth tables for logical connectives like conjunction, disjunction and negation. Examples of truth tables for logical expressions involving multiple variables are also given.

Uploaded by

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

DS Lecture 2 (Compound Statements)

This document provides an overview of discrete structures and logical connectives. It discusses symbolic representation of statements using logical connectors like AND, OR and NOT. It provides examples of translating statements to symbolic forms and vice versa. It also explains truth tables for logical connectives like conjunction, disjunction and negation. Examples of truth tables for logical expressions involving multiple variables are also given.

Uploaded by

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

DISCRETE STRUCTURES

Lecture # 2
Compound Statements, Truth Table Basic Logic Connectives,
Tautologies & Contradictions

Summiya Alam
LECTURE CONTENTS

 Symbolic representation of statements


 Symbolic Representation of logical connectors
 Translating from statements to statement forms and vice versa
 Truth Tables for AND, OR, NOT, XOR
LOGICAL CONNECTIVES AND
COMPOUND STATEMENTS

• In mathematics, the letters x,y,z,… often denoted variables that can be replaced
by real numbers, and these variables can be combined with the familiar
operations +,*,‐ and division.
• In logic, the letters p,q,r,… denotes propositional variables; that is, variables
that can be replaced by statements.
• we can write;
• p: The sun is shining today
• q: it is cold
COMPOUND STATEMENT CONT..

• Statements or propositional variables can be combine by logical connectives to


obtain compound statements.
• For example, we may combine the proceeding statements by the connective
and to form the compound statement p and q.
• The sun is shining today and it is cold.
• The truth value of a compound statement depends only on the truth values of
the statements being combined and on the types of connectives being used.
EXAMPLES

• “3 + 2 = 5” and “Lahore is a city in Pakistan”


• “The grass is green” or “ It is hot today”
• “Discrete Mathematics is not difficult to me”
AND, OR, NOT are called LOGICAL CONNECTIVES
SYMBOLIC REPRESENTATION OF
LOGICAL CONNECTORS
COMPOUND STATEMENT -EXAMPLE

p = “Islamabad is the capital of Pakistan”


q = “17 is divisible by 3”

Find:
 p∧q
 p∨q
 ~p
COMPOUND STATEMENT - SOLUTION

 p ∧ q = “Islamabad is the capital of Pakistan and 17 is divisible by 3”


 p ∨ q = “Islamabad is the capital of Pakistan or 17 is divisible by 3”
 ~p = “It is not the case that Islamabad is the capital of Pakistan” or simply
“Islamabad is not the capital of Pakistan”
TRANSLATING FROM ENGLISH
SENTENCES TO SYMBOLS

Let p = “It is hot”, and q = “ It is sunny”

• Symbolic form of the following sentences:

• 1. It is not hot. ~p
• 2. It is hot and sunny. p∧q
• 3. It is hot or sunny. p ∨q
• 4. It is not hot but sunny. ~ p ∧q
• 5. It is neither hot nor sunny. ~p∧~q
EXAMPLE

• h = “Zia is healthy”
• w = “Zia is wealthy”
• s = “Zia is wise”

• Translate the compound statements to symbolic form:

• 1) Zia is healthy and wealthy but not wise.


• 2) Zia is not wealthy but he is healthy and wise.
• 3) Zia is neither healthy, wealthy nor wise.
EXAMPLE - SOLUTION

• Zia is healthy and wealthy but not wise.


• (h ∧ w) ∧ (~ s)

• Zia is not wealthy but he is healthy and wise.


• ~ w ∧ (h ∧ s)

• Zia is neither healthy, wealthy nor wise.


• ~h∧~w∧~s
TRANSLATING FROM SYMBOLS TO
ENGLISH

• m = “Ali is good in Mathematics”


• c = “Ali is a Computer Science student”

Translate the following statement forms into English:

1) ~ c
2) c ∨ m
3) m ∧ ~ c
TRANSLATING FROM SYMBOLS TO
ENGLISH

Solution:
1) ~c
Ali is not a Computer Science student

2) c∨m
Ali is a Computer Science student or good in Mathematics.

3) m∧~c
Ali is good in Mathematics but not a Computer Science Student
TRUTH TABLE

• A truth table specifies the truth value of a compound proposition for all
possible truth values of its constituent propositions.
• Truth table can be formed for all type of connectives
CONNECTIVES

• Negation: (~) if p is a statement, ~p means not p or it is not the case that p.


• It follows that if p is true, then ~p is false and if p is false then ~p is true. You
can see Truth table
EXAMPLES

Give the negation of the following statements


• p: 2+3>1
• q: it is cold.

• Solution
a) ~p: 2+3 is not greater than 1. i.e. ~p: 2+3 ≤1. Since p is true in this case,
~p is false.
b) ~q: it is not the case that it is cold. More simply ~q: it is not cold.
CONJUNCTION (∧)

• If p and q are statements, then the conjunction of p and q is “p and q”, denoted
as “p ∧ q”.
• p ∧ q is true only when both p and q are true.
• If either p or q is false, or both are false, then p ∧ q is false.
CONJUNCTION (∧)
EXAMPLES

• p: it is snowing ; q: I am feeling cold


• p: 2 < 3 ; q: ‐5 > ‐8
• p: it is snowing ; q: 3 < 5

Solution
• pᴧq: It is snowing and I am feeling cold.
• pᴧq : 2 < 3 and ‐5 > ‐8.
• It is snowing and 3 < 5.
DISJUNCTION (∨) OR INCLUSIVE OR

• If p and q are statements, the disjunction of p and q is the compound statement


p or q, denoted by p˅q. The compound statement p or q is true if at least one
of p or q is true; it is false when both p and q are false.
DISJUNCTION (∨) OR INCLUSIVE OR

• You can observe values in truth table:


EXAMPLE

Form the disjunction of p and q for each of the following.


• p: 2 is a positive integer.
• q: √2 is a rational number.
• pVq=?
• p: 2+3≠ 5
• q: London is the capital of France.
• pVq=?
EXCLUSIVE OR

• Exclusive / or exclusive disjunction is a logical operation that outputs true only


when inputs differ.
• When OR is used in its exclusive sense, The statement “p or q” means “p or q
but not both or p or q and not p and q” which translates into symbols as (p ∨ q)
∧ ~ (p ∧ q). It is abbreviated as p ⊕ q or p XOR q
EXCLUSIVE OR
TRUTH TABLE- EXERCISE

1. ~ p ∧ q
2. ~ p ∧ (q ∨ ~ r)
3. (p∨q) ∧ ~ (p∧q)
~ P ∧ Q
~ P ∧ (Q ∨ ~ R)
(P ∨ Q) ∧ ~ (P ∧ Q)
THANK YOU

You might also like