SlideShare a Scribd company logo
Unit 1- Logic
Exercises
• Which of these sentences are propositions? What are the truth values of
those that are propositions?
a) Boston is the capital of Massachusetts.
b) Miami is the capital of Florida.
c) 2 + 3 = 5.
d) 5 + 7 = 10.
e) x + 2 = 11.
f ) Answer this question
2
• Which of these are propositions? What are the truth values of those that
are propositions?
a) Do not pass go.
b) What time is it?
c) There are no black flies in Maine
d) 4 + x = 5.
e) The moon is made of green cheese.
f ) 2n ≥ 100.
3
• What is the negation of each of these propositions?
a) Mei has an MP3 player.
b) There is no pollution in New Jersey.
c) 2 + 1 = 3.
d) The summer in Maine is hot and sunny.
4
• What is the negation of each of these propositions?
a) Jennifer and Teja are friends.
b) There are 13 items in a baker’s dozen.
c) Abby sent more than 100 text messages every
day.
d) 121 is a perfect square.
5
• What is the negation of each of these propositions?
a) Steve has more than 100 GB free disk space on his
laptop.
b) Zach blocks e-mails and texts from Jennifer.
c) 7 · 11 · 13 = 999.
d) Diane rode her bicycle 100 miles on Sunday.
6
• Suppose that Smartphone A has 256MB RAM and 32GB ROM, and the
resolution of its camera is 8 MP; Smartphone B has 288 MB RAM and 64
GB ROM, and the resolution of its camera is 4 MP; and Smartphone C has
128 MB RAM and 32 GB ROM, and the resolution of its camera is 5 MP.
Determine the truth value of each of these propositions.
• a) Smartphone B has the most RAM of these three smartphones.
• b) Smartphone C has more ROM or a higher resolution camera than
Smartphone B.
• c) Smartphone B has more RAM, more ROM, and a higher resolution
camera than Smartphone A.
• d) If Smartphone B has more RAM and more ROM than Smartphone C,
then it also has a higher resolution camera.
• e) Smartphone A has more RAM than Smartphone B if and only if
Smartphone B has more RAM than Smartphone A
7
• Let p and q be the propositions
• p : I bought a lottery ticket this week.
• q : I won the million dollar jackpot.
• Express each of these propositions as an English sentence.
• a) ¬p b) p ∨ q c) p → q
• d) p ∧ q e) p ↔ q f ) ¬p →¬q
• g) ¬q ∧¬p h) ¬p ∨ (p ∧ q)
8
• Let p and q be the propositions “Swimming at the New Jersey
shore is allowed” and “Sharks have been spotted near the shore,”
respectively. Express each of these compound propositions as an
English sentence.
a) ¬q b) p ∧ q c) ¬p ∨ q
d) p →¬q e) ¬q → p f ) ¬p →¬q
g) p ↔¬q h) ¬p ∧ (p∨ ¬q)
9
• Let p and q be the propositions “The election is decided” and
“The votes have been counted,” respectively. Express each of
these compound propositions as an English sentence.
a) ¬p b) p ∨ q
c) ¬p ∧ q d) q → p
e) ¬q →¬p f ) ¬p →¬q
g) p ↔ q h) ¬q ∨ (¬p ∧ q)
10
• Let p, q, and r be the propositions
• p :You have the flu.
• q :You miss the final examination.
• r :You pass the course.
• Express each of these propositions as an English sentence.
a) p → q b) ¬q ↔ r
c) q →¬r d) p ∨ q ∨ r
e) (p →¬r) ∨ (q →¬r)
f ) (p ∧ q) ∨ (¬q ∧ r)
11
• Construct a truth table for each of these compound propositions.
a) p ∧¬p b) p ∨¬p
c) (p ∨¬q) → q d) (p ∨ q) → (p ∧ q)
e) (p → q) ↔ (¬q →¬p)
f ) (p → q) → (q → p)
12
• Construct a truth table for each of these compound propositions.
• a) p →¬p b) p ↔¬p
• c) p ⊕ (p ∨ q) d) (p ∧ q) → (p ∨ q)
• e) (q →¬p) ↔ (p ↔ q)
• f ) (p ↔ q) ⊕ (p ↔¬q)
13
• Construct a truth table for each of these compound propositions.
• a) (p ∨ q) → (p ⊕ q) b) (p ⊕ q) → (p ∧ q)
• c) (p ∨ q) ⊕ (p ∧ q) d) (p ↔ q) ⊕ (¬p ↔ q)
• e) (p ↔ q) ⊕ (¬p ↔¬r)
• f ) (p ⊕ q) → (p ⊕¬q)
14
• Construct a truth table for each of these compound propositions.
• a) p ⊕ p b) p ⊕¬p
• c) p ⊕¬q d) ¬p ⊕¬q
• e) (p ⊕ q) ∨ (p ⊕¬q) f ) (p ⊕ q) ∧ (p ⊕¬q)
15
• Construct a truth table for each of these compound propositions.
• a) p →¬q b) ¬p ↔ q
• c) (p → q) ∨ (¬p → q) d) (p → q) ∧ (¬p → q)
• e) (p ↔ q) ∨ (¬p ↔ q)
• f ) (¬p ↔¬q) ↔ (p ↔ q)
16
• Construct a truth table for each of these compound propositions.
• a) (p ∨ q) ∨ r b) (p ∨ q) ∧ r
• c) (p ∧ q) ∨ r d) (p ∧ q) ∧ r
• e) (p ∨ q)∧¬r f ) (p ∧ q)∨¬r
17
• Construct a truth table for each of these compound propositions.
• a) p → (¬q ∨ r)
• b) ¬p → (q → r)
• c) (p → q) ∨ (¬p → r)
• d) (p → q) ∧ (¬p → r)
• e) (p ↔ q) ∨ (¬q ↔ r)
• f ) (¬p ↔¬q) ↔ (q ↔ r)
18
Construct a truth table for
•((p → q) → r) → s
•(p ↔ q) ↔ (r ↔ s)
19
• Use De-Morgans law to express the negations of “Miguel has a cell
phone and he has a laptop computer” and “Heather will go to
concert or Steve will go to concert”
20
• Show that ¬(p → q) and p ∧¬q are logically equivalent using laws
• Show that ¬(p ∨ (¬p ∧ q)) and ¬p ∧¬q are logically equivalent
by developing a series of logical equivalences.
• Show that (p ∧ q) → (p ∨ q) is a tautology.
21
• Show that each of these conditional statements is a tautology by
using truth tables.
• a) (p ∧ q) → p b) p → (p ∨ q)
• c) ¬p → (p → q d) (p ∧ q) → (p → q)
• e) ¬(p → q) → p f ) ¬(p → q)→¬q
22
• Show that each of these conditional statements is a tautology by
using truth tables.
• a) [¬p ∧ (p ∨ q)] → q
• b) [(p → q) ∧ (q → r)] → (p → r)
• c) [p ∧ (p → q)] → q
• d) [(p ∨ q) ∧ (p → r) ∧ (q → r)] → r
23
Subject - predicates
• x is greater than 3” has two parts.
• The first part, the variable x, is the subject of the statement.
• The second part—the predicate, “is greater than 3”—refers to a
property that the subject of the statement can have.
• We can denote the statement “x is greater than 3” by P(x), where
P denotes the predicate “is greater than 3” and x is the variable.
• The statement P(x) is also said to be the value of the
propositional function P at x
24
• Let P(x) denote the statement “x > 3.” What are the truth values
of P(4) and P(2)?
25
Try this 
1. Let P(x) denote the statement “x ≤ 4.” What are these truth
values?
a) P(0) b) P(4) c) P(6)
2. Let P(x) be the statement “the word x contains the letter a.”
What are these truth values?
a) P(orange) b) P(lemon)
c) P(true) d) P(false)
26
• Let R(x, y, z) denote the statement`‘ x + y = z.” When values are
assigned to the variables x, y, and z, this statement has a truth
value. What are the truth values of the propositions R(1, 2, 3) and
R(0, 0, 1)?
27
• Let A(x) denote the statement “Computer x is under attack by an
intruder.” Suppose that of the computers on campus, only CS2 and
MATH1 are currently under attack by intruders. What are truth
values of A(CS1), A(CS2), and A(MATH1)?
28
• Let Q(x, y) denote the statement “x = y + 3.” What are the truth
values of the propositions Q(1, 2) and Q(3, 0)?
29
• if x > 0 then x := x + 1
30
• Let A(c, n) denote the statement “Computer c is connected to
network n,” where c is a variable representing a computer and n is
a variable representing a network. Suppose that the computer
MATH1 is connected to network CAMPUS2, but not to network
CAMPUS1. What are the values of A(MATH1, CAMPUS1) and
A(MATH1, CAMPUS2)?
31
Try this one 
State the value of x after the statement ifP(x) then x := 1 is
executed, where P(x) is the statement “x > 1,” if the value of x
when this statement is reached is
• a) x = 0 b) x = 1
• c) x = 2
32
Preconditions and postcondition
• The statements that describe valid input are known as
preconditions
• The conditions that the output should satisfy when the program
has run are known as postconditions.
33
• Consider the following program, designed to interchange the
values of two variables x and y.
temp := x
x := y
y := temp
• Find predicates that we can use as the precondition and the
postcondition to verify the correctness of this program.
34
Quantifiers
• Quantification expresses the extent to which a predicate
is true over a range of elements.
• Two types of quantification
• Universal quantification: which tells us that a predicate is
true for every element under consideration
• Existential quantification, which tells us that there is one or
more element under consideration for which the predicate is
true.
• The area of logic that deals with predicates and
quantifiers is called the predicate calculus
35
• The universal quantification of P(x) is the statement
• “P(x) for all values of x in the domain.”
• The notation ∀ x P(x) denotes the universal quantification of P(x).
Here ∀ is called the universal quantifier.
• We read ∀xP(x) as “ for all x P(x)” or “for every xP(x).”
• An element for which P(x) is false is called a counterexample of
∀xP(x).
36
37
example
• Let P(x) be the statement “x + 1 > x.” What is the truth value of
the quantification ∀xP(x), where the domain consists of all real
numbers?
• Let Q(x) be the statement “x < 2.” What is the truth value of the
quantification ∀xQ(x), where the domain consists of all real
numbers?
38
• When all the elements in the domain can be listed—say, x1, x2, . .
., xn—it follows that the universal quantification ∀xP(x) is the
same as the conjunction
P(x1) ∧ P(x2) ∧ · · · ∧ P(xn),
because this conjunction is true if and only if P(x1), P(x2), . . . , P
(xn) are all true.
39
• What is the truth value of ∀x P(x), where P(x) is the statement
“x2 < 10” and the domain consists of the positive integers not
exceeding 4?
• What does the statement ∀x N(x) mean if N(x) is “Computer x is
connected to the network” and the domain consists of all
computers on campus?
40
Existential quantification
• There exists an element x in the domain such that p(x)
• There is an x such that P(x)
• There is at least one x such that P(x)
• the statement ∃xP(x) is false if and only if there is no element x in
the domain for which P(x) is true.
• That is, ∃xP(x) is false if and only if P(x) is false for every element
of the domain
41
examples
• Let P(x) denote the statement “x > 3.” What is the truth value of
the quantification ∃xP(x), where the domain consists of all real
numbers?
42
• Let Q(x) denote the statement “x = x + 1.”What is the truth value
of the quantification ∃x Q(x), where the domain consists of all
real numbers?
43
• When all elements in the domain can be listed—say, x1, x2, . . . ,
xn—the existential quantification ∃xP(x) is the same as the
disjunction
P(x1) ∨ P(x2) ∨ · · · ∨ P(xn),
because this disjunction is true if and only if at least one of P(x1),
P(x2), . . . , P (xn) is true.
44
• What is the truth value of ∃x P(x), where P(x) is the statement
“x2 > 10” and the universe of discourse consists of the positive
integers not exceeding 4?
45

More Related Content

What's hot

Course notes2summer2012
Course notes2summer2012Course notes2summer2012
Course notes2summer2012
Von Adam Martinez
 
Discrete Structure Lecture #5 & 6.pdf
Discrete Structure Lecture #5 & 6.pdfDiscrete Structure Lecture #5 & 6.pdf
Discrete Structure Lecture #5 & 6.pdf
MuhammadUmerIhtisham
 
Quantifiers and its Types
Quantifiers and its TypesQuantifiers and its Types
Quantifiers and its Types
HumayunNaseer4
 
Formal Logic - Lesson 8 - Predicates and Quantifiers
Formal Logic - Lesson 8 - Predicates and QuantifiersFormal Logic - Lesson 8 - Predicates and Quantifiers
Formal Logic - Lesson 8 - Predicates and Quantifiers
Laguna State Polytechnic University
 
Predicate &amp; quantifier
Predicate &amp; quantifierPredicate &amp; quantifier
Predicate &amp; quantifier
University of Potsdam
 
Predicates and Quantifiers
Predicates and Quantifiers Predicates and Quantifiers
Predicates and Quantifiers
Istiak Ahmed
 
Math
MathMath
Chapter-3: DIRECT PROOF AND PROOF BY CONTRAPOSITIVE
Chapter-3: DIRECT PROOF AND PROOF BY CONTRAPOSITIVEChapter-3: DIRECT PROOF AND PROOF BY CONTRAPOSITIVE
Chapter-3: DIRECT PROOF AND PROOF BY CONTRAPOSITIVE
nszakir
 
Testing for mixtures by seeking components
Testing for mixtures by seeking componentsTesting for mixtures by seeking components
Testing for mixtures by seeking components
Christian Robert
 
Boolean Programs and Quantified Propositional Proof System -
Boolean Programs and Quantified Propositional Proof System - Boolean Programs and Quantified Propositional Proof System -
Boolean Programs and Quantified Propositional Proof System -
Michael Soltys
 
Discrete Math Lecture 02: First Order Logic
Discrete Math Lecture 02: First Order LogicDiscrete Math Lecture 02: First Order Logic
Discrete Math Lecture 02: First Order Logic
IT Engineering Department
 
Predicates and quantifiers presentation topics
Predicates  and quantifiers  presentation topicsPredicates  and quantifiers  presentation topics
Predicates and quantifiers presentation topics
R.h. Himel
 
Delayed acceptance for Metropolis-Hastings algorithms
Delayed acceptance for Metropolis-Hastings algorithmsDelayed acceptance for Metropolis-Hastings algorithms
Delayed acceptance for Metropolis-Hastings algorithms
Christian Robert
 
Chapter-4: More on Direct Proof and Proof by Contrapositive
Chapter-4: More on Direct Proof and Proof by ContrapositiveChapter-4: More on Direct Proof and Proof by Contrapositive
Chapter-4: More on Direct Proof and Proof by Contrapositive
nszakir
 
Quantum Search and Quantum Learning
Quantum Search and Quantum Learning Quantum Search and Quantum Learning
Quantum Search and Quantum Learning
Jean-Christophe Lavocat
 
Final
Final Final
O2
O2O2
Imc2020 day1&amp;2 problems&amp;solutions
Imc2020 day1&amp;2 problems&amp;solutionsImc2020 day1&amp;2 problems&amp;solutions
Imc2020 day1&amp;2 problems&amp;solutions
Christos Loizos
 
Presentation mathmatic 3
Presentation mathmatic 3Presentation mathmatic 3
Presentation mathmatic 3
nashaat algrara
 
Kolev skalna2018 article-exact_solutiontoa_parametricline
Kolev skalna2018 article-exact_solutiontoa_parametriclineKolev skalna2018 article-exact_solutiontoa_parametricline
Kolev skalna2018 article-exact_solutiontoa_parametricline
Alina Barbulescu
 

What's hot (20)

Course notes2summer2012
Course notes2summer2012Course notes2summer2012
Course notes2summer2012
 
Discrete Structure Lecture #5 & 6.pdf
Discrete Structure Lecture #5 & 6.pdfDiscrete Structure Lecture #5 & 6.pdf
Discrete Structure Lecture #5 & 6.pdf
 
Quantifiers and its Types
Quantifiers and its TypesQuantifiers and its Types
Quantifiers and its Types
 
Formal Logic - Lesson 8 - Predicates and Quantifiers
Formal Logic - Lesson 8 - Predicates and QuantifiersFormal Logic - Lesson 8 - Predicates and Quantifiers
Formal Logic - Lesson 8 - Predicates and Quantifiers
 
Predicate &amp; quantifier
Predicate &amp; quantifierPredicate &amp; quantifier
Predicate &amp; quantifier
 
Predicates and Quantifiers
Predicates and Quantifiers Predicates and Quantifiers
Predicates and Quantifiers
 
Math
MathMath
Math
 
Chapter-3: DIRECT PROOF AND PROOF BY CONTRAPOSITIVE
Chapter-3: DIRECT PROOF AND PROOF BY CONTRAPOSITIVEChapter-3: DIRECT PROOF AND PROOF BY CONTRAPOSITIVE
Chapter-3: DIRECT PROOF AND PROOF BY CONTRAPOSITIVE
 
Testing for mixtures by seeking components
Testing for mixtures by seeking componentsTesting for mixtures by seeking components
Testing for mixtures by seeking components
 
Boolean Programs and Quantified Propositional Proof System -
Boolean Programs and Quantified Propositional Proof System - Boolean Programs and Quantified Propositional Proof System -
Boolean Programs and Quantified Propositional Proof System -
 
Discrete Math Lecture 02: First Order Logic
Discrete Math Lecture 02: First Order LogicDiscrete Math Lecture 02: First Order Logic
Discrete Math Lecture 02: First Order Logic
 
Predicates and quantifiers presentation topics
Predicates  and quantifiers  presentation topicsPredicates  and quantifiers  presentation topics
Predicates and quantifiers presentation topics
 
Delayed acceptance for Metropolis-Hastings algorithms
Delayed acceptance for Metropolis-Hastings algorithmsDelayed acceptance for Metropolis-Hastings algorithms
Delayed acceptance for Metropolis-Hastings algorithms
 
Chapter-4: More on Direct Proof and Proof by Contrapositive
Chapter-4: More on Direct Proof and Proof by ContrapositiveChapter-4: More on Direct Proof and Proof by Contrapositive
Chapter-4: More on Direct Proof and Proof by Contrapositive
 
Quantum Search and Quantum Learning
Quantum Search and Quantum Learning Quantum Search and Quantum Learning
Quantum Search and Quantum Learning
 
Final
Final Final
Final
 
O2
O2O2
O2
 
Imc2020 day1&amp;2 problems&amp;solutions
Imc2020 day1&amp;2 problems&amp;solutionsImc2020 day1&amp;2 problems&amp;solutions
Imc2020 day1&amp;2 problems&amp;solutions
 
Presentation mathmatic 3
Presentation mathmatic 3Presentation mathmatic 3
Presentation mathmatic 3
 
Kolev skalna2018 article-exact_solutiontoa_parametricline
Kolev skalna2018 article-exact_solutiontoa_parametriclineKolev skalna2018 article-exact_solutiontoa_parametricline
Kolev skalna2018 article-exact_solutiontoa_parametricline
 

Viewers also liked

Laws in disceret
Laws in disceretLaws in disceret
Laws in disceret
Abdur Rehman
 
第一週學習單:教學用Ppt
第一週學習單:教學用Ppt第一週學習單:教學用Ppt
第一週學習單:教學用Ppt
Wade Jin
 
Logic
LogicLogic
Logic
LogicLogic
Logic
Yasir Khan
 
Unit 6 input modeling problems
Unit 6 input modeling problemsUnit 6 input modeling problems
Unit 6 input modeling problems
raksharao
 
Unit 1 introduction contd
Unit 1 introduction contdUnit 1 introduction contd
Unit 1 introduction contd
raksharao
 
java-Unit4 chap2- awt controls and layout managers of applet
java-Unit4 chap2- awt controls and layout managers of appletjava-Unit4 chap2- awt controls and layout managers of applet
java-Unit4 chap2- awt controls and layout managers of applet
raksharao
 
Notes for logic
Notes for logicNotes for logic
Notes for logic
Amit Chaudhary
 
Logic Notes
Logic NotesLogic Notes
Logic Notes
acavis
 
Simulation & Modeling - Smilulation Queuing System
Simulation & Modeling - Smilulation Queuing SystemSimulation & Modeling - Smilulation Queuing System
Simulation & Modeling - Smilulation Queuing System
Maruf Rion
 
Queuing model
Queuing model Queuing model
Queuing model
goyalrama
 
Unit 4 queuing models
Unit 4 queuing modelsUnit 4 queuing models
Unit 4 queuing models
raksharao
 
Truth Vs. Validity
Truth Vs. ValidityTruth Vs. Validity
Truth Vs. Validity
LisaMD4061
 
QUEUING THEORY
QUEUING THEORYQUEUING THEORY
QUEUING THEORY
avtarsingh
 

Viewers also liked (14)

Laws in disceret
Laws in disceretLaws in disceret
Laws in disceret
 
第一週學習單:教學用Ppt
第一週學習單:教學用Ppt第一週學習單:教學用Ppt
第一週學習單:教學用Ppt
 
Logic
LogicLogic
Logic
 
Logic
LogicLogic
Logic
 
Unit 6 input modeling problems
Unit 6 input modeling problemsUnit 6 input modeling problems
Unit 6 input modeling problems
 
Unit 1 introduction contd
Unit 1 introduction contdUnit 1 introduction contd
Unit 1 introduction contd
 
java-Unit4 chap2- awt controls and layout managers of applet
java-Unit4 chap2- awt controls and layout managers of appletjava-Unit4 chap2- awt controls and layout managers of applet
java-Unit4 chap2- awt controls and layout managers of applet
 
Notes for logic
Notes for logicNotes for logic
Notes for logic
 
Logic Notes
Logic NotesLogic Notes
Logic Notes
 
Simulation & Modeling - Smilulation Queuing System
Simulation & Modeling - Smilulation Queuing SystemSimulation & Modeling - Smilulation Queuing System
Simulation & Modeling - Smilulation Queuing System
 
Queuing model
Queuing model Queuing model
Queuing model
 
Unit 4 queuing models
Unit 4 queuing modelsUnit 4 queuing models
Unit 4 queuing models
 
Truth Vs. Validity
Truth Vs. ValidityTruth Vs. Validity
Truth Vs. Validity
 
QUEUING THEORY
QUEUING THEORYQUEUING THEORY
QUEUING THEORY
 

Similar to Unit 1-logic

Discrete Math Chapter 1 :The Foundations: Logic and Proofs
Discrete Math Chapter 1 :The Foundations: Logic and ProofsDiscrete Math Chapter 1 :The Foundations: Logic and Proofs
Discrete Math Chapter 1 :The Foundations: Logic and Proofs
Amr Rashed
 
Algorithmic foundations.docx
Algorithmic foundations.docxAlgorithmic foundations.docx
Algorithmic foundations.docx
edwin orege
 
1606751772-ds-lecture-6.ppt
1606751772-ds-lecture-6.ppt1606751772-ds-lecture-6.ppt
1606751772-ds-lecture-6.ppt
TejasAditya2
 
Discreate structure presentation introduction
Discreate structure presentation introductionDiscreate structure presentation introduction
Discreate structure presentation introduction
yashirraza123
 
Discrete Mathematics - All chapters
Discrete Mathematics - All chapters Discrete Mathematics - All chapters
Discrete Mathematics - All chapters
Omnia A. Abdullah
 
Abstract machines for great good
Abstract machines for great goodAbstract machines for great good
Abstract machines for great good
Александр Ежов
 
Unit III Knowledge Representation in AI K.Sundar,AP/CSE,VEC
Unit III  Knowledge Representation in AI   K.Sundar,AP/CSE,VECUnit III  Knowledge Representation in AI   K.Sundar,AP/CSE,VEC
Unit III Knowledge Representation in AI K.Sundar,AP/CSE,VEC
sundarKanagaraj1
 
1. Logic and Proofs.ppt
1. Logic and Proofs.ppt1. Logic and Proofs.ppt
1. Logic and Proofs.ppt
ThnhNguynQuang14
 
PTSP PPT.pdf
PTSP PPT.pdfPTSP PPT.pdf
PTSP PPT.pdf
goutamkrsahoo
 
jalalam.ppt
jalalam.pptjalalam.ppt
jalalam.ppt
HamnaAnis1
 
Tutorial_2.pdf
Tutorial_2.pdfTutorial_2.pdf
Tutorial_2.pdf
mayooran1987v
 
09
0909
Otter 2016-11-28-01-ss
Otter 2016-11-28-01-ssOtter 2016-11-28-01-ss
Otter 2016-11-28-01-ss
Ruo Ando
 
Large-scale computation without sacrificing expressiveness
Large-scale computation without sacrificing expressivenessLarge-scale computation without sacrificing expressiveness
Large-scale computation without sacrificing expressiveness
Sangjin Han
 
Talk at CIRM on Poisson equation and debiasing techniques
Talk at CIRM on Poisson equation and debiasing techniquesTalk at CIRM on Poisson equation and debiasing techniques
Talk at CIRM on Poisson equation and debiasing techniques
Pierre Jacob
 
Per3 logika
Per3 logikaPer3 logika
chapter9.ppt
chapter9.pptchapter9.ppt
chapter9.ppt
Praveen Kumar
 
X02PredCalculus.ppt
X02PredCalculus.pptX02PredCalculus.ppt
X02PredCalculus.ppt
MalligaarjunanN
 
A Family Of Extragradient Methods For Solving Equilibrium Problems
A Family Of Extragradient Methods For Solving Equilibrium ProblemsA Family Of Extragradient Methods For Solving Equilibrium Problems
A Family Of Extragradient Methods For Solving Equilibrium Problems
Yasmine Anino
 
Ch8-LogicalRepresentationAndReasoning.ppt
Ch8-LogicalRepresentationAndReasoning.pptCh8-LogicalRepresentationAndReasoning.ppt
Ch8-LogicalRepresentationAndReasoning.ppt
FELICIALILIANJ
 

Similar to Unit 1-logic (20)

Discrete Math Chapter 1 :The Foundations: Logic and Proofs
Discrete Math Chapter 1 :The Foundations: Logic and ProofsDiscrete Math Chapter 1 :The Foundations: Logic and Proofs
Discrete Math Chapter 1 :The Foundations: Logic and Proofs
 
Algorithmic foundations.docx
Algorithmic foundations.docxAlgorithmic foundations.docx
Algorithmic foundations.docx
 
1606751772-ds-lecture-6.ppt
1606751772-ds-lecture-6.ppt1606751772-ds-lecture-6.ppt
1606751772-ds-lecture-6.ppt
 
Discreate structure presentation introduction
Discreate structure presentation introductionDiscreate structure presentation introduction
Discreate structure presentation introduction
 
Discrete Mathematics - All chapters
Discrete Mathematics - All chapters Discrete Mathematics - All chapters
Discrete Mathematics - All chapters
 
Abstract machines for great good
Abstract machines for great goodAbstract machines for great good
Abstract machines for great good
 
Unit III Knowledge Representation in AI K.Sundar,AP/CSE,VEC
Unit III  Knowledge Representation in AI   K.Sundar,AP/CSE,VECUnit III  Knowledge Representation in AI   K.Sundar,AP/CSE,VEC
Unit III Knowledge Representation in AI K.Sundar,AP/CSE,VEC
 
1. Logic and Proofs.ppt
1. Logic and Proofs.ppt1. Logic and Proofs.ppt
1. Logic and Proofs.ppt
 
PTSP PPT.pdf
PTSP PPT.pdfPTSP PPT.pdf
PTSP PPT.pdf
 
jalalam.ppt
jalalam.pptjalalam.ppt
jalalam.ppt
 
Tutorial_2.pdf
Tutorial_2.pdfTutorial_2.pdf
Tutorial_2.pdf
 
09
0909
09
 
Otter 2016-11-28-01-ss
Otter 2016-11-28-01-ssOtter 2016-11-28-01-ss
Otter 2016-11-28-01-ss
 
Large-scale computation without sacrificing expressiveness
Large-scale computation without sacrificing expressivenessLarge-scale computation without sacrificing expressiveness
Large-scale computation without sacrificing expressiveness
 
Talk at CIRM on Poisson equation and debiasing techniques
Talk at CIRM on Poisson equation and debiasing techniquesTalk at CIRM on Poisson equation and debiasing techniques
Talk at CIRM on Poisson equation and debiasing techniques
 
Per3 logika
Per3 logikaPer3 logika
Per3 logika
 
chapter9.ppt
chapter9.pptchapter9.ppt
chapter9.ppt
 
X02PredCalculus.ppt
X02PredCalculus.pptX02PredCalculus.ppt
X02PredCalculus.ppt
 
A Family Of Extragradient Methods For Solving Equilibrium Problems
A Family Of Extragradient Methods For Solving Equilibrium ProblemsA Family Of Extragradient Methods For Solving Equilibrium Problems
A Family Of Extragradient Methods For Solving Equilibrium Problems
 
Ch8-LogicalRepresentationAndReasoning.ppt
Ch8-LogicalRepresentationAndReasoning.pptCh8-LogicalRepresentationAndReasoning.ppt
Ch8-LogicalRepresentationAndReasoning.ppt
 

More from raksharao

Unit 1 rules of inference
Unit 1  rules of inferenceUnit 1  rules of inference
Unit 1 rules of inference
raksharao
 
Unit 1 introduction to proofs
Unit 1  introduction to proofsUnit 1  introduction to proofs
Unit 1 introduction to proofs
raksharao
 
Unit 7 verification &amp; validation
Unit 7 verification &amp; validationUnit 7 verification &amp; validation
Unit 7 verification &amp; validation
raksharao
 
Unit 6 input modeling
Unit 6 input modeling Unit 6 input modeling
Unit 6 input modeling
raksharao
 
Unit 5 general principles, simulation software
Unit 5 general principles, simulation softwareUnit 5 general principles, simulation software
Unit 5 general principles, simulation software
raksharao
 
Unit 5 general principles, simulation software problems
Unit 5  general principles, simulation software problemsUnit 5  general principles, simulation software problems
Unit 5 general principles, simulation software problems
raksharao
 
Unit 4 queuing models problems
Unit 4 queuing models problemsUnit 4 queuing models problems
Unit 4 queuing models problems
raksharao
 
Unit 3 random number generation, random-variate generation
Unit 3 random number generation, random-variate generationUnit 3 random number generation, random-variate generation
Unit 3 random number generation, random-variate generation
raksharao
 
Unit 1 introduction
Unit 1 introductionUnit 1 introduction
Unit 1 introduction
raksharao
 
Module1 part2
Module1 part2Module1 part2
Module1 part2
raksharao
 
Module1 Mobile Computing Architecture
Module1 Mobile Computing ArchitectureModule1 Mobile Computing Architecture
Module1 Mobile Computing Architecture
raksharao
 
java Unit4 chapter1 applets
java Unit4 chapter1 appletsjava Unit4 chapter1 applets
java Unit4 chapter1 applets
raksharao
 
Chap3 multi threaded programming
Chap3 multi threaded programmingChap3 multi threaded programming
Chap3 multi threaded programming
raksharao
 
Java-Unit 3- Chap2 exception handling
Java-Unit 3- Chap2 exception handlingJava-Unit 3- Chap2 exception handling
Java-Unit 3- Chap2 exception handling
raksharao
 
FIT-Unit3 chapter2- Computer Languages
FIT-Unit3 chapter2- Computer LanguagesFIT-Unit3 chapter2- Computer Languages
FIT-Unit3 chapter2- Computer Languages
raksharao
 
FIT-Unit3 chapter 1 -computer program
FIT-Unit3 chapter 1 -computer programFIT-Unit3 chapter 1 -computer program
FIT-Unit3 chapter 1 -computer program
raksharao
 
output devices
output devicesoutput devices
output devices
raksharao
 
Chap2 exception handling
Chap2 exception handlingChap2 exception handling
Chap2 exception handling
raksharao
 
C#unit4
C#unit4C#unit4
C#unit4
raksharao
 
Chap2 input devices
Chap2 input devicesChap2 input devices
Chap2 input devices
raksharao
 

More from raksharao (20)

Unit 1 rules of inference
Unit 1  rules of inferenceUnit 1  rules of inference
Unit 1 rules of inference
 
Unit 1 introduction to proofs
Unit 1  introduction to proofsUnit 1  introduction to proofs
Unit 1 introduction to proofs
 
Unit 7 verification &amp; validation
Unit 7 verification &amp; validationUnit 7 verification &amp; validation
Unit 7 verification &amp; validation
 
Unit 6 input modeling
Unit 6 input modeling Unit 6 input modeling
Unit 6 input modeling
 
Unit 5 general principles, simulation software
Unit 5 general principles, simulation softwareUnit 5 general principles, simulation software
Unit 5 general principles, simulation software
 
Unit 5 general principles, simulation software problems
Unit 5  general principles, simulation software problemsUnit 5  general principles, simulation software problems
Unit 5 general principles, simulation software problems
 
Unit 4 queuing models problems
Unit 4 queuing models problemsUnit 4 queuing models problems
Unit 4 queuing models problems
 
Unit 3 random number generation, random-variate generation
Unit 3 random number generation, random-variate generationUnit 3 random number generation, random-variate generation
Unit 3 random number generation, random-variate generation
 
Unit 1 introduction
Unit 1 introductionUnit 1 introduction
Unit 1 introduction
 
Module1 part2
Module1 part2Module1 part2
Module1 part2
 
Module1 Mobile Computing Architecture
Module1 Mobile Computing ArchitectureModule1 Mobile Computing Architecture
Module1 Mobile Computing Architecture
 
java Unit4 chapter1 applets
java Unit4 chapter1 appletsjava Unit4 chapter1 applets
java Unit4 chapter1 applets
 
Chap3 multi threaded programming
Chap3 multi threaded programmingChap3 multi threaded programming
Chap3 multi threaded programming
 
Java-Unit 3- Chap2 exception handling
Java-Unit 3- Chap2 exception handlingJava-Unit 3- Chap2 exception handling
Java-Unit 3- Chap2 exception handling
 
FIT-Unit3 chapter2- Computer Languages
FIT-Unit3 chapter2- Computer LanguagesFIT-Unit3 chapter2- Computer Languages
FIT-Unit3 chapter2- Computer Languages
 
FIT-Unit3 chapter 1 -computer program
FIT-Unit3 chapter 1 -computer programFIT-Unit3 chapter 1 -computer program
FIT-Unit3 chapter 1 -computer program
 
output devices
output devicesoutput devices
output devices
 
Chap2 exception handling
Chap2 exception handlingChap2 exception handling
Chap2 exception handling
 
C#unit4
C#unit4C#unit4
C#unit4
 
Chap2 input devices
Chap2 input devicesChap2 input devices
Chap2 input devices
 

Recently uploaded

مصحف القراءات العشر أعد أحرف الخلاف سمير بسيوني.pdf
مصحف القراءات العشر   أعد أحرف الخلاف سمير بسيوني.pdfمصحف القراءات العشر   أعد أحرف الخلاف سمير بسيوني.pdf
مصحف القراءات العشر أعد أحرف الخلاف سمير بسيوني.pdf
سمير بسيوني
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
PECB
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
Nguyen Thanh Tu Collection
 
Stack Memory Organization of 8086 Microprocessor
Stack Memory Organization of 8086 MicroprocessorStack Memory Organization of 8086 Microprocessor
Stack Memory Organization of 8086 Microprocessor
JomonJoseph58
 
How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17
Celine George
 
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skillsspot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
haiqairshad
 
Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...
PsychoTech Services
 
Electric Fetus - Record Store Scavenger Hunt
Electric Fetus - Record Store Scavenger HuntElectric Fetus - Record Store Scavenger Hunt
Electric Fetus - Record Store Scavenger Hunt
RamseyBerglund
 
HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.
deepaannamalai16
 
UGC NET Exam Paper 1- Unit 1:Teaching Aptitude
UGC NET Exam Paper 1- Unit 1:Teaching AptitudeUGC NET Exam Paper 1- Unit 1:Teaching Aptitude
UGC NET Exam Paper 1- Unit 1:Teaching Aptitude
S. Raj Kumar
 
How to deliver Powerpoint Presentations.pptx
How to deliver Powerpoint  Presentations.pptxHow to deliver Powerpoint  Presentations.pptx
How to deliver Powerpoint Presentations.pptx
HajraNaeem15
 
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem studentsRHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
Himanshu Rai
 
Mule event processing models | MuleSoft Mysore Meetup #47
Mule event processing models | MuleSoft Mysore Meetup #47Mule event processing models | MuleSoft Mysore Meetup #47
Mule event processing models | MuleSoft Mysore Meetup #47
MysoreMuleSoftMeetup
 
BBR 2024 Summer Sessions Interview Training
BBR  2024 Summer Sessions Interview TrainingBBR  2024 Summer Sessions Interview Training
BBR 2024 Summer Sessions Interview Training
Katrina Pritchard
 
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UPLAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
RAHUL
 
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdfREASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
giancarloi8888
 
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptxRESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
zuzanka
 
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptxChapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Denish Jangid
 
Bonku-Babus-Friend by Sathyajith Ray (9)
Bonku-Babus-Friend by Sathyajith Ray  (9)Bonku-Babus-Friend by Sathyajith Ray  (9)
Bonku-Babus-Friend by Sathyajith Ray (9)
nitinpv4ai
 
How to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 InventoryHow to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 Inventory
Celine George
 

Recently uploaded (20)

مصحف القراءات العشر أعد أحرف الخلاف سمير بسيوني.pdf
مصحف القراءات العشر   أعد أحرف الخلاف سمير بسيوني.pdfمصحف القراءات العشر   أعد أحرف الخلاف سمير بسيوني.pdf
مصحف القراءات العشر أعد أحرف الخلاف سمير بسيوني.pdf
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
 
Stack Memory Organization of 8086 Microprocessor
Stack Memory Organization of 8086 MicroprocessorStack Memory Organization of 8086 Microprocessor
Stack Memory Organization of 8086 Microprocessor
 
How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17
 
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skillsspot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
 
Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...
 
Electric Fetus - Record Store Scavenger Hunt
Electric Fetus - Record Store Scavenger HuntElectric Fetus - Record Store Scavenger Hunt
Electric Fetus - Record Store Scavenger Hunt
 
HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.
 
UGC NET Exam Paper 1- Unit 1:Teaching Aptitude
UGC NET Exam Paper 1- Unit 1:Teaching AptitudeUGC NET Exam Paper 1- Unit 1:Teaching Aptitude
UGC NET Exam Paper 1- Unit 1:Teaching Aptitude
 
How to deliver Powerpoint Presentations.pptx
How to deliver Powerpoint  Presentations.pptxHow to deliver Powerpoint  Presentations.pptx
How to deliver Powerpoint Presentations.pptx
 
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem studentsRHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
 
Mule event processing models | MuleSoft Mysore Meetup #47
Mule event processing models | MuleSoft Mysore Meetup #47Mule event processing models | MuleSoft Mysore Meetup #47
Mule event processing models | MuleSoft Mysore Meetup #47
 
BBR 2024 Summer Sessions Interview Training
BBR  2024 Summer Sessions Interview TrainingBBR  2024 Summer Sessions Interview Training
BBR 2024 Summer Sessions Interview Training
 
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UPLAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
 
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdfREASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
 
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptxRESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
 
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptxChapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptx
 
Bonku-Babus-Friend by Sathyajith Ray (9)
Bonku-Babus-Friend by Sathyajith Ray  (9)Bonku-Babus-Friend by Sathyajith Ray  (9)
Bonku-Babus-Friend by Sathyajith Ray (9)
 
How to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 InventoryHow to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 Inventory
 

Unit 1-logic

  • 2. • Which of these sentences are propositions? What are the truth values of those that are propositions? a) Boston is the capital of Massachusetts. b) Miami is the capital of Florida. c) 2 + 3 = 5. d) 5 + 7 = 10. e) x + 2 = 11. f ) Answer this question 2
  • 3. • Which of these are propositions? What are the truth values of those that are propositions? a) Do not pass go. b) What time is it? c) There are no black flies in Maine d) 4 + x = 5. e) The moon is made of green cheese. f ) 2n ≥ 100. 3
  • 4. • What is the negation of each of these propositions? a) Mei has an MP3 player. b) There is no pollution in New Jersey. c) 2 + 1 = 3. d) The summer in Maine is hot and sunny. 4
  • 5. • What is the negation of each of these propositions? a) Jennifer and Teja are friends. b) There are 13 items in a baker’s dozen. c) Abby sent more than 100 text messages every day. d) 121 is a perfect square. 5
  • 6. • What is the negation of each of these propositions? a) Steve has more than 100 GB free disk space on his laptop. b) Zach blocks e-mails and texts from Jennifer. c) 7 · 11 · 13 = 999. d) Diane rode her bicycle 100 miles on Sunday. 6
  • 7. • Suppose that Smartphone A has 256MB RAM and 32GB ROM, and the resolution of its camera is 8 MP; Smartphone B has 288 MB RAM and 64 GB ROM, and the resolution of its camera is 4 MP; and Smartphone C has 128 MB RAM and 32 GB ROM, and the resolution of its camera is 5 MP. Determine the truth value of each of these propositions. • a) Smartphone B has the most RAM of these three smartphones. • b) Smartphone C has more ROM or a higher resolution camera than Smartphone B. • c) Smartphone B has more RAM, more ROM, and a higher resolution camera than Smartphone A. • d) If Smartphone B has more RAM and more ROM than Smartphone C, then it also has a higher resolution camera. • e) Smartphone A has more RAM than Smartphone B if and only if Smartphone B has more RAM than Smartphone A 7
  • 8. • Let p and q be the propositions • p : I bought a lottery ticket this week. • q : I won the million dollar jackpot. • Express each of these propositions as an English sentence. • a) ¬p b) p ∨ q c) p → q • d) p ∧ q e) p ↔ q f ) ¬p →¬q • g) ¬q ∧¬p h) ¬p ∨ (p ∧ q) 8
  • 9. • Let p and q be the propositions “Swimming at the New Jersey shore is allowed” and “Sharks have been spotted near the shore,” respectively. Express each of these compound propositions as an English sentence. a) ¬q b) p ∧ q c) ¬p ∨ q d) p →¬q e) ¬q → p f ) ¬p →¬q g) p ↔¬q h) ¬p ∧ (p∨ ¬q) 9
  • 10. • Let p and q be the propositions “The election is decided” and “The votes have been counted,” respectively. Express each of these compound propositions as an English sentence. a) ¬p b) p ∨ q c) ¬p ∧ q d) q → p e) ¬q →¬p f ) ¬p →¬q g) p ↔ q h) ¬q ∨ (¬p ∧ q) 10
  • 11. • Let p, q, and r be the propositions • p :You have the flu. • q :You miss the final examination. • r :You pass the course. • Express each of these propositions as an English sentence. a) p → q b) ¬q ↔ r c) q →¬r d) p ∨ q ∨ r e) (p →¬r) ∨ (q →¬r) f ) (p ∧ q) ∨ (¬q ∧ r) 11
  • 12. • Construct a truth table for each of these compound propositions. a) p ∧¬p b) p ∨¬p c) (p ∨¬q) → q d) (p ∨ q) → (p ∧ q) e) (p → q) ↔ (¬q →¬p) f ) (p → q) → (q → p) 12
  • 13. • Construct a truth table for each of these compound propositions. • a) p →¬p b) p ↔¬p • c) p ⊕ (p ∨ q) d) (p ∧ q) → (p ∨ q) • e) (q →¬p) ↔ (p ↔ q) • f ) (p ↔ q) ⊕ (p ↔¬q) 13
  • 14. • Construct a truth table for each of these compound propositions. • a) (p ∨ q) → (p ⊕ q) b) (p ⊕ q) → (p ∧ q) • c) (p ∨ q) ⊕ (p ∧ q) d) (p ↔ q) ⊕ (¬p ↔ q) • e) (p ↔ q) ⊕ (¬p ↔¬r) • f ) (p ⊕ q) → (p ⊕¬q) 14
  • 15. • Construct a truth table for each of these compound propositions. • a) p ⊕ p b) p ⊕¬p • c) p ⊕¬q d) ¬p ⊕¬q • e) (p ⊕ q) ∨ (p ⊕¬q) f ) (p ⊕ q) ∧ (p ⊕¬q) 15
  • 16. • Construct a truth table for each of these compound propositions. • a) p →¬q b) ¬p ↔ q • c) (p → q) ∨ (¬p → q) d) (p → q) ∧ (¬p → q) • e) (p ↔ q) ∨ (¬p ↔ q) • f ) (¬p ↔¬q) ↔ (p ↔ q) 16
  • 17. • Construct a truth table for each of these compound propositions. • a) (p ∨ q) ∨ r b) (p ∨ q) ∧ r • c) (p ∧ q) ∨ r d) (p ∧ q) ∧ r • e) (p ∨ q)∧¬r f ) (p ∧ q)∨¬r 17
  • 18. • Construct a truth table for each of these compound propositions. • a) p → (¬q ∨ r) • b) ¬p → (q → r) • c) (p → q) ∨ (¬p → r) • d) (p → q) ∧ (¬p → r) • e) (p ↔ q) ∨ (¬q ↔ r) • f ) (¬p ↔¬q) ↔ (q ↔ r) 18
  • 19. Construct a truth table for •((p → q) → r) → s •(p ↔ q) ↔ (r ↔ s) 19
  • 20. • Use De-Morgans law to express the negations of “Miguel has a cell phone and he has a laptop computer” and “Heather will go to concert or Steve will go to concert” 20
  • 21. • Show that ¬(p → q) and p ∧¬q are logically equivalent using laws • Show that ¬(p ∨ (¬p ∧ q)) and ¬p ∧¬q are logically equivalent by developing a series of logical equivalences. • Show that (p ∧ q) → (p ∨ q) is a tautology. 21
  • 22. • Show that each of these conditional statements is a tautology by using truth tables. • a) (p ∧ q) → p b) p → (p ∨ q) • c) ¬p → (p → q d) (p ∧ q) → (p → q) • e) ¬(p → q) → p f ) ¬(p → q)→¬q 22
  • 23. • Show that each of these conditional statements is a tautology by using truth tables. • a) [¬p ∧ (p ∨ q)] → q • b) [(p → q) ∧ (q → r)] → (p → r) • c) [p ∧ (p → q)] → q • d) [(p ∨ q) ∧ (p → r) ∧ (q → r)] → r 23
  • 24. Subject - predicates • x is greater than 3” has two parts. • The first part, the variable x, is the subject of the statement. • The second part—the predicate, “is greater than 3”—refers to a property that the subject of the statement can have. • We can denote the statement “x is greater than 3” by P(x), where P denotes the predicate “is greater than 3” and x is the variable. • The statement P(x) is also said to be the value of the propositional function P at x 24
  • 25. • Let P(x) denote the statement “x > 3.” What are the truth values of P(4) and P(2)? 25
  • 26. Try this  1. Let P(x) denote the statement “x ≤ 4.” What are these truth values? a) P(0) b) P(4) c) P(6) 2. Let P(x) be the statement “the word x contains the letter a.” What are these truth values? a) P(orange) b) P(lemon) c) P(true) d) P(false) 26
  • 27. • Let R(x, y, z) denote the statement`‘ x + y = z.” When values are assigned to the variables x, y, and z, this statement has a truth value. What are the truth values of the propositions R(1, 2, 3) and R(0, 0, 1)? 27
  • 28. • Let A(x) denote the statement “Computer x is under attack by an intruder.” Suppose that of the computers on campus, only CS2 and MATH1 are currently under attack by intruders. What are truth values of A(CS1), A(CS2), and A(MATH1)? 28
  • 29. • Let Q(x, y) denote the statement “x = y + 3.” What are the truth values of the propositions Q(1, 2) and Q(3, 0)? 29
  • 30. • if x > 0 then x := x + 1 30
  • 31. • Let A(c, n) denote the statement “Computer c is connected to network n,” where c is a variable representing a computer and n is a variable representing a network. Suppose that the computer MATH1 is connected to network CAMPUS2, but not to network CAMPUS1. What are the values of A(MATH1, CAMPUS1) and A(MATH1, CAMPUS2)? 31
  • 32. Try this one  State the value of x after the statement ifP(x) then x := 1 is executed, where P(x) is the statement “x > 1,” if the value of x when this statement is reached is • a) x = 0 b) x = 1 • c) x = 2 32
  • 33. Preconditions and postcondition • The statements that describe valid input are known as preconditions • The conditions that the output should satisfy when the program has run are known as postconditions. 33
  • 34. • Consider the following program, designed to interchange the values of two variables x and y. temp := x x := y y := temp • Find predicates that we can use as the precondition and the postcondition to verify the correctness of this program. 34
  • 35. Quantifiers • Quantification expresses the extent to which a predicate is true over a range of elements. • Two types of quantification • Universal quantification: which tells us that a predicate is true for every element under consideration • Existential quantification, which tells us that there is one or more element under consideration for which the predicate is true. • The area of logic that deals with predicates and quantifiers is called the predicate calculus 35
  • 36. • The universal quantification of P(x) is the statement • “P(x) for all values of x in the domain.” • The notation ∀ x P(x) denotes the universal quantification of P(x). Here ∀ is called the universal quantifier. • We read ∀xP(x) as “ for all x P(x)” or “for every xP(x).” • An element for which P(x) is false is called a counterexample of ∀xP(x). 36
  • 37. 37
  • 38. example • Let P(x) be the statement “x + 1 > x.” What is the truth value of the quantification ∀xP(x), where the domain consists of all real numbers? • Let Q(x) be the statement “x < 2.” What is the truth value of the quantification ∀xQ(x), where the domain consists of all real numbers? 38
  • 39. • When all the elements in the domain can be listed—say, x1, x2, . . ., xn—it follows that the universal quantification ∀xP(x) is the same as the conjunction P(x1) ∧ P(x2) ∧ · · · ∧ P(xn), because this conjunction is true if and only if P(x1), P(x2), . . . , P (xn) are all true. 39
  • 40. • What is the truth value of ∀x P(x), where P(x) is the statement “x2 < 10” and the domain consists of the positive integers not exceeding 4? • What does the statement ∀x N(x) mean if N(x) is “Computer x is connected to the network” and the domain consists of all computers on campus? 40
  • 41. Existential quantification • There exists an element x in the domain such that p(x) • There is an x such that P(x) • There is at least one x such that P(x) • the statement ∃xP(x) is false if and only if there is no element x in the domain for which P(x) is true. • That is, ∃xP(x) is false if and only if P(x) is false for every element of the domain 41
  • 42. examples • Let P(x) denote the statement “x > 3.” What is the truth value of the quantification ∃xP(x), where the domain consists of all real numbers? 42
  • 43. • Let Q(x) denote the statement “x = x + 1.”What is the truth value of the quantification ∃x Q(x), where the domain consists of all real numbers? 43
  • 44. • When all elements in the domain can be listed—say, x1, x2, . . . , xn—the existential quantification ∃xP(x) is the same as the disjunction P(x1) ∨ P(x2) ∨ · · · ∨ P(xn), because this disjunction is true if and only if at least one of P(x1), P(x2), . . . , P (xn) is true. 44
  • 45. • What is the truth value of ∃x P(x), where P(x) is the statement “x2 > 10” and the universe of discourse consists of the positive integers not exceeding 4? 45