0% found this document useful (0 votes)
26 views

Lecture 2 Chapter 1 Lesson 1

Uploaded by

me homer
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views

Lecture 2 Chapter 1 Lesson 1

Uploaded by

me homer
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 19

Prepared by Khairun Nahar,Assistant Professor,

Department of CSE, Comilla University

LECTURE 2
Chapter 1
The Foundations: Logic and Proofs
Prepared by Khairun Nahar,Assistant Professor,
Department of CSE, Comilla University

Definition 5 (Conditional Statement)


Let p and q be propositions. The conditional statement p → q is
the proposition "if p then q ."
The conditional statement 𝐩 → 𝒒 is false when p is true and q
is false, and true otherwise.
In the conditional statement p → 𝑞, p is called the hypothesis
(or antecedent or premise) and q is called the conclusion (or
consequence).

Truth Table for the Conditional Statement


P Q P→𝑄
T T T
T F F
F T T
F F T
Prepared by Khairun Nahar,Assistant Professor,
Department of CSE, Comilla University

Conditional Statement
Representation (Symbolic) Representation (Statement)
If p ,then q
q when p
If p, q
p is sufficient for q
q if p
𝑝→𝑞 A necessary condition for p is q
q unless¬ p
p implies q
p only if q
A sufficient condition for q is p
q whenever p
q is necessary for p
q follows from p
Prepared by Khairun Nahar,Assistant Professor,
Department of CSE, Comilla University

Example 1: Let p be the statement "Maria learns discrete


mathematics" and q the statement "Maria will find a good job."
Express the statement p → 𝑞 as a statement in English
Solution:
p= Maria learns discrete mathematics
q= Maria will find a good job
The condition statement (p → 𝑞 ) = If p ,then q
=If Maria learns discrete mathematics, then she will find a
good job.
If p ,then q If Maria learns discrete mathematics, then she will find a good job.

q when p Maria will find a good job when she (Maria) learns discrete mathematics
q p
q unless¬ p Maria will find a good job unless she doe not learns discrete mathematics
q ¬p
Prepared by Khairun Nahar,Assistant Professor,
Department of CSE, Comilla University

Definition 6 (Biconditional/ Bi-implications Operation)


Let p and q be propositions.
The biconditional/ bi-implications statement p  q is the
proposition "p if and only if q ."
The biconditional statement p  q is true when p and q have
the same truth values, and is false otherwise.
p  q has exactly the same truth value as (p → q)  (q → p).

Truth Table for the Biconditional/ Bi-implications of two Propositions


P Q PQ
T T T
T F F
F T F
F F T
Prepared by Khairun Nahar,Assistant Professor,
Department of CSE, Comilla University

Biconditional/ Bi-implications Statement


Representation (Symbolic) Representation (Statement)
"p if and only if q "
"p is necessary and sufficient for q "
p  q
"if p then q, and conversely"
"p iff q" .

Example 1: Let p be the statement "You can take the flight" and let q be the
statement "You buy a ticket. Then p  q is the statement
Solution:
p= You can take the flight q= You buy a ticket
The Biconditional statement of p and q (p  q ) = p if and only if q
= You can take the flight if and only if you buy a ticket
Or
The Biconditional statement of p and q (p  q ) = p iff q
= You can take the flight iff you buy a ticket
Prepared by Khairun Nahar,Assistant Professor,
Department of CSE, Comilla University

Exercise-1:Which of the following sentences are propositions ?


What are the truth values of those that are propositions
(statement)?

Question Truth Values Valid/Invalid Proposition

Do you speak English? Invalid Proposition


Four is even. True Valid Proposition
Please submit your Invalid Proposition
proposal as soon as
possible
4 - x= 8. Invalid Proposition
Please try to solve the Invalid Proposition
problem.
Prepared by Khairun Nahar,Assistant Professor,
Department of CSE, Comilla University

Exercise-2: What is the negation of each of these propositions?

Question Solutions

(P) Negation of the proposition


(¬P)

Today is Thursday. It is not the case that today is Thursday. /


Today is not Thursday.
There is no pollution in New Jersey. It is not the case that there is no
pollution in New Jersey./There is pollution
in New Jersey.
The summer in Cumilla is hot and It is not the case that the summer in
sunny. Cumilla is hot and sunny./The summer in
Cumilla is not hot and is not sunny.
2+1=3. 2+1≠ 3
Try to solve the problem. Invalid proposition
Prepared by Khairun Nahar,Assistant Professor,
Department of CSE, Comilla University

Convert Proposition -> English Sentence


Exercise-3: Let p and q be the propositions
p : I bought a lottery ticket this week.
q : I won the million dollar jackpot on Friday.
Express each of these propositions as an English sentence.
a. p
Solution: =Negation of p
=Negation of (I bought a lottery ticket this week.)
=I did not buy a lottery ticket this week/ It is not the case that I bought a
lottery ticket this week.
b. q
Solution: =Negation of q
=Negation of (I won the million dollar jackpot on Friday).
=I did not win the million dollar jackpot on Friday./It is not the case that I won
the million dollar jackpot on Friday.
c. pVq
Solution: =Disjunction of p and q
=p or q
=I bought a lottery ticket this week or won the million dollar jackpot on
Friday.
Prepared by Khairun Nahar,Assistant Professor,
Department of CSE, Comilla University

d. p/\q
Solution: =Conjunction of p and q
=p and q
=I bought a lottery ticket this week and won the million dollar jackpot on
Friday.
e. 𝒑 →𝑞
Solution: =If p then q
= If I bought a lottery ticket this week then won the million dollar jackpot on
Friday.
f. p  q
Solution: =p if and only if q
=I bought a lottery ticket this week if and only if I won the million dollar
jackpot on Friday.
g. 𝒑 → 𝑞
Solution: = If p then q
=If (Negation of p) then (Negation of q)
=If (I did not buy a lottery ticket this week) then (I will not win the million
dollar jackpot on Friday.)
= If I did not buy a lottery ticket this week then I will not win the million
dollar jackpot on Friday.
Prepared by Khairun Nahar,Assistant Professor,
Department of CSE, Comilla University

h. 𝒑 /\𝑞
Solution: = (Negation of p) and (Negation of q) .
=I did not buy a lottery ticket this week and I did not win the million
dollar jackpot on Friday.

i. 𝒑 v (p/\q)

Solution: =(Negation of p) or (p and q)


= I did not buy a lottery ticket this week or (I bought a lottery ticket
this week and won the million dollar jackpot on Friday)
Prepared by Khairun Nahar,Assistant Professor,
Department of CSE, Comilla University

Convert English Sentence ->Proposition

Exercise-4: Let p and q be the propositions


p : I bought a lottery ticket this week.
q : I won the million dollar jackpot on Friday.
Write these propositions using p and q and logical connectives.
a. I did not buy a lottery ticket this week
Solution: =Negation of p
=p
b. I did not win the million dollar jackpot on Friday.
Solution: =Negation of q
=q
c. I bought a lottery ticket this week or won the million dollar
jackpot on Friday.
Solution: =Disjunction of p and q
=p or q
=pVq
Prepared by Khairun Nahar,Assistant Professor,
Department of CSE, Comilla University

d. I bought a lottery ticket this week and won the million dollar jackpot on
Friday
Solution: =Conjunction of p and q
=p and q
=p/\q
e. If I bought a lottery ticket this week then won the million dollar jackpot
on Friday.
Solution: =If p then q
= 𝒑 →𝑞
f. I bought a lottery ticket this week if and only if I won the million dollar
jackpot on Friday
Solution: =p if and only if q
=p  q
g. If I did not buy a lottery ticket this week then I will not win the million
dollar jackpot on Friday.
Solution: = If p then q
=If (Negation of p) then (Negation of q)
=𝒑 → 𝑞
Prepared by Khairun Nahar,Assistant Professor,
Department of CSE, Comilla University

h. I did not buy a lottery ticket this week and I did not win the million
dollar jackpot on Friday.

Solution: = (Negation of p) and (Negation of q) .


= 𝒑 /\𝑞

i. I did not buy a lottery ticket this week or (I bought a lottery ticket
this week and won the million dollar jackpot on Friday)

Solution: =(Negation of p) or (p and q)


=𝒑 v (p/\q)
Prepared by Khairun Nahar,Assistant Professor,
Department of CSE, Comilla University

Assignment-1 (Based on Lecture 2&3)


1.
Prepared by Khairun Nahar,Assistant Professor,
Department of CSE, Comilla University

2.
Prepared by Khairun Nahar,Assistant Professor,
Department of CSE, Comilla University

3.
Prepared by Khairun Nahar,Assistant Professor,
Department of CSE, Comilla University

4.
Prepared by Khairun Nahar,Assistant Professor,
Department of CSE, Comilla University

5.

You might also like