0% found this document useful (0 votes)
142 views113 pages

Unit 4

Anamika Tiwari teaches discrete structures at Noida Institute of Engineering and Technology. She has a B.Tech and M.Tech in computer science with 4 years of teaching experience. Her areas of expertise include image processing and software engineering. The document discusses the course objectives, outcomes, applications in computer science and engineering, and end semester question paper templates.

Uploaded by

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

Unit 4

Anamika Tiwari teaches discrete structures at Noida Institute of Engineering and Technology. She has a B.Tech and M.Tech in computer science with 4 years of teaching experience. Her areas of expertise include image processing and software engineering. The document discusses the course objectives, outcomes, applications in computer science and engineering, and end semester question paper templates.

Uploaded by

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

Noida Institute of Engineering and Technology, Greater

Noida

Propositional Logic

UNIT-4

Discrete Structures

ANAMIKA TIWARI
B.Tech (CS, DS)
Assistant Professor
IIIrd Sem
B.Tech AIML

ANAMIKA TIWARI Discrete Structures Unit 4 1


09/18/22
Noida Institute of Engineering and Technology, Greater
IntroductionNoida

INTRODUCTION
ANAMIKA TIWARI

B.Tech and M.Tech in CSE with 4 Years Teaching Experience

 Area of Expertise: Image Processing and Software Engineering

 Attended and Conducted Numerous Workshops.


 Published about 5 National and International Papers in reputed Journals.
 Attend various FDPs and Webinar.

ANAMIKA TIWARI Discrete Structures


09/18/22 2
Unit 4
NOIDA INSTITUTE OF ENGINEERING & TECHNOLOGY, GREATER NOIDA(An
Autonomous Institute)

EVALUATION SCHEME SEMESTER-III

End
Sl. Subject Codes Periods Evaluation Schemes
Subject Name Semester Total Credit
No.
L T P CT TA TOTAL PS TE PE

WEEKS COMPULSORY INDUCTION PROGRAM


1 AAS0303 Statistics and Probability 3 1 0 30 20 50 100 150 4
2 ACSE0306 Discrete Structures 3 0 0 30 20 50 100 150 3
Computer Organization &
3 ACSE0305
Architecture
3 0 0 30 20 50 100 150 3
Object Oriented Techniques
4 ACSE0302
using Java
3 0 0 30 20 50 100 150 3
5 ACSE0301 Data Structures 3 1 0 30 20 50 100 150 4
Foundations of Data
6 ACSDS0301
Science
3 0 0 30 20 50 100 150 3
Object Oriented Techniques
7 ACSE0352
using Java Lab
0 0 2 25 25 50 1
8 ACSE0351 Data Structures Lab 0 0 2 25 25 50 1
9 ACSDS0351 Data Analysis Lab 0 0 2 25 25 50 1
10 ACSE0359 Internship Assessment-I 0 0 2 50 50 1
Cyber Security* / 1000
ANC0301 /
11 Environmental 2 0 0 30 20 50 50
ANC0302
Science*(Non Credit)
MOOCs (For B.Tech.
12 Hons. Degree)
GRAND TOTAL 1100 24
Subject Syllabus

ANAMIKA TIWARI Discrete Structures


09/18/22 4
Unit 4
Subject Syllabus

09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 5


Subject Syllabus

ANAMIKA TIWARI Discrete Structures


09/18/22 6
Unit 4
Subject Syllabus

ANAMIKA TIWARI Discrete Structures


09/18/22 7
Unit 4
Application in CSE

1. Discrete Structures are useful in studying and describing objects and problems in branches
of computer science such as computer algorithms, programming languages.
2. Computer implementations are significant in applying ideas from discrete mathematics to real-
world problems, such as in operations research.
3. It is a very good tool for improving reasoning and problem-solving capabilities.
4. Discrete mathematics is used to include theoretical computer science, which is relevant to
computing.
5. Discrete structures in computer science with the help of process algebras.

09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 8


Course Objective

• A course discrete structures used to represent discrete objects


and relationships between these objects. These discrete
structures include sets, relation, permutations, relations,
graphs and trees etc.
• The subject enhances one’s ability to develop logical thinking
and ability to problem solving.

09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 9


Course Outcome

Course At the end of course , the student will be able to Bloom’s


Outcom understand Knowledg
e ( CO) e Level
(KL)
CO1 Apply the basic principles of sets, relations & functions in K1,K3,K2
computer science & engineering related problems and to
solve counting problem using recursive function theory.
CO2 Define the algebraic structure of a system and use these K1,K2
concepts such as coding theory, cryptographic algorithms
etc.
CO3 Apply basics of lattices in mathematical modeling K2,K3
CO4 Infer the validity of statements and construct proofs using K3,K4
predicate logic formulas.
CO5 Design and use the non-linear data structure like tree and K2,K6
graph for circuit and network designing

09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 10


CO-PO’s and PSO’s Mapping

PO1 PO2 PO3 PO4 PO5 PO6 PO7 PO8 PO9 PO1 PO1 PO1
0 1 2
20CS304.1 3 2 2 - - 1 - - - 1 1 3
20CS304.2 3 3 2 2 1 - - - - - 2 1
20CS304.3 3 3 2 1 - - 3 - 2 2 2 2
20CS304.4 3 3 2 1 - - 1 - - 3 2 2
20CS304.5 3 3 2 1 - - 3 - - 1 3 3
PSO1 PSO2 PSO3 PSO4
20CS304.1 1 2 3 -

20CS304.2 1 2 3 1

20CS304.3 3 2 3 1

20CS304.4 2 3 3 -

20CS304.5 2 3 2
09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 11
End Semester Question Paper Templates (Offline
Pattern/Online Pattern

ANAMIKA TIWARI Discrete Structures


09/18/22 12
Unit 4
End Semester Question Paper Templates (Offline
Pattern/Online Pattern

ANAMIKA TIWARI Discrete Structures


09/18/22 13
Unit 4
End Semester Question Paper Templates (Offline
Pattern/Online Pattern

ANAMIKA TIWARI Discrete Structures


09/18/22 14
Unit 4
End Semester Question Paper Templates (Offline
Pattern/Online Pattern

ANAMIKA TIWARI Discrete Structures


09/18/22 15
Unit 4
End Semester Question Paper Templates (Offline
Pattern/Online Pattern

ANAMIKA TIWARI Discrete Structures


09/18/22 16
Unit 4
End Semester Question Paper Templates (Offline
Pattern/Online Pattern

ANAMIKA TIWARI Discrete Structures


09/18/22 17
Unit 4
End Semester Question Paper Templates (Offline
Pattern/Online Pattern

ANAMIKA TIWARI Discrete Structures


09/18/22 18
Unit 4
Topic Prerequisite & Recap (CO4)

Prerequisite
•Basic Understanding of class 10 mathematics NCERT.
•Basic Knowledge of sets and algebraic rules
•Basic Understanding of Set Theory, Relations and Functions &
Algebraic Structures.
•Basic Understanding of Lattices & Boolean Algebra
Recap
Now students are able to develop there logical thinking by
using Sets, Relations, Functions and Mathematical Induction, Algebraic
Structures, Lattices & Boolean Algebra concepts and use in upcoming
topic. i.e. Propositions.

09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 19


Brief Introduction about the subject with video

Discrete mathematics is the study of mathematical structures that are


fundamentally discrete rather than continuous. In contrast to real
numbers that have the property of varying "smoothly", the objects studied in
discrete mathematics – such as integers, graphs, and statements in logic.

•https://www.youtube.com/watch?
v=Ib5njCwNMdk&list=PLBlnK6fEyqRhqJPDXcvYlLfXPh37L89g3&index=3
•https://www.youtube.com/watch?
v=6kYngPvoGxU&list=PLBlnK6fEyqRhqJPDXcvYlLfXPh37L89g3&index=4
•https://www.youtube.com/watch?v=m2mf6I3g2-
c&list=PLBlnK6fEyqRhqJPDXcvYlLfXPh37L89g3&index=5
•https://www.youtube.com/watch?
v=tACXuzfXzSI&list=PLBlnK6fEyqRhqJPDXcvYlLfXPh37L89g3&index=6

ANAMIKA TIWARI Discrete Structures


09/18/22 20
Unit 4
Unit 4 Objectives
• Objective of proposition logic to write English sentences for logical
expressions and vice-versa. Use standard notations of propositional
logic.
• Determine if a logical argument is valid or invalid. Apply standard
rules of inference including (but not limited to) Modus Ponens,
Modus Tollens.
• Translate between English sentences and symbols for universally
and existentially quantified statements, including statements with
multiple quantifiers.

09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 21


Unit Objective (CO4)

• Propositional Logic: Introduction, Propositions and


Compound Statements, Basic Logical Operations, well
formed formula, Truth tables, Tautology, Satisfiability,
Contradiction, Algebra of proposition, Theory of Inference.
• Predicate Logic: First order predicate, well formed formula of
predicate, quantifiers, Inference theory of predicate logic.

09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 22


Topic Objectives: Propositions(CO4)

 The student will demonstrate the ability to use mathematical logic to


solve problems
 The student will be able to:
 represent English-language statements using symbolic logic
notation.
 use and interpret relational conjunctions (and, or, xor, not), terms
of causation (if… then) and equivalence (if and only if).
 use truth tables to analyze the truth values of compound
statements based on the truth values of their components.
 use truth tables to determine if two statements are logically
equivalent.
 use truth tables to identify tautologies and contradictions.

09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 DSGT 23


Propositions (CO4)

A proposition is a statement that is either true or false (not both).

 We say that the truth value of a proposition is either true (T or 1)


or false (F or 0).

Example Beijing is the capital of China T

2+2=5 F

1+2=3 T

09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 24


Examples of Non-Propositions(CO4)

The following are NOT propositions

Example
• Who’s there?

• Just do it!

• La la la la la

• 1+2

• x+2=5

09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 25


Propositions(CO4)
The Statement/Proposition example

“Elephants are bigger than mice.”

Is this a statement? Yes

Is this a proposition? Yes

What is the truth value True


of the proposition?

09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 26


Propositions(CO4)
The Statement/Proposition example

“520 < 111”

Is this a statement? Yes

Is this a proposition? Yes

What is the truth value False


of the proposition?

09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 27


Propositions(CO4)
The Statement/Proposition example

“y > 5”

Is this a statement? Yes

Is this a proposition? No

Its truth value depends on the value of y, but this value is not
Specified. We call this type of statement a propositional
function or open sentence

09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 28


Propositional logic (PL) [CO4]

• Propositional logic (PL) is the simplest form of logic where all the
statements are made by propositions. A proposition is a
declarative statement which is either true or false. It is a
technique of knowledge representation in logical and
mathematical form.
Example:
• a) It is Sunday.
• b) The Sun rises from West (False proposition)
• c) 3+3= 7(False proposition)
• d) 5 is a prime number.

09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 29


Continue…

Following are some basic facts about propositional logic:


• Propositional logic is also called Boolean logic as it works on 0
and 1.
• In propositional logic, we use symbolic variables to represent
the logic, and we can use any symbol for a representing a
proposition, such A, B, C, P, Q, R, etc.
• Propositions can be either true or false, but it cannot be both.
• Propositional logic consists of an object, relations or function,
and logical connectives.
• These connectives are also called logical operators.
• The propositions and connectives are the basic elements of
the propositional logic.
09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 30
Propositional logic [CO4]

• Connectives can be said as a logical operator which connects


two sentences.
• A proposition formula which is always true is called tautology,
and it is also called a valid sentence.
• A proposition formula which is always false is
called Contradiction.
• A proposition formula which has both true and false values is
called Contingency.
• Statements which are questions, commands, or opinions are
not propositions such as "Where is Rohini", "How are you",
"What is your name", are not propositions.

09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 31


Types of Propositions

There are two types of Propositions:


Atomic Propositions
Compound propositions
Atomic Proposition: Atomic propositions are the simple
propositions. It consists of a single proposition symbol. These
are the sentences which must be either true or false.
Example:
a) 2+2 is 4, it is an atomic proposition as it is a true fact.
b) "The Sun is cold" is also a proposition as it is a false fact.

09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 32


Compound proposition [CO4]

Compound propositions are constructed by combining


simpler or atomic propositions, using parenthesis and logical
connectives.

Example:

a) "It is raining today, and street is wet."

b) "Ankit is a doctor, and his clinic is in Mumbai."

09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 33


Basic Logical Operations [CO4]

Basic Logical Operator:


• Basic Logical operators/Logical connectives are used to connect two
simpler propositions or representing a sentence logically. We can create
compound propositions with the help of logical connectives. There are
mainly five connectives, which are given as follows:
• Negation: A sentence such as ¬ P is called negation of P. A literal can be
either Positive literal or negative literal.
• Conjunction: A sentence which has ∧ connective such as, P ∧ Q is
called a conjunction.
Example: Rohan is intelligent and hardworking. It can be written as, P=
Rohan is intelligent,
Q= Rohan is hardworking. → P∧ Q.

09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 34


Continue …[CO4]
• Disjunction: A sentence which has ∨ connective, such as P ∨ Q. is called
disjunction, where P and Q are the propositions.
Example: "Ritika is a doctor or Engineer",

Here P= Ritika is Doctor. Q= Ritika is Doctor, so we can write it as P ∨ Q.
• Implication: A sentence such as P → Q, is called an implication.
Implications are also known as if-then rules. It can be represented as
If it is raining, then the street is wet.
Let P= It is raining, and Q= Street is wet, so it is represented as P → Q

• Biconditional: A sentence such as P⇔ Q is a Biconditional sentence,


example If I am breathing, then I am alive
P= I am breathing, Q= I am alive, it can be represented as P ⇔ Q.

09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 35


Continue… …[CO4]

• summarized table for Propositional Logic Connectives:

09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 36


Truth Table (CO4)
We will examine the truth table of following logical operators
• Negation (NOT)
• Conjunction (AND)
• Disjunction (OR)
• Exclusive or (XOR)
• Implication (if – then)
• Biconditional (if and only if)
•Truth tables can be used to show how these operators can combine
propositions to compound propositions.

09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 37


Negation (NOT) (CO4)

It is Unary Operator and denoted by Symbol: 

P P

true (T) false (F)

false (F) true (T)

09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 38


Conjunction (AND) (CO4)

It is binary Operator and Symbol is 

P Q P Q

T T T

T F F

F T F

F F F

09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 39


Disjunction (OR) (CO4)

It is binary Operator and Symbol is 

P Q P Q

T T T

T F T

F T T

F F F

09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 40


Exclusive Or (XOR) (CO4)

It is binary Operator and Symbol is 

P Q PQ

T T F

T F T

F T T

F F F

09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 41


Implication (if - then) (CO4)

It is binary Operator and Symbol is 

P Q PQ

T T T

T F F

F T T

F F T

09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 42


Biconditional (if and only if) (CO4)

It is binary Operator and Symbol is 

P Q P Q

T T T

T F F

F T F

F F T

09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 43


Statements and Operators(CO4)
Example 1 Statements and operators can be combined in any way to
form new statements.

P Q P Q (P)(Q)

T T F F F

T F F T T

F T T F T

F F T T T

09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 44


Statements and Operators(CO4)
Example 2 Statements and operators can be combined in any way to
form new statements.

P Q P Q  (PQ) (P)(Q)

T T T F F

T F F T T

F T F T T

F F F T T

09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 45


Continue… …[CO4]

Logical equivalence:
• Logical equivalence is one of the features of propositional
logic. Two propositions are said to be logically equivalent if
and only if the columns in the truth table are identical to each
other.
• Let's take two propositions A and B, so for logical equivalence,
we can write it as A⇔B. In below truth table we can see that
column for ¬A∨ B and A→B, are identical hence A is
Equivalent to B

09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 46


Example (CO4)
The statements (PQ) and (P)  (Q) are logically equivalent, since
(PQ)  (P)  (Q) is always true.

P Q (PQ) (P)(Q) (PQ)(P)(Q)

T T F F T

T F T T T

F T T T T

F F T T T

09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 47


Algebra of Proposition [CO4]

Properties of Operators:
• Commutativity:
– P∧ Q= Q ∧ P, or
– P ∨ Q = Q ∨ P.
• Associativity:
– (P ∧ Q) ∧ R= P ∧ (Q ∧ R),
– (P ∨ Q) ∨ R= P ∨ (Q ∨ R)
• Identity element:
– P ∧ True = P,
– P ∨ True= True.

09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 48


Continue…[CO4]

• Distributive:
– P∧ (Q ∨ R) = (P ∧ Q) ∨ (P ∧ R).
– P ∨ (Q ∧ R) = (P ∨ Q) ∧ (P ∨ R).
• DE Morgan's Law:
– ¬ (P ∧ Q) = (¬P) ∨ (¬Q)
– ¬ (P ∨ Q) = (¬ P) ∧ (¬Q).
• Double-negation elimination:
– ¬ (¬P) = P.

09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 49


Tautology (CO4)

A tautology is a statement that is always true.


Examples: (PQ)(P)(Q)
If ST is a tautology, we write ST.
If ST is a tautology, we write ST.

P Q (PQ) (P)(Q) (PQ)(P)(Q)


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

09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 50


Contradiction (CO4)

A contradiction is a statement that is always False


Examples: R(R) ((PQ)(P)(Q))

The negation of any tautology is a contradiction, and the negation of


any contradiction is a tautology.

09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 51


Satisfiability (CO4)

 A proposition is satisfiable, if its truth table contains true at


least once. Example: p ∧ q.
 A tautology, if it is always true. Example: p ∨ ¬p.
A contradiction, if it always false. Example: p ∧ ¬p.
 A contingency, if it is neither a tautology nor a contradiction.
Example: p.

09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 52


Theory of Inference [CO4]

Rules of Inference
Inference:
• In we need intelligent computers which can create new logic from old
logic or by evidence, so generating the conclusions from evidence and
facts is termed as Inference.
Inference rules:
• Inference rules are the templates for generating valid arguments.
Inference rules are applied to derive proofs in artificial intelligence, and
the proof is a sequence of the conclusion that leads to the desired goal.
• In inference rules, the implication among all the connectives plays an
important role. Following are some terminologies related to inference
rules:

09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 53


Continue… [CO4]
• Implication: It is one of the logical connectives which can be represented
as P → Q. It is a Boolean expression.
• Converse: The converse of implication, which means the right-hand side
proposition goes to the left-hand side and vice-versa. It can be written as Q
→ P.
• Contrapositive: The negation of converse is termed as contrapositive, and
it can be represented as ¬ Q → ¬ P.
• Inverse: The negation of implication is called inverse. It can be
represented as ¬ P → ¬ Q.
• From the above term some of the compound statements are equivalent to
each other, which we can prove using truth table:

09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 54


Continue… [CO4]

• Hence from the above truth table, we can prove that P → Q is


equivalent to ¬ Q → ¬ P, and Q→ P is equivalent to ¬ P → ¬ Q.

09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 55


Continue… [CO4]

Types of Inference rules:


1. Modus Ponens:
• The Modus Ponens rule is one of the most important rules of
inference, and it states that if P and P → Q is true, then we can infer
that Q will be true. It can be represented as:
Example:
Statement-1: "If I am sleepy then I go to bed" ==> P→ Q
Statement-2: "I am sleepy" ==> P
Conclusion: "I go to bed." ==> Q.
Hence, we can say that, if P→ Q is true and P is true then Q will be
true.

09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 56


Continue… [CO4]

• Proof by Truth table:

2. Modus Tollens:
• The Modus Tollens rule state that if P→ Q is true and ¬ Q is
true, then ¬ P will also true. It can be represented as:

09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 57


Continue… [CO4]

• Statement-1: "If I am sleepy then I go to bed" ==> P→ Q


Statement-2: "I do not go to the bed."==> ~Q
Statement-3: Which infers that "I am not sleepy" => ~P
• Proof by Truth table:

09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 58


Continue… [CO4]

3. Hypothetical Syllogism:
• The Hypothetical Syllogism rule state that if P→R is true
whenever P→Q is true, and Q→R is true. It can be
represented as the following notation:
• Example:
Statement-1: If you have my home key then you can unlock
my home. P→Q
Statement-2: If you can unlock my home then you can take
my money. Q→R
Conclusion: If you have my home key then you can take my
money. P→R
Proof by truth table:

09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 59


Continue… [CO4]

09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 60


Continue… [CO4]

4. Disjunctive Syllogism:
• The Disjunctive syllogism rule state that if P∨Q is true, and ¬P
is true, then Q will be true. It can be represented as:

Example:
Statement-1: Today is Sunday or Monday. ==>P∨Q
Statement-2: Today is not Sunday. ==> ¬P
Conclusion: Today is Monday. ==> Q
• Proof by truth-table:

09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 61


Continue… [CO4]

5. Addition:
• The Addition rule is one the common inference rule, and it
states that If P is true, then P∨Q will be true.

Example:
• Statement: I have a vanilla ice-cream. ==> P
Statement-2: I have Chocolate ice-cream.
Conclusion: I have vanilla or chocolate ice-cream. ==> (P∨Q)
Proof by Truth-Table:

09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 62


Continue… [CO4]

6. Simplification:
• The simplification rule state that if P∧ Q is true, then Q or
P will also be true. It can be represented as:

• Proof by Truth-Table:

09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 63


Continue… [CO4]

7. Resolution:
• The Resolution rule state that if P∨Q and ¬ P∧R is true, then
Q∨R will also be true. It can be represented as

• Proof by Truth-Table:

09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 64


First-Order Predicate (CO4)
• In the topic of Propositional logic, we have seen that how to represent
statements using propositional logic. But unfortunately, in propositional
logic, we can only represent the facts, which are either true or false. PL is
not sufficient to represent the complex sentences or natural language
statements. The propositional logic has very limited expressive power.
Consider the following sentence, which we cannot represent using PL
logic.

"Some humans are intelligent", or


"Sachin likes cricket."
• To represent the above statements, PL logic is not sufficient, so we
required some more powerful logic, such as first-order logic.

09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 65


Continue…
First-Order logic:
• A predicate is an expression of one or more variables defined on some
specific domain. A predicate with variables can be made a proposition by
either assigning a value to the variable or by quantifying the variable.
• The following are some examples of predicates −
Let E(x, y) denote "x = y"
Let X(a, b, c) denote "a + b + c = 0"
Let M(x, y) denote "x is married to y“

• First-order logic is also known as Predicate logic or First-order predicate


logic. First-order logic is a powerful language that develops information
about the objects in a more easy way and can also express the
relationship between those objects.

09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 66


Continue…

-- Objects: A, B, people, numbers, colors, wars, theories, squares etc.


– Relations: It can be unary relation such as: red, round, is adjacent, or
n-any relation such as: the sister of, brother of, has color, comes
between

– Function: Father of, best friend, third inning of, end of, ......

• As a natural language, first-order logic also has two main parts:


– Syntax
– Semantics

09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 67


Continue…

Syntax of First-Order logic:

The syntax of FOL determines which collection of symbols is a logical


expression in first-order logic. The basic syntactic elements of first-order
logic are symbols. We write statements in short-hand notation in FOL.

Basic Elements of First-order logic:


Following are the basic elements of FOL syntax:

09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 68


Continue…

• Constant
1, 2, A, John, Mumbai, cat,....
• Variables
x, y, z, a, b,....
• Predicates
Brother, Father, >,....
• Function
sqrt, LeftLegOf, ....

• Connectives
∧, ∨, ¬, ⇒, ⇔
• Equality ==
• Quantifier ∀, ∃

09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 69


Continue…

Atomic sentences:
• Atomic sentences are the most basic sentences of first-order logic. These
sentences are formed from a predicate symbol followed by a parenthesis
with a sequence of terms.
• We can represent atomic sentences as Predicate (term1, term2, ......,
term n).

• Example: Ravi and Ajay are brothers: => Brothers(Ravi, Ajay).


Chinky is a cat: => cat (Chinky).

09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 70


Well Formed Formula

• Well Formed Formula (wff) is a predicate holding any of the following −


• All propositional constants and propositional variables are wffs
• If x is a variable and Y is a wff, ∀xY∀xY and ∃xY∃xY are also wff
• Truth value and false values are wffs
• Each atomic formula is a wff
• All connectives connecting wffs are wffs

09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 71


Continue…

Complex Sentences:
• Complex sentences are made by combining atomic sentences using
connectives.

First-order logic statements can be divided into two parts:


• Subject: Subject is the main part of the statement.
• Predicate: A predicate can be defined as a relation, which binds two
atoms together in a statement.
Consider the statement: "x is an integer.", it consists of two parts, the first
part x is the subject of the statement and second part "is an integer," is
known as a predicate.

09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 72


Quantifiers in First-order logic

• A quantifier is a language element which generates quantification, and


quantification specifies the quantity of specimen in the universe of
discourse.
• These are the symbols that permit to determine or identify the range and
scope of the variable in the logical expression. There are two types of
quantifier:

– Universal Quantifier, (for all, everyone, everything)


– Existential quantifier, (for some, at least one).

09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 73


Continue…

Universal Quantifier:
• Universal quantifier is a symbol of logical representation,
which specifies that the statement within its range is true for
everything or every instance of a particular thing.
• The Universal quantifier is represented by a symbol ∀, which
resembles an inverted A.
• Note: In universal quantifier we use implication "→".
• If x is a variable, then ∀x is read as:
For all x
For each x
For every x

09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 74


Continue…

Example: All man drink coffee.


• Let a variable x which refers to a cat so all x can be represented
in UOD as below:

• ∀x man(x) → drink (x, coffee).


It will be read as: There are all x where x is a man who drink
coffee

09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 75


Continue…
Existential Quantifier:
• Existential quantifiers are the type of quantifiers, which express that the
statement within its scope is true for at least one instance of something.
• It is denoted by the logical operator ∃, which resembles as inverted E.
When it is used with a predicate variable then it is called as an
existential quantifier.
• Note: In Existential quantifier we always use AND or Conjunction symbol
(∧).
• If x is a variable, then existential quantifier will be ∃x or ∃(x). And it will
be read as:
There exists a 'x.'
For some 'x.‘
For at least one 'x.'

09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 76


Continue…

Example: Some boys are intelligent.

• ∃x: boys(x) ∧ intelligent(x)


It will be read as: There are some x where x is a boy who is intelligent

09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 77


Continue…

Points to remember:
• The main connective for universal quantifier ∀ is
implication →.
• The main connective for existential quantifier ∃ is and ∧.
Properties of Quantifiers:
• In universal quantifier, ∀x∀y is similar to ∀y∀x.
• In Existential quantifier, ∃x∃y is similar to ∃y∃x.
• ∃x∀y is not similar to ∀y∃x.

09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 78


Continue…

• Some Examples of FOL using quantifier


• 1. All birds fly.
In this question the predicate is "fly(bird)."
And since there are all birds who fly so it will be represented
as follows.
∀x bird(x) →fly(x).
• 2. Every man respects his parent.
In this question, the predicate is "respect(x, y)," where
x=man, and y= parent.
Since there is every man so will use ∀, and it will be
represented as follows:
∀x man(x) → respects (x, parent).

09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 79


Continue…

• 3. Some boys play cricket.


In this question, the predicate is "play(x, y)," where x= boys, and
y= game. Since there are some boys so we will use ∃, and it will
be represented as:
∃x boys(x) → play(x, cricket).
• 4. Not all students like both Mathematics and Science.
In this question, the predicate is "like(x, y)," where x= student,
and y= subject.
Since there are not all students, so we will use ∀ with negation,
so following representation for this:
¬∀ (x) [ student(x) → like(x, Mathematics) ∧ like(x,
Science)].

09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 80


Continue…
• 5. Only one student failed in Mathematics.
In this question, the predicate is "failed(x, y)," where x= student,
and y= subject.
Since there is only one student who failed in Mathematics, so we
will use following representation for this:
∃(x) [ student(x) → failed (x, Mathematics) ∧∀ (y)
[¬(x==y) ∧ student(y) → ¬failed (x, Mathematics)].

09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 81


Continue…

Free and Bound Variables:


• There are two types of variables in First-order logic which are
given below:
• Free Variable: A variable is said to be a free variable in a
formula if it occurs outside the scope of the quantifier.
Example: ∀x ∃(y)[P (x, y, z)], where z is a free variable.
• Bound Variable: A variable is said to be a bound variable in a
formula if it occurs within the scope of the quantifier.
Example: ∀x [A (x) B( y)], here x and y are the bound
variables.

09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 82


Inference in First-Order Logic
• Inference in First-Order Logic is used to deduce new facts or sentences
from existing sentences. Before understanding the FOL inference rule,
let's understand some basic terminologies used in FOL.
Substitution:

• Substitution is a fundamental operation performed on terms and


formulas. It occurs in all inference systems in first-order logic. The
substitution is complex in the presence of quantifiers in FOL. If we
write F[a/x], so it refers to substitute a constant "a" in place of variable
"x".
• Note: First-order logic is capable of expressing facts about some or all
objects in the universe.

09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 83


Continue…

Equality:
• First-Order logic does not only use predicate and terms for
making atomic sentences but also uses another way, which is
equality in FOL. For this, we can use equality symbols which
specify that the two terms refer to the same object.
Example: Brother (John) = Smith.
• As in the above example, the object referred by the Brother
(John) is similar to the object referred by Smith. The equality
symbol can also be used with negation to represent that two
terms are not the same objects.
Example: ¬ (x=y) which is equivalent to x ≠y.

09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 84


Continue…

FOL inference rules for quantifier:


• As propositional logic we also have inference rules in first-
order logic, so following are some basic inference rules in
FOL:
Universal Generalization
Universal Instantiation
Existential Instantiation
Existential introduction

09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 85


Continue…

1. Universal Generalization:
• Universal generalization is a valid inference rule which states
that if premise P(c) is true for any arbitrary element c in the
universe of discourse, then we can have a conclusion as ∀ x
P(x).
• It can be represented as:
• This rule can be used if we want to show that every element
has a similar property.
• In this rule, x must not appear as a free variable.
• Example: Let's represent, P(c): "A byte contains 8 bits", so
for ∀ x P(x) "All bytes contain 8 bits.", it will also be true.

09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 86


Continue…
2. Universal Instantiation:
• Universal instantiation is also called as universal elimination or
UI is a valid inference rule. It can be applied multiple times to
add new sentences.
• The new KB is logically equivalent to the previous KB.
• As per UI, we can infer any sentence obtained by substituting a
ground term for the variable.
• The UI rule state that we can infer any sentence P(c) by
substituting a ground term c (a constant within domain x)
from ∀ x P(x) for any object in the universe of discourse .
• It can be represented as:
Example:1.
• IF "Every person like ice-cream"=> ∀x P(x) so we can infer that
"John likes ice-cream" => P(c)
09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 87
Continue…
• Example: 2.
Let's take a famous example,
"All kings who are greedy are Evil." So let our knowledge base
contains this detail as in the form of FOL:
∀x king(x) ∧ greedy (x) → Evil (x),
• So from this information, we can infer any of the following
statements using Universal Instantiation:
King(John) ∧ Greedy (John) → Evil (John),
King(Richard) ∧ Greedy (Richard) → Evil (Richard),
King(Father(John)) ∧ Greedy (Father(John)) → Evil (Father(John)),

09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 88


Continue…
3. Existential Instantiation:
• Existential instantiation is also called as Existential Elimination,
which is a valid inference rule in first-order logic.
• It can be applied only once to replace the existential sentence.
• The new KB is not logically equivalent to old KB, but it will be
satisfiable if old KB was satisfiable.
• This rule states that one can infer P(c) from the formula given
in the form of ∃x P(x) for a new constant symbol c.
• The restriction with this rule is that c used in the rule must be a
new term for which P(c ) is true.
• It can be represented as:
• Example:
• From the given sentence: ∃x Crown(x) ∧ OnHead(x, John)

09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 89


Continue…

So we can infer: Crown(K) ∧ OnHead( K, John), as long as K does


not appear in the knowledge base.
• The above used K is a constant symbol, which is called Skolem
constant.
• The Existential instantiation is a special case of Skolemization
process.

09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 90


Continue…

4. Existential introduction
• An existential introduction is also known as an existential
generalization, which is a valid inference rule in first-order
logic.
• This rule states that if there is some element c in the universe
of discourse which has a property P, then we can infer that
there exists something in the universe which has the property
P.
• It can be represented as:
• Example: Let's say that,
"Priyanka got good marks in English."
"Therefore, someone got good marks in English.

09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 91


Daily Quiz(CO4)

Q1 ¬ (p ↔ q) is logically equivalent to:


(a) p ↔ ¬q (b) ¬p ↔ q
(c)
Q2 Which of the following option is true?
(a) If the Sun is a planet, elephants will fly
(b) 3 +2 = 8 if 5-2 = 7
(c) 1 > 3 and 3 is a positive integer
(d) -2 > 3 or 3 is a negative integer
Q3 The truth value of given statement is
‘If 9 is prime then 3 is even’.
(a) False (b) True

09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 92


Daily Quiz(CO4)
Q4 Let P: I am in Bangalore. , Q: I love cricket. ; then q -> p(q implies p) is:
(a) If I love cricket then I am in Bangalore
(b) If I am in Bangalore then I love cricket
(c) I am not in Bangalore
(d) I love cricket
Q5 Let P: We should be honest., Q: We should be dedicated .,R: We should
be over confident.Then ‘We should be honest or dedicated but not
overconfident.’ is best represented by:
(a) ~P V ~Q V R
(b) P ∧ ~Q ∧ R
(c) P V Q ∧ R
(d) P V Q ∧ ~R

09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 93


Weekly Assignment(CO4)

Q1 What do you mean by logical equivalence? Explain with an example.


Q2 Construct the truth table of the following
~ (𝑃∨ (𝑄∧𝑅)) ⟺ ((𝑃∨𝑄) ∧ (𝑃∨𝑅 ))
Q3 Show that which of the following statements tautology are.
(i) (( 𝑃∨∽𝑄) ∧(∽𝑃∨∽𝑄))∨𝑄
(ii) (~𝑃∧𝑄 ⟹(𝑄⟹𝑃))
Q4 Using truth table prove that: P ↔ Q ≡ (P → Q) ∧ (Q → P).
Q5 Using logical equivalent formulas, show that
~ (P ∨ (~ P ∧ Q)) ≡ ~ P ∧ ~ Q.
Q6 Express (~𝑝→𝑟) ∧(𝑞⟷𝑞) in its principle conjunctive normal form
Q7 Define Minterms and Maxterms and find the principal disjunctive normal
form of the following:- (𝑝∧𝑞) ∨ (~𝑝∧𝑟) ∨(𝑞∧𝑟)

09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 94


Faculty Video Links, Youtube & NPTEL Video Links and Online
Courses Details(CO4)

Youtube/other Video Links


•https://www.youtube.com/watch?
v=Ib5njCwNMdk&list=PLBlnK6fEyqRhqJPDXcvYlLfXPh37L89g3&index=3
•https://www.youtube.com/watch?
v=6kYngPvoGxU&list=PLBlnK6fEyqRhqJPDXcvYlLfXPh37L89g3&index=4
•https://www.youtube.com/watch?v=m2mf6I3g2-
c&list=PLBlnK6fEyqRhqJPDXcvYlLfXPh37L89g3&index=5
•https://www.youtube.com/watch?
v=tACXuzfXzSI&list=PLBlnK6fEyqRhqJPDXcvYlLfXPh37L89g3&index=6
•https://www.youtube.com/watch?v=ccz-
w2JMsTM&list=PLBlnK6fEyqRhqJPDXcvYlLfXPh37L89g3&index=7

09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 95


MCQs(CO4)

Q1 Which of the following statement is a proposition?


(a) Get me a glass of milkshake
(b) God bless you!
(c) What is the time now?
(d) The only odd prime number is 2
Q2 Let P: I am in Delhi. , Q: Delhi is clean. ; then q ^ p(q and p) is:
(a) Delhi is clean and I am in Delhi
(b) Delhi is not clean or I am in Delhi
(c) I am in Delhi and Delhi is not clean
(d) Delhi is clean but I am in Mumbai
Q3 The compound propositions p and q are called logically equivalent
if ________ is a tautology.
(a) p ↔ q (b) p → q (c) ¬ (p ∨ q) (d) ¬p ∨ ¬q

09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 96


MCQs (CO4)

Q4 p → q is logically equivalent to:


(a) ¬p ∨ ¬q (b) p ∨ ¬q (c) ¬p ∨ q (d) ¬p ∧ q
Q5 p ∨ q is logically equivalent to:
(a) ¬q → ¬p (b) q → p (c) ¬p → ¬q (d) ¬p → q
Q6 Which of the following statement is correct?
(a) p ∨ q ≡ q ∨ p
(b) ¬(p ∧ q) ≡ ¬p ∨ ¬q
(c) (p ∨ q) ∨ r ≡ p ∨ (q ∨ r)
(d) All of mentioned
Q7 (p → q) ∧ (p → r) is logically equivalent to:
(a) p → (q ∧ r ) (b) p → (q ∨ r)
(c) p ∧ (q ∨ r) (d) p ∨ (q ∧ r)

09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 97


MCQs (CO4)

Q4 p → q is logically equivalent to:


(a) ¬p ∨ ¬q (b) p ∨ ¬q (c) ¬p ∨ q (d) ¬p ∧ q
Q5 p ∨ q is logically equivalent to:
(a) ¬q → ¬p (b) q → p (c) ¬p → ¬q (d) ¬p → q
Q6 Which of the following statement is correct?
(a) p ∨ q ≡ q ∨ p
(b) ¬(p ∧ q) ≡ ¬p ∨ ¬q
(c) (p ∨ q) ∨ r ≡ p ∨ (q ∨ r)
(d) All of mentioned
Q7 (p → q) ∧ (p → r) is logically equivalent to:
(a) p → (q ∧ r ) (b) p → (q ∨ r)
(c) p ∧ (q ∨ r) (d) p ∨ (q ∧ r)

09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 98


MCQs (CO4)

Q8 Which of the following statement is a proposition?


a) Get me a glass of milkshake
b) God bless you!
c) What is the time now?
d) The only odd prime number is 2
Q9 The truth value of given statement is
‘4+3=7 or 5 is not prime’.
a) False
b) True
Q10. Which of the following option is true?
a) If the Sun is a planet, elephants will fly
b) 3 +2 = 8 if 5-2 = 7
c) 1 > 3 and 3 is a positive integer
d) -2 > 3 or 3 is a negative intege

09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 99


MCQs (CO4)

Q11 What is the value of x after this statement, assuming initial value of x is 5?‘If x
equals to one then x=x+2 else x=0’.
a) 1 b) 3
c) 0 d) 2
Q12 Let P: I am in Bangalore. , Q: I love cricket. ; then q -> p(q implies p) is:
a) If I love cricket then I am in Bangalore
b) If I am in Bangalore then I love cricket
c) I am not in Bangalore
d) I love cricket
Q13. Let P:If Sahil bowls, Saurabh hits a century. ,Q: If Raju bowls , Sahil gets out
on first ball. Now if P is true and Q is false then which of the following can be
true?
a) Raju bowled and Sahil got out on first ball
b) Raju did not bowled
c) Sahil bowled and Saurabh hits a century
d) Sahil bowled and Saurabh got out

09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 100


MCQs (CO4)

Q14 The truth value of given statement is


‘If 9 is prime then 3 is even’.
a) False
b) True
Q15 Let P: I am in Delhi. , Q: Delhi is clean. ; then q ^ p(q and p) is:
a) Delhi is clean and I am in Delhi
b) Delhi is not clean or I am in Delhi
c) I am in Delhi and Delhi is not clean
d) Delhi is clean but I am in Mumbai
Q16 Let P: This is a great website, Q: You should not come back here.
Then ‘This is a great website and you should come back here.’ is best
represented by:
a) ~P V ~Q b) P ∧ ~Q
c) P V Q d) P ∧ Q

09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 101


MCQs (CO4)

Q17. Let P: We should be honest., Q: We should be dedicated .,R: We


should be overconfident.
Then ‘We should be honest or dedicated but not overconfident.’ is
best represented by:
a) ~P V ~Q V R b) P ∧ ~Q ∧ R
c) P V Q ∧ R d) P V Q ∧ ~R
Q18. A compound proposition that is always ___________ is called a
tautology.
a) True b) False
Q19 Let P (x) denote the statement “x >7.” Which of these have truth
value true?
a) P (0) b) P (4)
c) P (6) d) P (9)

09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 102


MCQs (CO4)

Q20. The statement,” Every comedian is funny” where C(x) is “x is a


comedian” and F (x) is “x is funny” and the domain consists of all
people.
a) ∃x(C(x) ∧ F (x))
b) ∀x(C(x) ∧ F (x))
c) ∃x(C(x) → F (x))
d) ∀x(C(x) → F (x))

09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 103


GLOSSARY QUESTION (CO4)

1. Propositional logic uses symbols to stand for statements and 1. FALSE


2. The truth value of ‘4+3=7 or 5 is not prime 2. TRUTH
VALUES
3. Single inference rule is another name 3. unit clause
4. clause can be viewed as a single lateral of disjunction 4. Atomic sentences

5. sentences can be created by using single propositional symbo 5. Resolution

6. to compute the truth of any sentence 6 Inference rule


7. modus ponens are derived From which rule 7. Atomic sentences

8. modus ponens are derived From which rule 8. Semantics of propositional


9. total number of proposition symbols in artificial intelligence 9. 2

ANAMIKA TIWARI Discrete Structures


09/18/22 104
Unit 4
Old Question Papers(CO4)

1. Rewrite the following statements without using conditional:


(a) If it is cold, he wears a hat.
(b) If productivity increase, then wages rise.
2. Whenever Ram and Shyam are present in the party then there is some
trouble in the party. Today there is no trouble in the party. Hence Ram and
Shyam are not present in the party. Write it in symbolic notation

3. Let p be “Kailash reads Newsweek” , let “Kailash reads the New Yorker”
and let r be “Kailash reads Times”. Write each of following in symbolic
form:
(a) Kailash reads Newsweeks or The New Yorker, but not Times.
(b) Kailash reads Newsweeks and The New Yorker or he does not
read Newsweeks and Times.
(c) It is not true that Kailash reads Newsweek but not Times.

09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 105


Old Question Papers(CO4)

4. Write the contra positive of the implication: “if it is Sunday then it is


a holiday
5. Show that the propositions 𝑝→𝑞𝑎𝑛𝑑 ¬𝑝∨𝑞 are logically equivalent.
7. Explain various Rules of Inference for Propositional Logic.
8. Prove the validity of the following argument “if the races are fixed
so the casinos are crooked, then the tourist trade will decline. If the
tourist trade decreases, then the police will be happy. The police force
is never happy. Therefore, the races are not fixed.
9. What is a tautology, contradiction and contingency? Show that (p ∨
q) ∧ (¬ p ∨ r) → (q ∨ r) is a tautology, contradiction or contingency.

09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 106


Old Question Papers(CO4)

10.Show that the premises “It is not sunny this afternoon and it is
colder than yesterday,” “We will go swimming only if it is sunny,” “If
we do not go swimming, then we will take a canoe trip,” and “If we
take a canoe trip, then we will be home by sunset” lead to the
conclusion “We will be home by sunset.”

09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 107


Old Question Papers (CO4)

09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 108


Old Question Papers (CO4)

09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 109


Old Question Papers (CO4)

For some more Old Question Papers go to the link below.


https://drive.google.com/drive/folders/
1LBqJvyWPNRCdAcr9Sag4TzECfnLgRIQn?usp=sharing

09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 110


Expected Questions for Exam(CO4)

Q1. Construct the truth table for the compound proposition


(𝑝 → 𝑞) ↔ (¬𝑝 → ¬𝑞).
Q2. Write the symbolic representation and give its contra positive
statement of “If it rains today, then I buy an umbrella”
Q3. Show that ( 𝑝 → 𝑟) ∧ (𝑞 → 𝑟)𝑎𝑛𝑑 (𝑝 ∨ 𝑞) → 𝑟 are logically
equivalent.
Q4. Without using truth table show that 𝑝 → (𝑞 → 𝑝) ⟺ ¬𝑝 → (𝑝 → 𝑞).
Q5. Is ¬𝑝 ∧ (𝑝 ∨ 𝑞)) → 𝑞 a tautology?
Q6. What are the contra positive, the converse and the inverse of the
conditional statement “If you work hard then you will be rewarded”.

09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 111


RECAP OF UNIT (CO4)

• Now you were able to understand the concepts discrete structures


include sets, relation , functions, Algebraic Structure, poset, lattice,
Boolean algebra, predicate logic and prepositional laogic etc.

• After understanding propositional logic students will be able to


design of computing machines, artificial intelligence, definition of
data structures for programming languages etc.

• Propositional Logic is concerned with statements to which the truth


values, “true” and “false”, can be assigned.

• The subject enhances one’s ability to develop logical thinking and


ability to problem solving.

09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 112


09/18/22 ANAMIKA TIWARI Discrete Structures Unit 4 113

You might also like