Discrete Mathematics
-
Upload
kemalakra07 -
Category
Documents
-
view
180 -
download
2
description
Transcript of Discrete Mathematics
![Page 1: Discrete Mathematics](https://reader036.fdocuments.us/reader036/viewer/2022082209/55cf9b7b550346d033a63aa0/html5/thumbnails/1.jpg)
BIT 1113Discrete
Mathematics
Dr. Mohd.Najib B. Mohd.Salleh
Department of Information System
Faculty of Information Technology & Multimedia
![Page 2: Discrete Mathematics](https://reader036.fdocuments.us/reader036/viewer/2022082209/55cf9b7b550346d033a63aa0/html5/thumbnails/2.jpg)
Course Material
Textbook:
(1)Johnsonbaugh R,(2005). Discrete Mathematics. Fifth Edition. Singapore: Prentice Hall, Inc. Other Reference:
Kolman, B., Busby, R., Ross, S. (1996). Discrete Mathematical Structures. New Jersey: Prentice Hall, Inc.
D.S Malik and M.K.Sen. (2004).Discrete Mathematical Structures : Theory & Application United State: Thomson Course Technology.
James L. H. (2002). Discrete Structures, Logic, and Computability. Second Edition. John and Bartlett Pub. Co.
![Page 3: Discrete Mathematics](https://reader036.fdocuments.us/reader036/viewer/2022082209/55cf9b7b550346d033a63aa0/html5/thumbnails/3.jpg)
Course Assessment
Test 2x 40%
Assignment ?x 10%
quizzes 5x 10%
Final Exam 40%
![Page 4: Discrete Mathematics](https://reader036.fdocuments.us/reader036/viewer/2022082209/55cf9b7b550346d033a63aa0/html5/thumbnails/4.jpg)
• Is a language of science
Mathematics Mathematics Words of wisdomWords of wisdom
Mathematics
Other disciplines
Most of the fundamental ideas of science are essentially simple, and may, as a rule, be expressed in a language comprehensible to everyone – Albert Einstein
For the things of this world cannot be made known without a knowledge of mathematics- Roger Bacon
![Page 5: Discrete Mathematics](https://reader036.fdocuments.us/reader036/viewer/2022082209/55cf9b7b550346d033a63aa0/html5/thumbnails/5.jpg)
- Today’s computer systems are more complex, and more rapidly evolving. Thus, need for tools and techniques that assist in understanding the behavior of the systems.
- This will answer the questions such as cost and performance of the systems.
- 2 ways : experimental and modeling
Mathematics for ITMathematics for IT
![Page 6: Discrete Mathematics](https://reader036.fdocuments.us/reader036/viewer/2022082209/55cf9b7b550346d033a63aa0/html5/thumbnails/6.jpg)
What is discrete mathematics?
logic, sets, functions, relations, etc
Logic: artificial intelligence (AI), database, circuit design
Number theory: cryptography, coding theory
Counting: probability, analysis of algorithm
Graph theory: computer network, data structures
![Page 7: Discrete Mathematics](https://reader036.fdocuments.us/reader036/viewer/2022082209/55cf9b7b550346d033a63aa0/html5/thumbnails/7.jpg)
Introduction to Discrete Mathematics
![Page 8: Discrete Mathematics](https://reader036.fdocuments.us/reader036/viewer/2022082209/55cf9b7b550346d033a63aa0/html5/thumbnails/8.jpg)
Mathematics in Computer Science
Design efficient computer systems.
•How did Google manage to build a fast search engine?
•What is the foundation of internet security?
algorithms, data structures, database,
parallel computing, distributed systems,
cryptography, computer networks…
Logic, number theory, counting, graph theory…
![Page 9: Discrete Mathematics](https://reader036.fdocuments.us/reader036/viewer/2022082209/55cf9b7b550346d033a63aa0/html5/thumbnails/9.jpg)
Algebra in Programming, Database Algebra in Programming, Database and Data Miningand Data Mining
Algebra:
Set, Function, Relation, and Number Theory, Graph Theory, etc.
Why learn Algebra?
It’s a basis for Mathematics which is tool for reasoning.
![Page 10: Discrete Mathematics](https://reader036.fdocuments.us/reader036/viewer/2022082209/55cf9b7b550346d033a63aa0/html5/thumbnails/10.jpg)
Algebra in Programming, Database Algebra in Programming, Database and Data Miningand Data Mining
Why is Algebra important for Computer Science? Useful tool for formalizing and reasoning about computation and the objects of computation.
Algebra, especially set theory is indivisible from Logic where Computer Science has its roots. It has been and is likely to continue to be a source of fundamental ideas in Computer Science from theory to practice.
![Page 11: Discrete Mathematics](https://reader036.fdocuments.us/reader036/viewer/2022082209/55cf9b7b550346d033a63aa0/html5/thumbnails/11.jpg)
Given a set of items I={I1,I2,…,Im} and a database of
transactions D = {t1,t2,…tn} where ti={Ii1,Ii2,…,Iik } and Ii1 I, an
association rule is an implication of the form X=> Y where X,Y I are sets of items called itemsets and X Y =
The support (s) for an AR X=>Y is the percentage of
transactions in the database that contain X U Y.
The confidence or strength (α) for an AR X=>Y is the ratio of the number of transactions that contain X U Y to the number of transactions that contain X.
Data Mining : support and confidence
![Page 12: Discrete Mathematics](https://reader036.fdocuments.us/reader036/viewer/2022082209/55cf9b7b550346d033a63aa0/html5/thumbnails/12.jpg)
FUNDAMENTALS OF
MATHEMATICAL LOGIC
![Page 13: Discrete Mathematics](https://reader036.fdocuments.us/reader036/viewer/2022082209/55cf9b7b550346d033a63aa0/html5/thumbnails/13.jpg)
Logic and Proofs
Logic: propositional logic, first order logic
Proof: induction, contradiction
How do computers think?
Artificial intelligence, database, circuit, algorithms
![Page 14: Discrete Mathematics](https://reader036.fdocuments.us/reader036/viewer/2022082209/55cf9b7b550346d033a63aa0/html5/thumbnails/14.jpg)
Proposition
Statements that are not propositions include questions and commands.
A declarative sentence or any meaningful statement that is either True or False, but not both.
![Page 15: Discrete Mathematics](https://reader036.fdocuments.us/reader036/viewer/2022082209/55cf9b7b550346d033a63aa0/html5/thumbnails/15.jpg)
use lowercase letters, such as p, q, r, · · · , to represent propositions notation. p : 2 + 2 = 3
P defined as the proposition 2+2 = 3.
The truth value of a proposition :
true, denoted by T, if it is a true statement false, denoted by F, if it is a false statement.
Proposition
![Page 16: Discrete Mathematics](https://reader036.fdocuments.us/reader036/viewer/2022082209/55cf9b7b550346d033a63aa0/html5/thumbnails/16.jpg)
Example 1.1
Which of the following are propositions? Give the truth value of the propositions.
a. 5 - 11 = 7.
b. Dato’ Prof Ismail Bakar is a vice-chancellor of UTHM.
c. How do you do?
d. Look at the weather!
![Page 17: Discrete Mathematics](https://reader036.fdocuments.us/reader036/viewer/2022082209/55cf9b7b550346d033a63aa0/html5/thumbnails/17.jpg)
Example 1.2
Which of the following are propositions? Give the truth value of the propositions.
a.You and me.
b.2 is even number
c. Kuala Lumpur is the capital city of Malaysia
d. How are you?
![Page 18: Discrete Mathematics](https://reader036.fdocuments.us/reader036/viewer/2022082209/55cf9b7b550346d033a63aa0/html5/thumbnails/18.jpg)
propositional variables
New propositions can be constructed from existing propositions by using symbolic connectives or logical operators.
AND:: OR::
![Page 19: Discrete Mathematics](https://reader036.fdocuments.us/reader036/viewer/2022082209/55cf9b7b550346d033a63aa0/html5/thumbnails/19.jpg)
Let p and q be propositions.
The conjunction of p and q,
denoted p Λ q,
is the proposition: p and q.
This proposition is defined to be true only when both p and q are true and it is false
otherwise.
Conjunction
![Page 20: Discrete Mathematics](https://reader036.fdocuments.us/reader036/viewer/2022082209/55cf9b7b550346d033a63aa0/html5/thumbnails/20.jpg)
Let p and q be propositions.
The disjunction of p and q,
denoted p V q,
is the proposition: p or q.
The ’or’ is used in an inclusive way. This proposition is false only when both p and q are
false, otherwise it is true.
Disjunction
![Page 21: Discrete Mathematics](https://reader036.fdocuments.us/reader036/viewer/2022082209/55cf9b7b550346d033a63aa0/html5/thumbnails/21.jpg)
Example 1.3
Assume that
p : 5 < 9
q : 9 < 7
Construct the propositions p Λ q and p V q.
Solution.The conjunction of the propositions p and q is the
proposition p Λ q : 5 < 9 and 9 < 7
The disjunction of the propositions p and q is the proposition
p V q : 5 < 9 or 9 < 7
![Page 22: Discrete Mathematics](https://reader036.fdocuments.us/reader036/viewer/2022082209/55cf9b7b550346d033a63aa0/html5/thumbnails/22.jpg)
Example 1.4
Consider the following propositions
p : It is a monkey
q : It is a banana.
Construct the propositions p Λ q and p V q.
The disjunction of the propositions p and q is the proposition p V q : It is a monkey or it is a banana
Solution.The conjunction of the propositions p and q is the proposition p Λ q : It is a monkey and it is a banana
![Page 23: Discrete Mathematics](https://reader036.fdocuments.us/reader036/viewer/2022082209/55cf9b7b550346d033a63aa0/html5/thumbnails/23.jpg)
Truth Table
A truth table displays the relationships between the truth values of propositions
F
F
F
T
P Q
FF
TF
FT
TT
QP
F
T
T
T
P Q
FF
TF
FT
TT
QP
![Page 24: Discrete Mathematics](https://reader036.fdocuments.us/reader036/viewer/2022082209/55cf9b7b550346d033a63aa0/html5/thumbnails/24.jpg)
Exclusive-Or
Let p and q be two propositions.
The exclusive or of p and q, denoted p q, is the proposition that is true when exactly one of p and q is true and is false otherwise.
The truth table of the exclusive ’or’ is displayed below
p q p qT T F
T F T
F T T
F F F
![Page 25: Discrete Mathematics](https://reader036.fdocuments.us/reader036/viewer/2022082209/55cf9b7b550346d033a63aa0/html5/thumbnails/25.jpg)
Example 1.5
a. Construct a truth table for (p q) r
Solution.
p q r p q (p q) r
T T T F T
T T F F F
T F T T F
T F F T T
F T T T F
F T F T T
F F T F T
F F F F F
![Page 26: Discrete Mathematics](https://reader036.fdocuments.us/reader036/viewer/2022082209/55cf9b7b550346d033a63aa0/html5/thumbnails/26.jpg)
Example 1.5
b. Construct a truth table for (p p)
Solution. p p
T F
F F
![Page 27: Discrete Mathematics](https://reader036.fdocuments.us/reader036/viewer/2022082209/55cf9b7b550346d033a63aa0/html5/thumbnails/27.jpg)
The final operation on a proposition p that we discuss is the negation of p.
The negation of p, denoted ~ p, is the proposition not p.
The truth table of ~ p is displayed below
p ~ p
T F
F T
Negation (Logical Operator)
![Page 28: Discrete Mathematics](https://reader036.fdocuments.us/reader036/viewer/2022082209/55cf9b7b550346d033a63aa0/html5/thumbnails/28.jpg)
Example 1.6
Find the negation of the proposition
p : -5 < x = 0
Solution
The negation of p is the proposition
~ p : x > 0 or x = -5
![Page 29: Discrete Mathematics](https://reader036.fdocuments.us/reader036/viewer/2022082209/55cf9b7b550346d033a63aa0/html5/thumbnails/29.jpg)
Example 1.7
Consider the following propositions:
p: UTHM is located in Parit Raja.q: 2 + 5 = 7.r: There is no pollution in Parit Raja.
Question :
Construct the truth table of [~ (p Λ q)] V r.
![Page 30: Discrete Mathematics](https://reader036.fdocuments.us/reader036/viewer/2022082209/55cf9b7b550346d033a63aa0/html5/thumbnails/30.jpg)
solution
p q r p Λ q ~ (p Λ q) [~ (p Λ q)] V r
T T T T F T
T T F T F F
T F T F T T
T F F F T T
F T T F T T
F T F F T T
F F T F T T
F F F F T T
p q r p Λ q ~ (p Λ q) [~ (p Λ q)] V r
![Page 31: Discrete Mathematics](https://reader036.fdocuments.us/reader036/viewer/2022082209/55cf9b7b550346d033a63aa0/html5/thumbnails/31.jpg)
Tautology
A compound proposition is called a tautology if it is always true, regardless of the truth values of the basic propositions which comprise it.
![Page 32: Discrete Mathematics](https://reader036.fdocuments.us/reader036/viewer/2022082209/55cf9b7b550346d033a63aa0/html5/thumbnails/32.jpg)
Example 1.8
a. Construct the truth table of the proposition
(p Λq) V (~ p Λ ~ q).
Determine if this proposition is a tautology.
p q ~ p ~ q ~ (p V ~ q) (p Λ q) (p Λ q) V (~ p Λ ~ q)
T T F F F T T
T F F T T F T
F T T F T F T
F F T T T F T
![Page 33: Discrete Mathematics](https://reader036.fdocuments.us/reader036/viewer/2022082209/55cf9b7b550346d033a63aa0/html5/thumbnails/33.jpg)
Example 1.8
Determine if this proposition is a tautology.
b. Show that p V ~ p is a tautology.
![Page 34: Discrete Mathematics](https://reader036.fdocuments.us/reader036/viewer/2022082209/55cf9b7b550346d033a63aa0/html5/thumbnails/34.jpg)
Equivalent
Two propositions are equivalent if they have exactly the same truth values under all circumstances.
We write p = q.
Example 1.9
a. Show that ~ (p V q) =~ p Λ ~ qb. Show that ~ (p Λ q) =~ p V ~ qc. Show that ~ (~ p) = p. a. and b. are known as DeMorgan’s laws.
(Do it your self ! )
![Page 35: Discrete Mathematics](https://reader036.fdocuments.us/reader036/viewer/2022082209/55cf9b7b550346d033a63aa0/html5/thumbnails/35.jpg)
Conditional and
Biconditional Propositions
![Page 36: Discrete Mathematics](https://reader036.fdocuments.us/reader036/viewer/2022082209/55cf9b7b550346d033a63aa0/html5/thumbnails/36.jpg)
Let p and q be propositions.
Implication
The connective → is called the conditional connective.
p is called the hypothesis and q is called the conclusion.
The implication p→q is the proposition that is false only when p is true and q is
false; otherwise it is true.
![Page 37: Discrete Mathematics](https://reader036.fdocuments.us/reader036/viewer/2022082209/55cf9b7b550346d033a63aa0/html5/thumbnails/37.jpg)
Example 2.1
Construct the truth table of the implication p→ q.
p q p → q
T T T
T F F
F T T
F F T
Solution: The truth table is
![Page 38: Discrete Mathematics](https://reader036.fdocuments.us/reader036/viewer/2022082209/55cf9b7b550346d033a63aa0/html5/thumbnails/38.jpg)
Solution:
~ p V q.
p q ~ p p → q ~ p V q
T T F T T
T F F F F
F T T T T
F F T T T
Example 2.2
Show that p→ q
![Page 39: Discrete Mathematics](https://reader036.fdocuments.us/reader036/viewer/2022082209/55cf9b7b550346d033a63aa0/html5/thumbnails/39.jpg)
In terms of words the proposition p → q also reads:
(d) q is a necessary condition for p.
(b) p implies q.
(c) p is a sufficient condition for q.
(a)if p then q.
(e) p only if q
![Page 40: Discrete Mathematics](https://reader036.fdocuments.us/reader036/viewer/2022082209/55cf9b7b550346d033a63aa0/html5/thumbnails/40.jpg)
Example 2.3
Use the if-then form to rewrite the statement ”I become sleepy if I eat ‘nasi lemak’ in the morning.”
,
Solution:
If I eat ‘nasi lemak’ in the morning then I become sleepy.
In propositional functions that involve the connectives ~, , and the order of operations is that ~ is performed first and is performed last.
![Page 41: Discrete Mathematics](https://reader036.fdocuments.us/reader036/viewer/2022082209/55cf9b7b550346d033a63aa0/html5/thumbnails/41.jpg)
Thank you
As a conclusion:
Understand the concept of fundamentals of math logic,
What is proposition and other terminology in logic,
Construct the compound propositions, and
display the truth table.