SlideShare a Scribd company logo
1 of 161
Chapter 1
The Foundations: Logic and Proofs
1.1 Propositional Logic
1.2 Propositional Equivalences
1.3 Predicates and Quantifiers
1.4 Nested Quantifiers
1.6 Introduction to Proofs
1.7 Proof Methods and Strategy
P. 1
2
• 1-Rosen, Kenneth H. "Discrete Mathematics and Its Applications.“ seventh edition
• https://www.youtube.com/watch?v=xL0kNw5TudI&ab_channel=stanfordonline
• https://www.youtube.com/watch?v=itrXYg41-V0&ab_channel=TrevTutor
• https://www.youtube.com/watch?v=PLXDfmuxqfk&ab_channel=AbdelmalekHala
wani
• https://www.youtube.com/watch?v=3iFSWhyRwh4&ab_channel=AbdelmalekHal
awani
• https://www.youtube.com/watch?v=gyoqX0W-NH4&ab_channel=TrevTutor
• https://www.youtube.com/watch?v=By2g4aaIcu8&ab_channel=AbdelmalekHala
wani
• https://www.youtube.com/watch?v=rZH5RFSXsvI&ab_channel=KimberlyBrehm
• https://www.youtube.com/playlist?list=PLl-gb0E4MII28GykmtuBXNUNoej-vY5Rz
• https://www.youtube.com/watch?v=QWDXTJCe3yo&list=PLoK2Lr1miEm_WKBBB
HUQJRXaumduqkM4S&ab_channel=FCIHOCW
References
1.1 Propositional Logic
• Logic: to give precise meaning to mathematical statements
• Proposition: a declarative sentence that is either true or false, but
not both
• 1+1=2
• Toronto is the capital of Canada
• Propositional variables: p, q, r, s
• Truth value: true (T) or false (F)
4
• Compound propositions: news propositions formed from existing
propositions using logical operators
• Definition 1: Let p be a proposition. The negation of p, denoted by p
(orp), is the statement “It is not the case that p.”
• “not p”
8
Cont.
• Definition 2: Let p and q be propositions. The
conjunction of p and q, denoted by p  q, is the
proposition “p and q.”
• Definition 3: Let p and q be propositions. The
disjunction of p and q, denoted by p  q, is the
proposition “p or q.”
11
Cont.
•Definition 4: Let p and q be propositions. The
exclusive or of p and q, denoted by p  q, is the
proposition that is true when exactly one of p
and q is true and is false otherwise.
20
Converse, Contrapositive, and Inverse
• p  q
• Converse: q  p
• Contrapositive:  q   p
• Inverse:  p   q
• Two compound propositions are equivalent if they always have the
same truth value
• The contrapositive is equivalent to the original statement
• The converse is equivalent to the inverse
30
• p is "I am in the University“, q is "It is Tuesday"
Example
31
p → q
"I am in Univ" → "It is
Tuesday"
If I am in Univ then it is
Tuesday
q → p
"It is Tuesday" → "I am in
Univ"
If it is Tuesday then I am in
Univ
¬q → ¬p
"It is NOT Tuesday" → "I
am NOT in Univ"
If it is NOT Tuesday then I
am NOT in Univ
¬p → ¬q
"I am NOT in Univ" → "It
is NOT Tuesday"
If I am NOT in Univ then it
is NOT Tuesday
Biconditionals
• Definition 6: Let p and q be propositions. The biconditional statement
p  q is the proposition “p if and only if q.”
• “bi-implications”
• “p is necessary and sufficient for q”
• “p iff q”
32
P. 9
33
Implicit Use of Biconditionals
• Biconditionals are not always explicit in natural
language
• Imprecision in natural language
• “If you finish your meal, then you can have dessert.”
• “You can have dessert if and only if you finish your meal.”
34
TABLE 7
P. 10
38
Precedence of Logical Operators
• Negation operator is applied before all other logical operators
• Conjunction operator takes precedence over disjunction operator
• Conditional and biconditional operators have lower precedence
• Parentheses are used whenever necessary
39
P. 11
41
Examples
1. ¬p → q ↔ p ^ q  r =
[((¬p) → q) ↔ ((p ^ q)  r)]
2. p ^ ¬q v p ↔ q → r ^ p =
....
Examples
45
p q p  q p → q (p → q)  (p  q)
F F F T F
F T T T T
T F T F F
T T T T T
p q ¬p p → q (p → q) ^ ¬p
F F T T T
F T T T T
T F F F F
T T F T F
Translating English Sentences
• Example: “You can access the Internet from campus only if you are a
computer science major or you are not a freshman.”
• let a = "You can access the Internet from campus" c="You are a computer
science major" f="You are a freshman“. The sentence can be represented as: a
 (c  f).
46
Exercise
• Ex.13: “You cannot ride the roller coaster if you are
under 4 feet tall unless you are older than 16 years old.”
• ….
47
• Translate the following English sentences
1. "The diagnostic message is stored in the buffer or it is
transmitted"
2. "The diagnostic message is not stored in the buffer"
3. "If the diagnostic message is stored in the buffer, then it is
transmitted"
Exercise
48
• p is "The diagnostic message is stored in the buffer"
• q is "The diagnostic message is transmitted"
• p  q is "The diagnostic message is stored in the buffer
or it is transmitted"
• ¬p is "The diagnostic message is not stored in the
buffer"
• ……… is "If the diagnostic message is stored in the
buffer, then it is transmitted"
Solution
49
TABLE 1 (1.2)
P. 22
52
Logical Equivalence
• Logical Equivalence are Compound propositions that
have the same truth values in all possible cases
• Definition 2: Compound propositions p and q are
logically equivalent if p  q is a tautology (denoted
by p  q or p  q )
• De Morgan’s Law
•  (p  q)   p   q
•  (p  q)   p   q
53
TABLE 3 (1.2)
P. 22
55
• p is "Ahmad has a cell phone" ,
• q is "Ahmad has a laptop computer."
• p  q is "Ahmad has a cell phone." and " Ahmad has a laptop
computer."
• ¬(p  q) is "Ahmad does not have a cell phone and a laptop
computer."
• ¬p  ¬q is "Ahmad does not have a cell phone or Ahmad does
not have a laptop computer."
• ¬(p  q) ≡ ¬p  ¬q
Example
58
TABLE 4 (1.2)
P. 23
pq
59
TABLE 5 (1.2)
P. 23
61
P. 24
63
TABLE 7 (1.2)
P. 25
64
TABLE 8 (1.2)
P. 25
65
• Show that ¬(p → q) ≡ p ∧¬q
• ¬(p → q) ≡ ¬(¬p ∨ q) by previous example
….
• Show that (p ∧ q) → (p ∨ q) is a tautology
(p ∧ q) → (p ∨ q) ≡ ¬(p ∧ q) ∨ (p ∨ q)
….
Exercise
70
Predicates and Quantifiers
‫والمحددات‬ ‫الفرضيات‬
Quantifiers
• Quantification
• Universal quantification: a predicate is true for every
element
• Existential quantification: there is one or more element for
which a predicate is true
89
The Universal and Existential Quantifier
• Domain: domain of discourse (universe of discourse ‫عام‬ ‫)خطاب‬
• Definition 1: The universal quantification of P(x) is the statement “P(x)
for all values of x in the domain”, denoted by x P(x)
• “for all x P(x)” or “for every x P(x)”
• Counterexample: an element for which P(x) is false
• When all elements in the domain can be listed, P(x1) P(x2) … P(xn)
98
• Definition 2: The existential quantification of P(x) is the proposition
“There exists an element x in the domain such that P(x)”, denoted by
x P(x)
• “there is an x such that P(x)” or “for some x P(x)”
• When all elements in the domain can be listed, P(x1) P(x2) … P(xn)
TABLE 1 (1.3)
P. 34
99
Logical Equivalence involving Quantifiers
• Definition 3: two statements S and T involving predicates and
quantifiers are logically equivalent, denoted by S  T, if and only if
they have the same truth value no matter which predicates are
substituted and which domain is used
• E.g. x (P(x)  Q(x))  x P(x)  x Q(x)
128
Negating Quantified Expressions
• x P(x)  x P(x)
• Negation of the statement “Every student in your class has taken a course in
Preparatory Math 2”
• “There is a student in your class who has not taken a course in Preparatory
Math 2”
• x P(x)  x P(x)
129
• What are the negations of the following expressions: ∃x
(x=2), ∀x (x2>x), ∃x (x2 =2)
• ¬∃x ( x = 2)  ∀x ¬(x=2)  ∀x (x ≠ 2 )
• ¬∀x (x2 > x)  ∃x ¬(x2> x )  ∃x (x2 ≤ x )
• ¬∃x (x2 = 2)  ∀x ¬(x2 = 2 )  ∀x (x2 ≠ 2)
• ¬∀x (x = x2)  …
• ¬∃x (x2 < 0)  …
• ∃x ¬(x2 > 0)  …
Example
130
Other Quantifiers
• Uniqueness quantifier: !x P(x) or 1x P(x)
• There exists a unique x such that P(x) is true
• Quantifiers with restricted domains
• x<0 (x2>0)
• Conditional: x(x<0  x2>0)
• z>0 (z2=2)
• Conjunction: z(z>0  z2=2)
134
Nested Quantifiers
‫المركبة‬ ‫المحددات‬
TABLE 1 (1.4)
P. 53
149
Translating mathematical statements into statements involving
nested quantifiers
• “The sum of two positive integers is always positive”
• ∀x∀y((x > 0) ∧ (y > 0) → (x +y > 0)), domain(x)=domain(y)=ℤ
• ∀x∀y(x +y > 0), domain(x)=domain(y)= ℕ
• “Every real number except zero has a multiplicative
inverse”
(a multiplicative inverse of a real number x is a real
number y such that xy=1)
• ∀x((x ≠ 0) → ∃y(xy = 1)), domain(x)= ℝ
151
Translating from nested quantifiers into English
• x (C(x)  y (C(y)  F(x, y))
• C(x): “x has a computer”, F(x,y): “x and y are friends”
• Domain of x, y: “all students in your school”
• every student in your school has a computer or has a friend who
has a computer
• xyz (F(x, y) F(x, z)  (yz)  F(y, z))
• F(a, b): “a and b are friends”
• Domain of x, y, z: “all students in your school”
• there is a student none of whose friends are also friends with
each other
154
Translating English sentences into logical expressions
155
• Negation of x y (xy=1)
• ¬∀x∃y(xy = 1)  ∃x¬∃y(xy = 1)  ∃x∀y¬(xy = 1).
Since ¬(xy ≠1) (xy ≠1),
so ¬x y (xy=1) x y(xy ≠ 1).
Negating nested quantifiers
159
Discrete Math Chapter 1 :The Foundations: Logic and Proofs
Discrete Math Chapter 1 :The Foundations: Logic and Proofs

More Related Content

What's hot

Predicates and Quantifiers
Predicates and Quantifiers Predicates and Quantifiers
Predicates and Quantifiers Istiak Ahmed
 
Rules of inference
Rules of inferenceRules of inference
Rules of inferenceharman kaur
 
Lecture 2 predicates quantifiers and rules of inference
Lecture 2 predicates quantifiers and rules of inferenceLecture 2 predicates quantifiers and rules of inference
Lecture 2 predicates quantifiers and rules of inferenceasimnawaz54
 
Discrete Structures. Lecture 1
 Discrete Structures. Lecture 1  Discrete Structures. Lecture 1
Discrete Structures. Lecture 1 Ali Usman
 
CMSC 56 | Lecture 2: Propositional Equivalences
CMSC 56 | Lecture 2: Propositional EquivalencesCMSC 56 | Lecture 2: Propositional Equivalences
CMSC 56 | Lecture 2: Propositional Equivalencesallyn joy calcaben
 
Unit 1 quantifiers
Unit 1  quantifiersUnit 1  quantifiers
Unit 1 quantifiersraksharao
 
Method of direct proof
Method of direct proofMethod of direct proof
Method of direct proofAbdur Rehman
 
Discrete Mathematics - Propositional Logic
Discrete Mathematics - Propositional LogicDiscrete Mathematics - Propositional Logic
Discrete Mathematics - Propositional LogicUniversity of Potsdam
 
Truth tables
Truth tablesTruth tables
Truth tableswalkerlj
 
Unit 1 rules of inference
Unit 1  rules of inferenceUnit 1  rules of inference
Unit 1 rules of inferenceraksharao
 
Principle of mathematical induction
Principle of mathematical inductionPrinciple of mathematical induction
Principle of mathematical inductionKriti Varshney
 
CMSC 56 | Lecture 3: Predicates & Quantifiers
CMSC 56 | Lecture 3: Predicates & QuantifiersCMSC 56 | Lecture 3: Predicates & Quantifiers
CMSC 56 | Lecture 3: Predicates & Quantifiersallyn joy calcaben
 
Discrete Math Chapter 2: Basic Structures: Sets, Functions, Sequences, Sums, ...
Discrete Math Chapter 2: Basic Structures: Sets, Functions, Sequences, Sums, ...Discrete Math Chapter 2: Basic Structures: Sets, Functions, Sequences, Sums, ...
Discrete Math Chapter 2: Basic Structures: Sets, Functions, Sequences, Sums, ...Amr Rashed
 
Mathematical Logic - Part 1
Mathematical Logic - Part 1Mathematical Logic - Part 1
Mathematical Logic - Part 1blaircomp2003
 
Mathematical induction by Animesh Sarkar
Mathematical induction by Animesh SarkarMathematical induction by Animesh Sarkar
Mathematical induction by Animesh SarkarAnimesh Sarkar
 

What's hot (20)

Predicates and Quantifiers
Predicates and Quantifiers Predicates and Quantifiers
Predicates and Quantifiers
 
Rules of inference
Rules of inferenceRules of inference
Rules of inference
 
Lecture 2 predicates quantifiers and rules of inference
Lecture 2 predicates quantifiers and rules of inferenceLecture 2 predicates quantifiers and rules of inference
Lecture 2 predicates quantifiers and rules of inference
 
Discrete Structures. Lecture 1
 Discrete Structures. Lecture 1  Discrete Structures. Lecture 1
Discrete Structures. Lecture 1
 
Propositional logic
Propositional logicPropositional logic
Propositional logic
 
Truth table
Truth tableTruth table
Truth table
 
Quantifier
QuantifierQuantifier
Quantifier
 
Truth table
Truth tableTruth table
Truth table
 
CMSC 56 | Lecture 2: Propositional Equivalences
CMSC 56 | Lecture 2: Propositional EquivalencesCMSC 56 | Lecture 2: Propositional Equivalences
CMSC 56 | Lecture 2: Propositional Equivalences
 
Unit 1 quantifiers
Unit 1  quantifiersUnit 1  quantifiers
Unit 1 quantifiers
 
Method of direct proof
Method of direct proofMethod of direct proof
Method of direct proof
 
Discrete Mathematics - Propositional Logic
Discrete Mathematics - Propositional LogicDiscrete Mathematics - Propositional Logic
Discrete Mathematics - Propositional Logic
 
Truth tables
Truth tablesTruth tables
Truth tables
 
Unit 1 rules of inference
Unit 1  rules of inferenceUnit 1  rules of inference
Unit 1 rules of inference
 
Principle of mathematical induction
Principle of mathematical inductionPrinciple of mathematical induction
Principle of mathematical induction
 
CMSC 56 | Lecture 3: Predicates & Quantifiers
CMSC 56 | Lecture 3: Predicates & QuantifiersCMSC 56 | Lecture 3: Predicates & Quantifiers
CMSC 56 | Lecture 3: Predicates & Quantifiers
 
Discrete Math Chapter 2: Basic Structures: Sets, Functions, Sequences, Sums, ...
Discrete Math Chapter 2: Basic Structures: Sets, Functions, Sequences, Sums, ...Discrete Math Chapter 2: Basic Structures: Sets, Functions, Sequences, Sums, ...
Discrete Math Chapter 2: Basic Structures: Sets, Functions, Sequences, Sums, ...
 
Mathematical Logic - Part 1
Mathematical Logic - Part 1Mathematical Logic - Part 1
Mathematical Logic - Part 1
 
Mathematical induction by Animesh Sarkar
Mathematical induction by Animesh SarkarMathematical induction by Animesh Sarkar
Mathematical induction by Animesh Sarkar
 
Set in discrete mathematics
Set in discrete mathematicsSet in discrete mathematics
Set in discrete mathematics
 

Similar to Discrete Math Chapter 1 :The Foundations: Logic and Proofs

Unit 1-logic
Unit 1-logicUnit 1-logic
Unit 1-logicraksharao
 
UNIT-III-PPT.pptx
UNIT-III-PPT.pptxUNIT-III-PPT.pptx
UNIT-III-PPT.pptxDakshBaveja
 
DisMath-lecture-2-Logic-and-Proofs-08032022-115009am.pptx
DisMath-lecture-2-Logic-and-Proofs-08032022-115009am.pptxDisMath-lecture-2-Logic-and-Proofs-08032022-115009am.pptx
DisMath-lecture-2-Logic-and-Proofs-08032022-115009am.pptxAdeel Saifee
 
Logical arguments and its computer applications.
Logical arguments and its computer applications.Logical arguments and its computer applications.
Logical arguments and its computer applications.Saumay Paul
 
Lecture 3 qualtifed rules of inference
Lecture 3 qualtifed rules of inferenceLecture 3 qualtifed rules of inference
Lecture 3 qualtifed rules of inferenceasimnawaz54
 
Discrete Structure Lecture #5 & 6.pdf
Discrete Structure Lecture #5 & 6.pdfDiscrete Structure Lecture #5 & 6.pdf
Discrete Structure Lecture #5 & 6.pdfMuhammadUmerIhtisham
 
Discrete mathematics Chapter1 presentation.ppt
Discrete mathematics Chapter1 presentation.pptDiscrete mathematics Chapter1 presentation.ppt
Discrete mathematics Chapter1 presentation.pptNandiniSR2
 
Predicates and quantifiers presentation topics
Predicates  and quantifiers  presentation topicsPredicates  and quantifiers  presentation topics
Predicates and quantifiers presentation topicsR.h. Himel
 

Similar to Discrete Math Chapter 1 :The Foundations: Logic and Proofs (20)

Unit 1-logic
Unit 1-logicUnit 1-logic
Unit 1-logic
 
1019Lec1.ppt
1019Lec1.ppt1019Lec1.ppt
1019Lec1.ppt
 
Logic
LogicLogic
Logic
 
UNIT-III-PPT.pptx
UNIT-III-PPT.pptxUNIT-III-PPT.pptx
UNIT-III-PPT.pptx
 
DisMath-lecture-2-Logic-and-Proofs-08032022-115009am.pptx
DisMath-lecture-2-Logic-and-Proofs-08032022-115009am.pptxDisMath-lecture-2-Logic-and-Proofs-08032022-115009am.pptx
DisMath-lecture-2-Logic-and-Proofs-08032022-115009am.pptx
 
Lecture 01.ppt
Lecture 01.pptLecture 01.ppt
Lecture 01.ppt
 
Logical arguments and its computer applications.
Logical arguments and its computer applications.Logical arguments and its computer applications.
Logical arguments and its computer applications.
 
logic_lec4.ppt
logic_lec4.pptlogic_lec4.ppt
logic_lec4.ppt
 
Predicate &amp; quantifier
Predicate &amp; quantifierPredicate &amp; quantifier
Predicate &amp; quantifier
 
PTSP PPT.pdf
PTSP PPT.pdfPTSP PPT.pdf
PTSP PPT.pdf
 
1. Logic and Proofs.ppt
1. Logic and Proofs.ppt1. Logic and Proofs.ppt
1. Logic and Proofs.ppt
 
Lecture 3 qualtifed rules of inference
Lecture 3 qualtifed rules of inferenceLecture 3 qualtifed rules of inference
Lecture 3 qualtifed rules of inference
 
Discrete Structure Lecture #5 & 6.pdf
Discrete Structure Lecture #5 & 6.pdfDiscrete Structure Lecture #5 & 6.pdf
Discrete Structure Lecture #5 & 6.pdf
 
CS202Ch1.ppt
CS202Ch1.pptCS202Ch1.ppt
CS202Ch1.ppt
 
Discrete mathematics Chapter1 presentation.ppt
Discrete mathematics Chapter1 presentation.pptDiscrete mathematics Chapter1 presentation.ppt
Discrete mathematics Chapter1 presentation.ppt
 
Logic
LogicLogic
Logic
 
Predicates and quantifiers presentation topics
Predicates  and quantifiers  presentation topicsPredicates  and quantifiers  presentation topics
Predicates and quantifiers presentation topics
 
X02PredCalculus.ppt
X02PredCalculus.pptX02PredCalculus.ppt
X02PredCalculus.ppt
 
L01.ppt
L01.pptL01.ppt
L01.ppt
 
02-boolean.ppt
02-boolean.ppt02-boolean.ppt
02-boolean.ppt
 

More from Amr Rashed

introduction to embedded system presentation
introduction to embedded system presentationintroduction to embedded system presentation
introduction to embedded system presentationAmr Rashed
 
Discrete Math Ch5 counting + proofs
Discrete Math Ch5 counting + proofsDiscrete Math Ch5 counting + proofs
Discrete Math Ch5 counting + proofsAmr Rashed
 
Discrete Math Chapter: 8 Relations
Discrete Math Chapter: 8 RelationsDiscrete Math Chapter: 8 Relations
Discrete Math Chapter: 8 RelationsAmr Rashed
 
Introduction to deep learning
Introduction to deep learningIntroduction to deep learning
Introduction to deep learningAmr Rashed
 
Discrete Structure Mathematics lecture 1
Discrete Structure Mathematics lecture 1Discrete Structure Mathematics lecture 1
Discrete Structure Mathematics lecture 1Amr Rashed
 
Implementation of DNA sequence alignment algorithms using Fpga ,ML,and CNN
Implementation of DNA sequence alignment algorithms  using Fpga ,ML,and CNNImplementation of DNA sequence alignment algorithms  using Fpga ,ML,and CNN
Implementation of DNA sequence alignment algorithms using Fpga ,ML,and CNNAmr Rashed
 
امن نظم المعلومات وامن الشبكات
امن نظم المعلومات وامن الشبكاتامن نظم المعلومات وامن الشبكات
امن نظم المعلومات وامن الشبكاتAmr Rashed
 
Machine learning workshop using Orange datamining framework
Machine learning workshop using Orange datamining frameworkMachine learning workshop using Orange datamining framework
Machine learning workshop using Orange datamining frameworkAmr Rashed
 
مقدمة عن الفيجوال بيسك 9-2019
مقدمة عن الفيجوال بيسك  9-2019مقدمة عن الفيجوال بيسك  9-2019
مقدمة عن الفيجوال بيسك 9-2019Amr Rashed
 
Deep learning tutorial 9/2019
Deep learning tutorial 9/2019Deep learning tutorial 9/2019
Deep learning tutorial 9/2019Amr Rashed
 
Deep Learning Tutorial
Deep Learning TutorialDeep Learning Tutorial
Deep Learning TutorialAmr Rashed
 
Matlab plotting
Matlab plottingMatlab plotting
Matlab plottingAmr Rashed
 
License Plate Recognition
License Plate RecognitionLicense Plate Recognition
License Plate RecognitionAmr Rashed
 
Introduction to FPGA, VHDL
Introduction to FPGA, VHDL  Introduction to FPGA, VHDL
Introduction to FPGA, VHDL Amr Rashed
 
Introduction to Matlab
Introduction to MatlabIntroduction to Matlab
Introduction to MatlabAmr Rashed
 
Digital image processing using matlab
Digital image processing using matlab Digital image processing using matlab
Digital image processing using matlab Amr Rashed
 

More from Amr Rashed (16)

introduction to embedded system presentation
introduction to embedded system presentationintroduction to embedded system presentation
introduction to embedded system presentation
 
Discrete Math Ch5 counting + proofs
Discrete Math Ch5 counting + proofsDiscrete Math Ch5 counting + proofs
Discrete Math Ch5 counting + proofs
 
Discrete Math Chapter: 8 Relations
Discrete Math Chapter: 8 RelationsDiscrete Math Chapter: 8 Relations
Discrete Math Chapter: 8 Relations
 
Introduction to deep learning
Introduction to deep learningIntroduction to deep learning
Introduction to deep learning
 
Discrete Structure Mathematics lecture 1
Discrete Structure Mathematics lecture 1Discrete Structure Mathematics lecture 1
Discrete Structure Mathematics lecture 1
 
Implementation of DNA sequence alignment algorithms using Fpga ,ML,and CNN
Implementation of DNA sequence alignment algorithms  using Fpga ,ML,and CNNImplementation of DNA sequence alignment algorithms  using Fpga ,ML,and CNN
Implementation of DNA sequence alignment algorithms using Fpga ,ML,and CNN
 
امن نظم المعلومات وامن الشبكات
امن نظم المعلومات وامن الشبكاتامن نظم المعلومات وامن الشبكات
امن نظم المعلومات وامن الشبكات
 
Machine learning workshop using Orange datamining framework
Machine learning workshop using Orange datamining frameworkMachine learning workshop using Orange datamining framework
Machine learning workshop using Orange datamining framework
 
مقدمة عن الفيجوال بيسك 9-2019
مقدمة عن الفيجوال بيسك  9-2019مقدمة عن الفيجوال بيسك  9-2019
مقدمة عن الفيجوال بيسك 9-2019
 
Deep learning tutorial 9/2019
Deep learning tutorial 9/2019Deep learning tutorial 9/2019
Deep learning tutorial 9/2019
 
Deep Learning Tutorial
Deep Learning TutorialDeep Learning Tutorial
Deep Learning Tutorial
 
Matlab plotting
Matlab plottingMatlab plotting
Matlab plotting
 
License Plate Recognition
License Plate RecognitionLicense Plate Recognition
License Plate Recognition
 
Introduction to FPGA, VHDL
Introduction to FPGA, VHDL  Introduction to FPGA, VHDL
Introduction to FPGA, VHDL
 
Introduction to Matlab
Introduction to MatlabIntroduction to Matlab
Introduction to Matlab
 
Digital image processing using matlab
Digital image processing using matlab Digital image processing using matlab
Digital image processing using matlab
 

Recently uploaded

Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx959SahilShah
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionDr.Costas Sachpazis
 
chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learningmisbanausheenparvam
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girlsssuser7cb4ff
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerAnamika Sarkar
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxbritheesh05
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.eptoze12
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ
 
HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2RajaP95
 

Recently uploaded (20)

Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
 
chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learning
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girls
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptx
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
 
HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2
 

Discrete Math Chapter 1 :The Foundations: Logic and Proofs

  • 1. Chapter 1 The Foundations: Logic and Proofs
  • 2. 1.1 Propositional Logic 1.2 Propositional Equivalences 1.3 Predicates and Quantifiers 1.4 Nested Quantifiers 1.6 Introduction to Proofs 1.7 Proof Methods and Strategy P. 1 2
  • 3. • 1-Rosen, Kenneth H. "Discrete Mathematics and Its Applications.“ seventh edition • https://www.youtube.com/watch?v=xL0kNw5TudI&ab_channel=stanfordonline • https://www.youtube.com/watch?v=itrXYg41-V0&ab_channel=TrevTutor • https://www.youtube.com/watch?v=PLXDfmuxqfk&ab_channel=AbdelmalekHala wani • https://www.youtube.com/watch?v=3iFSWhyRwh4&ab_channel=AbdelmalekHal awani • https://www.youtube.com/watch?v=gyoqX0W-NH4&ab_channel=TrevTutor • https://www.youtube.com/watch?v=By2g4aaIcu8&ab_channel=AbdelmalekHala wani • https://www.youtube.com/watch?v=rZH5RFSXsvI&ab_channel=KimberlyBrehm • https://www.youtube.com/playlist?list=PLl-gb0E4MII28GykmtuBXNUNoej-vY5Rz • https://www.youtube.com/watch?v=QWDXTJCe3yo&list=PLoK2Lr1miEm_WKBBB HUQJRXaumduqkM4S&ab_channel=FCIHOCW References
  • 4. 1.1 Propositional Logic • Logic: to give precise meaning to mathematical statements • Proposition: a declarative sentence that is either true or false, but not both • 1+1=2 • Toronto is the capital of Canada • Propositional variables: p, q, r, s • Truth value: true (T) or false (F) 4
  • 5.
  • 6.
  • 7.
  • 8. • Compound propositions: news propositions formed from existing propositions using logical operators • Definition 1: Let p be a proposition. The negation of p, denoted by p (orp), is the statement “It is not the case that p.” • “not p” 8
  • 9.
  • 10.
  • 11. Cont. • Definition 2: Let p and q be propositions. The conjunction of p and q, denoted by p  q, is the proposition “p and q.” • Definition 3: Let p and q be propositions. The disjunction of p and q, denoted by p  q, is the proposition “p or q.” 11
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20. Cont. •Definition 4: Let p and q be propositions. The exclusive or of p and q, denoted by p  q, is the proposition that is true when exactly one of p and q is true and is false otherwise. 20
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30. Converse, Contrapositive, and Inverse • p  q • Converse: q  p • Contrapositive:  q   p • Inverse:  p   q • Two compound propositions are equivalent if they always have the same truth value • The contrapositive is equivalent to the original statement • The converse is equivalent to the inverse 30
  • 31. • p is "I am in the University“, q is "It is Tuesday" Example 31 p → q "I am in Univ" → "It is Tuesday" If I am in Univ then it is Tuesday q → p "It is Tuesday" → "I am in Univ" If it is Tuesday then I am in Univ ¬q → ¬p "It is NOT Tuesday" → "I am NOT in Univ" If it is NOT Tuesday then I am NOT in Univ ¬p → ¬q "I am NOT in Univ" → "It is NOT Tuesday" If I am NOT in Univ then it is NOT Tuesday
  • 32. Biconditionals • Definition 6: Let p and q be propositions. The biconditional statement p  q is the proposition “p if and only if q.” • “bi-implications” • “p is necessary and sufficient for q” • “p iff q” 32
  • 34. Implicit Use of Biconditionals • Biconditionals are not always explicit in natural language • Imprecision in natural language • “If you finish your meal, then you can have dessert.” • “You can have dessert if and only if you finish your meal.” 34
  • 35.
  • 36.
  • 37.
  • 39. Precedence of Logical Operators • Negation operator is applied before all other logical operators • Conjunction operator takes precedence over disjunction operator • Conditional and biconditional operators have lower precedence • Parentheses are used whenever necessary 39
  • 40.
  • 41. P. 11 41 Examples 1. ¬p → q ↔ p ^ q  r = [((¬p) → q) ↔ ((p ^ q)  r)] 2. p ^ ¬q v p ↔ q → r ^ p = ....
  • 42.
  • 43.
  • 44.
  • 45. Examples 45 p q p  q p → q (p → q)  (p  q) F F F T F F T T T T T F T F F T T T T T p q ¬p p → q (p → q) ^ ¬p F F T T T F T T T T T F F F F T T F T F
  • 46. Translating English Sentences • Example: “You can access the Internet from campus only if you are a computer science major or you are not a freshman.” • let a = "You can access the Internet from campus" c="You are a computer science major" f="You are a freshman“. The sentence can be represented as: a  (c  f). 46
  • 47. Exercise • Ex.13: “You cannot ride the roller coaster if you are under 4 feet tall unless you are older than 16 years old.” • …. 47
  • 48. • Translate the following English sentences 1. "The diagnostic message is stored in the buffer or it is transmitted" 2. "The diagnostic message is not stored in the buffer" 3. "If the diagnostic message is stored in the buffer, then it is transmitted" Exercise 48
  • 49. • p is "The diagnostic message is stored in the buffer" • q is "The diagnostic message is transmitted" • p  q is "The diagnostic message is stored in the buffer or it is transmitted" • ¬p is "The diagnostic message is not stored in the buffer" • ……… is "If the diagnostic message is stored in the buffer, then it is transmitted" Solution 49
  • 50.
  • 51.
  • 53. Logical Equivalence • Logical Equivalence are Compound propositions that have the same truth values in all possible cases • Definition 2: Compound propositions p and q are logically equivalent if p  q is a tautology (denoted by p  q or p  q ) • De Morgan’s Law •  (p  q)   p   q •  (p  q)   p   q 53
  • 54.
  • 56.
  • 57.
  • 58. • p is "Ahmad has a cell phone" , • q is "Ahmad has a laptop computer." • p  q is "Ahmad has a cell phone." and " Ahmad has a laptop computer." • ¬(p  q) is "Ahmad does not have a cell phone and a laptop computer." • ¬p  ¬q is "Ahmad does not have a cell phone or Ahmad does not have a laptop computer." • ¬(p  q) ≡ ¬p  ¬q Example 58
  • 59. TABLE 4 (1.2) P. 23 pq 59
  • 60.
  • 62.
  • 66.
  • 67.
  • 68.
  • 69.
  • 70. • Show that ¬(p → q) ≡ p ∧¬q • ¬(p → q) ≡ ¬(¬p ∨ q) by previous example …. • Show that (p ∧ q) → (p ∨ q) is a tautology (p ∧ q) → (p ∨ q) ≡ ¬(p ∧ q) ∨ (p ∨ q) …. Exercise 70
  • 72.
  • 73.
  • 74.
  • 75.
  • 76.
  • 77.
  • 78.
  • 79.
  • 80.
  • 81.
  • 82.
  • 83.
  • 84.
  • 85.
  • 86.
  • 87.
  • 88.
  • 89. Quantifiers • Quantification • Universal quantification: a predicate is true for every element • Existential quantification: there is one or more element for which a predicate is true 89
  • 90.
  • 91.
  • 92.
  • 93.
  • 94.
  • 95.
  • 96.
  • 97.
  • 98. The Universal and Existential Quantifier • Domain: domain of discourse (universe of discourse ‫عام‬ ‫)خطاب‬ • Definition 1: The universal quantification of P(x) is the statement “P(x) for all values of x in the domain”, denoted by x P(x) • “for all x P(x)” or “for every x P(x)” • Counterexample: an element for which P(x) is false • When all elements in the domain can be listed, P(x1) P(x2) … P(xn) 98 • Definition 2: The existential quantification of P(x) is the proposition “There exists an element x in the domain such that P(x)”, denoted by x P(x) • “there is an x such that P(x)” or “for some x P(x)” • When all elements in the domain can be listed, P(x1) P(x2) … P(xn)
  • 100.
  • 101.
  • 102.
  • 103.
  • 104.
  • 105.
  • 106.
  • 107.
  • 108.
  • 109.
  • 110.
  • 111.
  • 112.
  • 113.
  • 114.
  • 115.
  • 116.
  • 117.
  • 118.
  • 119.
  • 120.
  • 121.
  • 122.
  • 123.
  • 124.
  • 125.
  • 126.
  • 127.
  • 128. Logical Equivalence involving Quantifiers • Definition 3: two statements S and T involving predicates and quantifiers are logically equivalent, denoted by S  T, if and only if they have the same truth value no matter which predicates are substituted and which domain is used • E.g. x (P(x)  Q(x))  x P(x)  x Q(x) 128
  • 129. Negating Quantified Expressions • x P(x)  x P(x) • Negation of the statement “Every student in your class has taken a course in Preparatory Math 2” • “There is a student in your class who has not taken a course in Preparatory Math 2” • x P(x)  x P(x) 129
  • 130. • What are the negations of the following expressions: ∃x (x=2), ∀x (x2>x), ∃x (x2 =2) • ¬∃x ( x = 2)  ∀x ¬(x=2)  ∀x (x ≠ 2 ) • ¬∀x (x2 > x)  ∃x ¬(x2> x )  ∃x (x2 ≤ x ) • ¬∃x (x2 = 2)  ∀x ¬(x2 = 2 )  ∀x (x2 ≠ 2) • ¬∀x (x = x2)  … • ¬∃x (x2 < 0)  … • ∃x ¬(x2 > 0)  … Example 130
  • 131.
  • 132.
  • 133.
  • 134. Other Quantifiers • Uniqueness quantifier: !x P(x) or 1x P(x) • There exists a unique x such that P(x) is true • Quantifiers with restricted domains • x<0 (x2>0) • Conditional: x(x<0  x2>0) • z>0 (z2=2) • Conjunction: z(z>0  z2=2) 134
  • 135.
  • 136.
  • 138.
  • 139.
  • 140.
  • 141.
  • 142.
  • 143.
  • 144.
  • 145.
  • 146.
  • 147.
  • 148.
  • 149. TABLE 1 (1.4) P. 53 149
  • 150.
  • 151. Translating mathematical statements into statements involving nested quantifiers • “The sum of two positive integers is always positive” • ∀x∀y((x > 0) ∧ (y > 0) → (x +y > 0)), domain(x)=domain(y)=ℤ • ∀x∀y(x +y > 0), domain(x)=domain(y)= ℕ • “Every real number except zero has a multiplicative inverse” (a multiplicative inverse of a real number x is a real number y such that xy=1) • ∀x((x ≠ 0) → ∃y(xy = 1)), domain(x)= ℝ 151
  • 152.
  • 153.
  • 154. Translating from nested quantifiers into English • x (C(x)  y (C(y)  F(x, y)) • C(x): “x has a computer”, F(x,y): “x and y are friends” • Domain of x, y: “all students in your school” • every student in your school has a computer or has a friend who has a computer • xyz (F(x, y) F(x, z)  (yz)  F(y, z)) • F(a, b): “a and b are friends” • Domain of x, y, z: “all students in your school” • there is a student none of whose friends are also friends with each other 154
  • 155. Translating English sentences into logical expressions 155
  • 156.
  • 157.
  • 158.
  • 159. • Negation of x y (xy=1) • ¬∀x∃y(xy = 1)  ∃x¬∃y(xy = 1)  ∃x∀y¬(xy = 1). Since ¬(xy ≠1) (xy ≠1), so ¬x y (xy=1) x y(xy ≠ 1). Negating nested quantifiers 159