SlideShare a Scribd company logo
1 of 47
Discrete
Mathematics
By
Sadat Sumon
Introduction to Discrete Mathematics
Aug 16, 17, Sep 11 2011
A B
C
a = qb+r gcd(a,b) = gcd(b,r)
What is Discrete Math?
• Discrete mathematics is mathematics that
deals with discrete objects.
• Discrete objects are those which are
separated from (not connected to/distinct
from) each other.
Discrete objects
– Integers, rational numbers (ones that can be
expressed as the quotient of two integers),
automobiles, houses, people etc. are all
discrete objects.
– On the other hand real numbers which include
irrational as well as rational numbers are not
discrete.
• between any two different real numbers there is
another real number different from either of them.
• So they are packed without any gaps and can not
be separated from their immediate neighbors. In
that sense they are not discrete.
Discrete Objects
• In this course we will be concerned with objects
such as integers, propositions, sets, relations
and functions, which are all discrete.
• We are going to learn concepts associated with
them, their properties, and relationships among
them among others.
Why Discrete Math?
• Through DM, we learn formal/theoretical
approaches in computer science.
• Why formal approach is important?
– we can handle infinity or large quantity and
indefiniteness with them
– results from formal approaches are reusable.
Checker
x=0
Start with any configuration with all circles on or below the x-axis.
Checker
x=0
Move: jump through your adjacent neighbour,
but then your neighbour will disappear.
Checker
x=0
Move: jump through your adjacent neighbour,
but then your neighbour will disappear.
Checker
x=0
Goal: Find an initial configuration with least number of circles to jump up to level k.
K=1
x=0
2 circles to reach level 1.
K=2
x=0
K=2
x=0
4 circles to reach level 2.
Now we have reduced to the k=1 configuration, but one level higher.
K=3
x=0
This is the configuration for k=2, so jump two level higher.
K=3
x=0
8 circles to reach level 3.
K=4
x=0
K=4
x=0
K=4
x=0
K=4
x=0
K=4
x=0
Now we have reduced to the k=3 configuration, but one level higher
20 circles (not 16) to reach level 4!
K=5?
a. 39 or below
b. 40-50 circles
c. 51-70 circles
d. 71- 100 circles
e. 101 – 1000 circles
f. 1001 or above
It turns out that it is impossible to move to level 5,
and there is a very interesting mathematical proof of it.
Graph Theory
How to color a map?
How to send data efficiently?
How to schedule exams?
Objectives of This Course
•To learn basic mathematical concepts, e.g. sets, functions, graphs
•To be familiar with formal mathematical reasoning, e.g. logic, proofs
•To improve problem solving skills
•To see the connections between discrete mathematics and computer science
 Introduction to logic
 Motivations
 Basic Definitions
 Logic formula
2 2 2
a b c+ =
Familiar?
Obvious?
cb
a
Pythagorean theorem
cb
a
(i) a c×c square, and then
(ii) an a×a & a b×b square
Good Proof
b-a
We will show that these five pieces can be rearranged into:
b-a
And then we can conclude that
c
cc
a b
c
b-a
Good Proof
The five pieces can be rearranged into:
(i) a c×c square
cb
a b-a
b-a
Good Proof
How to rearrange them into an axa square and a bxb square?
b
a
a ab-a
74 proofs in http://www.cut-the-knot.org/pythagoras/index.shtml
b
Good Proof
b
Bad Proof
Bad Proof
Bad Proof
Mathematical Proof
To prove mathematical theorems, we need a more rigorous system.
The standard procedure for proving mathematical theorems is invented by
Euclid in 300BC. First he started with five axioms (the truth of these
statements are taken for granted). Then he uses logic to deduce the truth
of other statements.
1.It is possible to draw a straight line from any point to any other point.
2.It is possible to produce a finite straight line continuously in a straight line.
3.It is possible to describe a circle with any center and any radius.
4.It is true that all right angles are equal to one another.
5.("Parallel postulate") It is true that, if a straight line falling on two straight lines make the
interior angles on the same side less than two right angles,
the two straight lines, if produced indefinitely, intersect on that side on which are the
angles less than the two right angles.
Statement (Proposition)
A Statement is a sentence that is either True or False
Examples:
Non-examples: x+y>0
x2
+y2
=z2
True
False
2 + 2 = 4
3 x 3 = 8
787009911 is a prime
They are true for some values of x and y
but are false for some other values of x and y.
Logic Operators
F
F
F
T
P Q
FF
TF
FT
TT
QP
AND::=∧
F
T
T
T
P Q
FF
TF
FT
TT
QP
OR::=∨
NOT::=¬ ~p is true if p is false
Compound Statement
p = “it is hot” q = “it is sunny”
It is hot and sunny
It is not hot but sunny
It is neither hot nor sunny
Exclusive-Or
coffee “or” tea  exclusive-or
How to construct a compound statement for exclusive-or?
p q p  q
T T F
T F T
F T T
F F F
Idea 1: Look at the true rowsIdea 1: Look at the true rowsIdea 1: Look at the true rows
Want the formula to be true
exactly when the input belongs
to a “true” row.
The input is the second row exactly if this sub-formula is satisfied
And the formula is true exactly when the input is the second row or the third row.
Exclusive-Or
coffee “or” tea  exclusive-or
How to construct a compound statement for exclusive-or?
p q p  q
T T F
T F T
F T T
F F F
Idea 2: Look at the false rows
Want the formula to be true
exactly when the input does
not belong to a “false” row.
The input is the first row exactly if this sub-formula is satisfied
And the formula is true exactly when the input is not in the 1st
row and the 4th
row.
Logical Equivalence
p q
T T F T F F
T F T T T T
F T T T T T
F F F F T F
Logical equivalence: Two statements have the same truth table
Idea 3: Guess and check
As you see, there are many different ways to write the same logical formula.
One can always use a truth table to check whether two statements are equivalent.
Writing Logical Formula for a Truth Table
Digital logic:
Given a digital circuit, we can construct the truth table.
Now, suppose we are given only the truth table (i.e. the specification),
how can we construct a circuit (i.e. formula) that has the same function?
Writing Logical Formula for a Truth Table
p q r output
T T T F
T T F T
T F T T
T F F F
F T T T
F T F T
F F T T
F F F F
Use idea 1 or idea 2. Idea 1: Look at the true rows
and take the “or”.
The formula is true exactly when the input is one of the true rows.
Writing Logical Formula for a Truth Table
Idea 2: Look at the false rows,
negate and take the “and”.
The formula is true exactly when the input is not one of the false row.
p q r output
T T T F
T T F T
T F T T
T F F F
F T T T
F T F T
F F T T
F F F F
DeMorgan’s Laws
Logical equivalence: Two statements have the same truth table
Statement: Tom is in the football team and the basketball team.
Negation: Tom is not in the football team or not in the basketball team.
Statement: The number 783477841 is divisible by 7 or 11.
Negation: The number 783477841 is not divisible by 7 and not divisible by 11.
De Morgan’s Law
De Morgan’s Law
DeMorgan’s Laws
Logical equivalence: Two statements have the same truth table
T T F F
T F T T
F T T T
F F T T
De Morgan’s Law
De Morgan’s Law
Simplifying Statement
Practice a lot…
DeMorgan
Distributive law
Tautology, Contradiction
A tautology is a statement that is always true.
A contradiction is a statement that is always false. (negation of a tautology)
In general it is “difficult” to tell whether a statement is a contradiction.
It is one of the most important problems in CS – the satisfiability problem.
How this is a negation of the first tautology?
Quick Summary
Key points to know.
1. Write a logical formula from a truth table.
2. Check logical equivalence of two logical formulas.
3. DeMorgan’s rule and other simple logical rules (e.g. distributive).
4. Use simple logical rules to simplify a logical formula.

More Related Content

What's hot

Modul Ajar Matematika Kelas 11 Fase F - [modulguruku.com]
Modul Ajar Matematika Kelas 11 Fase F - [modulguruku.com]Modul Ajar Matematika Kelas 11 Fase F - [modulguruku.com]
Modul Ajar Matematika Kelas 11 Fase F - [modulguruku.com]Modul Guruku
 
Geometri datar dra. kusni- m.si
Geometri datar   dra. kusni- m.siGeometri datar   dra. kusni- m.si
Geometri datar dra. kusni- m.siKiki Ni
 
Defenisi dan sifat kekongruenan Teobil
Defenisi dan sifat kekongruenan TeobilDefenisi dan sifat kekongruenan Teobil
Defenisi dan sifat kekongruenan TeobilNailul Hasibuan
 
Integration application (Aplikasi Integral)
Integration application (Aplikasi Integral)Integration application (Aplikasi Integral)
Integration application (Aplikasi Integral)Muhammad Luthfan
 
Aliran-Aliran Filsafat Matematika
Aliran-Aliran Filsafat MatematikaAliran-Aliran Filsafat Matematika
Aliran-Aliran Filsafat MatematikaNailul Hasibuan
 
Aksioma insidensi dalam geometri euclid final
Aksioma insidensi dalam geometri euclid finalAksioma insidensi dalam geometri euclid final
Aksioma insidensi dalam geometri euclid finalagusloveridha
 
09 a analis_vektor
09 a analis_vektor09 a analis_vektor
09 a analis_vektorTri Wahyuni
 
Sistem Homogen dan Invers-Matrik - Pertemuan 5.
Sistem Homogen dan Invers-Matrik - Pertemuan 5. Sistem Homogen dan Invers-Matrik - Pertemuan 5.
Sistem Homogen dan Invers-Matrik - Pertemuan 5. ahmad haidaroh
 
Makalah geseran (translasi)
Makalah geseran (translasi)Makalah geseran (translasi)
Makalah geseran (translasi)Nia Matus
 
Fungsi Kompleks (pada bilangan kompleks)
Fungsi Kompleks (pada bilangan kompleks)Fungsi Kompleks (pada bilangan kompleks)
Fungsi Kompleks (pada bilangan kompleks)Ridha Zahratun
 
Analisis Real (Barisan Bilangan Real) Latihan bagian 2.3
Analisis Real (Barisan Bilangan Real) Latihan bagian 2.3Analisis Real (Barisan Bilangan Real) Latihan bagian 2.3
Analisis Real (Barisan Bilangan Real) Latihan bagian 2.3Arvina Frida Karela
 
Sejarah penemuan integral dan diferensial
Sejarah penemuan integral dan diferensialSejarah penemuan integral dan diferensial
Sejarah penemuan integral dan diferensialdevintap
 
Matematika-Persamaan dan pertidaksamaan
Matematika-Persamaan dan pertidaksamaanMatematika-Persamaan dan pertidaksamaan
Matematika-Persamaan dan pertidaksamaanKardilah Azijehmail
 
koordinat tabung dan bola
koordinat tabung dan bolakoordinat tabung dan bola
koordinat tabung dan bolalinda_rosalina
 
TEORI RELATIVITAS KHUSUS
TEORI RELATIVITAS KHUSUSTEORI RELATIVITAS KHUSUS
TEORI RELATIVITAS KHUSUSshofia ranti
 

What's hot (20)

Modul Ajar Matematika Kelas 11 Fase F - [modulguruku.com]
Modul Ajar Matematika Kelas 11 Fase F - [modulguruku.com]Modul Ajar Matematika Kelas 11 Fase F - [modulguruku.com]
Modul Ajar Matematika Kelas 11 Fase F - [modulguruku.com]
 
Geometri datar dra. kusni- m.si
Geometri datar   dra. kusni- m.siGeometri datar   dra. kusni- m.si
Geometri datar dra. kusni- m.si
 
Defenisi dan sifat kekongruenan Teobil
Defenisi dan sifat kekongruenan TeobilDefenisi dan sifat kekongruenan Teobil
Defenisi dan sifat kekongruenan Teobil
 
Integration application (Aplikasi Integral)
Integration application (Aplikasi Integral)Integration application (Aplikasi Integral)
Integration application (Aplikasi Integral)
 
Aliran-Aliran Filsafat Matematika
Aliran-Aliran Filsafat MatematikaAliran-Aliran Filsafat Matematika
Aliran-Aliran Filsafat Matematika
 
Aksioma insidensi dalam geometri euclid final
Aksioma insidensi dalam geometri euclid finalAksioma insidensi dalam geometri euclid final
Aksioma insidensi dalam geometri euclid final
 
09 a analis_vektor
09 a analis_vektor09 a analis_vektor
09 a analis_vektor
 
Bab Relativitas
Bab RelativitasBab Relativitas
Bab Relativitas
 
Filsafat matematika
Filsafat matematikaFilsafat matematika
Filsafat matematika
 
Sistem Homogen dan Invers-Matrik - Pertemuan 5.
Sistem Homogen dan Invers-Matrik - Pertemuan 5. Sistem Homogen dan Invers-Matrik - Pertemuan 5.
Sistem Homogen dan Invers-Matrik - Pertemuan 5.
 
Makalah geseran (translasi)
Makalah geseran (translasi)Makalah geseran (translasi)
Makalah geseran (translasi)
 
Fungsi Kompleks (pada bilangan kompleks)
Fungsi Kompleks (pada bilangan kompleks)Fungsi Kompleks (pada bilangan kompleks)
Fungsi Kompleks (pada bilangan kompleks)
 
Analisis Real (Barisan Bilangan Real) Latihan bagian 2.3
Analisis Real (Barisan Bilangan Real) Latihan bagian 2.3Analisis Real (Barisan Bilangan Real) Latihan bagian 2.3
Analisis Real (Barisan Bilangan Real) Latihan bagian 2.3
 
Sejarah penemuan integral dan diferensial
Sejarah penemuan integral dan diferensialSejarah penemuan integral dan diferensial
Sejarah penemuan integral dan diferensial
 
Pola bilangan
Pola bilanganPola bilangan
Pola bilangan
 
Matematika-Persamaan dan pertidaksamaan
Matematika-Persamaan dan pertidaksamaanMatematika-Persamaan dan pertidaksamaan
Matematika-Persamaan dan pertidaksamaan
 
Ggl induksi dan indukstansi
Ggl induksi dan indukstansiGgl induksi dan indukstansi
Ggl induksi dan indukstansi
 
koordinat tabung dan bola
koordinat tabung dan bolakoordinat tabung dan bola
koordinat tabung dan bola
 
Teori bilangan
Teori bilanganTeori bilangan
Teori bilangan
 
TEORI RELATIVITAS KHUSUS
TEORI RELATIVITAS KHUSUSTEORI RELATIVITAS KHUSUS
TEORI RELATIVITAS KHUSUS
 

Similar to Discrete mathematics by sadat sumon

Mathematical Logic Part 2
Mathematical Logic Part 2Mathematical Logic Part 2
Mathematical Logic Part 2blaircomp2003
 
Discrete Math Lecture 01: Propositional Logic
Discrete Math Lecture 01: Propositional LogicDiscrete Math Lecture 01: Propositional Logic
Discrete Math Lecture 01: Propositional LogicIT Engineering Department
 
MFCS PPT.pdf
MFCS PPT.pdfMFCS PPT.pdf
MFCS PPT.pdfjayarao21
 
Maths notes for 4038 and 4016 paper
Maths notes for 4038 and 4016 paperMaths notes for 4038 and 4016 paper
Maths notes for 4038 and 4016 paperFabian Hkb
 
Digital txtbook final
Digital txtbook finalDigital txtbook final
Digital txtbook finalneetaa2014
 
HEC 222 LECTURE 1.pptx
HEC 222 LECTURE 1.pptxHEC 222 LECTURE 1.pptx
HEC 222 LECTURE 1.pptxRaymond685379
 
Business mathematics presentation
Business mathematics presentationBusiness mathematics presentation
Business mathematics presentationSourov Shaha Suvo
 
discrete structures and their introduction
discrete structures and their introductiondiscrete structures and their introduction
discrete structures and their introductionZenLooper
 
Alg II 2-2 Direct Variation
Alg II 2-2 Direct VariationAlg II 2-2 Direct Variation
Alg II 2-2 Direct Variationjtentinger
 
Module code 124ms Tajvinder Virdee Sets and Log.docx
Module code 124ms  Tajvinder Virdee  Sets and Log.docxModule code 124ms  Tajvinder Virdee  Sets and Log.docx
Module code 124ms Tajvinder Virdee Sets and Log.docxmoirarandell
 

Similar to Discrete mathematics by sadat sumon (20)

Mathematical Logic Part 2
Mathematical Logic Part 2Mathematical Logic Part 2
Mathematical Logic Part 2
 
Discrete Math Lecture 01: Propositional Logic
Discrete Math Lecture 01: Propositional LogicDiscrete Math Lecture 01: Propositional Logic
Discrete Math Lecture 01: Propositional Logic
 
MFCS PPT.pdf
MFCS PPT.pdfMFCS PPT.pdf
MFCS PPT.pdf
 
1 1 number theory
1 1 number theory1 1 number theory
1 1 number theory
 
Maths notes for 4038 and 4016 paper
Maths notes for 4038 and 4016 paperMaths notes for 4038 and 4016 paper
Maths notes for 4038 and 4016 paper
 
Analysis.pptx
Analysis.pptxAnalysis.pptx
Analysis.pptx
 
integral calculus.pdf
integral calculus.pdfintegral calculus.pdf
integral calculus.pdf
 
Fractions
FractionsFractions
Fractions
 
Digital txtbook final
Digital txtbook finalDigital txtbook final
Digital txtbook final
 
HEC 222 LECTURE 1.pptx
HEC 222 LECTURE 1.pptxHEC 222 LECTURE 1.pptx
HEC 222 LECTURE 1.pptx
 
1019Lec1.ppt
1019Lec1.ppt1019Lec1.ppt
1019Lec1.ppt
 
Catalan Numbers
Catalan NumbersCatalan Numbers
Catalan Numbers
 
Free221
Free221Free221
Free221
 
Maths project
Maths projectMaths project
Maths project
 
MB1105 QR
MB1105 QRMB1105 QR
MB1105 QR
 
Business mathematics presentation
Business mathematics presentationBusiness mathematics presentation
Business mathematics presentation
 
discrete structures and their introduction
discrete structures and their introductiondiscrete structures and their introduction
discrete structures and their introduction
 
Alg II 2-2 Direct Variation
Alg II 2-2 Direct VariationAlg II 2-2 Direct Variation
Alg II 2-2 Direct Variation
 
Proof in Mathematics
Proof in MathematicsProof in Mathematics
Proof in Mathematics
 
Module code 124ms Tajvinder Virdee Sets and Log.docx
Module code 124ms  Tajvinder Virdee  Sets and Log.docxModule code 124ms  Tajvinder Virdee  Sets and Log.docx
Module code 124ms Tajvinder Virdee Sets and Log.docx
 

Recently uploaded

Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Matt Ray
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)jennyeacort
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Hr365.us smith
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesŁukasz Chruściel
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...OnePlan Solutions
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....kzayra69
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作qr0udbr0
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 

Recently uploaded (20)

Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva
 

Discrete mathematics by sadat sumon

  • 2. Introduction to Discrete Mathematics Aug 16, 17, Sep 11 2011 A B C a = qb+r gcd(a,b) = gcd(b,r)
  • 3. What is Discrete Math? • Discrete mathematics is mathematics that deals with discrete objects. • Discrete objects are those which are separated from (not connected to/distinct from) each other.
  • 4. Discrete objects – Integers, rational numbers (ones that can be expressed as the quotient of two integers), automobiles, houses, people etc. are all discrete objects. – On the other hand real numbers which include irrational as well as rational numbers are not discrete. • between any two different real numbers there is another real number different from either of them. • So they are packed without any gaps and can not be separated from their immediate neighbors. In that sense they are not discrete.
  • 5. Discrete Objects • In this course we will be concerned with objects such as integers, propositions, sets, relations and functions, which are all discrete. • We are going to learn concepts associated with them, their properties, and relationships among them among others.
  • 6. Why Discrete Math? • Through DM, we learn formal/theoretical approaches in computer science. • Why formal approach is important? – we can handle infinity or large quantity and indefiniteness with them – results from formal approaches are reusable.
  • 7. Checker x=0 Start with any configuration with all circles on or below the x-axis.
  • 8. Checker x=0 Move: jump through your adjacent neighbour, but then your neighbour will disappear.
  • 9. Checker x=0 Move: jump through your adjacent neighbour, but then your neighbour will disappear.
  • 10. Checker x=0 Goal: Find an initial configuration with least number of circles to jump up to level k.
  • 11. K=1 x=0 2 circles to reach level 1.
  • 13. K=2 x=0 4 circles to reach level 2. Now we have reduced to the k=1 configuration, but one level higher.
  • 14. K=3 x=0 This is the configuration for k=2, so jump two level higher.
  • 15. K=3 x=0 8 circles to reach level 3.
  • 20. K=4 x=0 Now we have reduced to the k=3 configuration, but one level higher 20 circles (not 16) to reach level 4!
  • 21. K=5? a. 39 or below b. 40-50 circles c. 51-70 circles d. 71- 100 circles e. 101 – 1000 circles f. 1001 or above It turns out that it is impossible to move to level 5, and there is a very interesting mathematical proof of it.
  • 22. Graph Theory How to color a map? How to send data efficiently? How to schedule exams?
  • 23. Objectives of This Course •To learn basic mathematical concepts, e.g. sets, functions, graphs •To be familiar with formal mathematical reasoning, e.g. logic, proofs •To improve problem solving skills •To see the connections between discrete mathematics and computer science
  • 24.  Introduction to logic  Motivations  Basic Definitions  Logic formula
  • 25. 2 2 2 a b c+ = Familiar? Obvious? cb a Pythagorean theorem
  • 26. cb a (i) a c×c square, and then (ii) an a×a & a b×b square Good Proof b-a We will show that these five pieces can be rearranged into: b-a And then we can conclude that
  • 27. c cc a b c b-a Good Proof The five pieces can be rearranged into: (i) a c×c square
  • 28. cb a b-a b-a Good Proof How to rearrange them into an axa square and a bxb square?
  • 29. b a a ab-a 74 proofs in http://www.cut-the-knot.org/pythagoras/index.shtml b Good Proof b
  • 33. Mathematical Proof To prove mathematical theorems, we need a more rigorous system. The standard procedure for proving mathematical theorems is invented by Euclid in 300BC. First he started with five axioms (the truth of these statements are taken for granted). Then he uses logic to deduce the truth of other statements. 1.It is possible to draw a straight line from any point to any other point. 2.It is possible to produce a finite straight line continuously in a straight line. 3.It is possible to describe a circle with any center and any radius. 4.It is true that all right angles are equal to one another. 5.("Parallel postulate") It is true that, if a straight line falling on two straight lines make the interior angles on the same side less than two right angles, the two straight lines, if produced indefinitely, intersect on that side on which are the angles less than the two right angles.
  • 34. Statement (Proposition) A Statement is a sentence that is either True or False Examples: Non-examples: x+y>0 x2 +y2 =z2 True False 2 + 2 = 4 3 x 3 = 8 787009911 is a prime They are true for some values of x and y but are false for some other values of x and y.
  • 35. Logic Operators F F F T P Q FF TF FT TT QP AND::=∧ F T T T P Q FF TF FT TT QP OR::=∨ NOT::=¬ ~p is true if p is false
  • 36. Compound Statement p = “it is hot” q = “it is sunny” It is hot and sunny It is not hot but sunny It is neither hot nor sunny
  • 37. Exclusive-Or coffee “or” tea  exclusive-or How to construct a compound statement for exclusive-or? p q p  q T T F T F T F T T F F F Idea 1: Look at the true rowsIdea 1: Look at the true rowsIdea 1: Look at the true rows Want the formula to be true exactly when the input belongs to a “true” row. The input is the second row exactly if this sub-formula is satisfied And the formula is true exactly when the input is the second row or the third row.
  • 38. Exclusive-Or coffee “or” tea  exclusive-or How to construct a compound statement for exclusive-or? p q p  q T T F T F T F T T F F F Idea 2: Look at the false rows Want the formula to be true exactly when the input does not belong to a “false” row. The input is the first row exactly if this sub-formula is satisfied And the formula is true exactly when the input is not in the 1st row and the 4th row.
  • 39. Logical Equivalence p q T T F T F F T F T T T T F T T T T T F F F F T F Logical equivalence: Two statements have the same truth table Idea 3: Guess and check As you see, there are many different ways to write the same logical formula. One can always use a truth table to check whether two statements are equivalent.
  • 40. Writing Logical Formula for a Truth Table Digital logic: Given a digital circuit, we can construct the truth table. Now, suppose we are given only the truth table (i.e. the specification), how can we construct a circuit (i.e. formula) that has the same function?
  • 41. Writing Logical Formula for a Truth Table p q r output T T T F T T F T T F T T T F F F F T T T F T F T F F T T F F F F Use idea 1 or idea 2. Idea 1: Look at the true rows and take the “or”. The formula is true exactly when the input is one of the true rows.
  • 42. Writing Logical Formula for a Truth Table Idea 2: Look at the false rows, negate and take the “and”. The formula is true exactly when the input is not one of the false row. p q r output T T T F T T F T T F T T T F F F F T T T F T F T F F T T F F F F
  • 43. DeMorgan’s Laws Logical equivalence: Two statements have the same truth table Statement: Tom is in the football team and the basketball team. Negation: Tom is not in the football team or not in the basketball team. Statement: The number 783477841 is divisible by 7 or 11. Negation: The number 783477841 is not divisible by 7 and not divisible by 11. De Morgan’s Law De Morgan’s Law
  • 44. DeMorgan’s Laws Logical equivalence: Two statements have the same truth table T T F F T F T T F T T T F F T T De Morgan’s Law De Morgan’s Law
  • 45. Simplifying Statement Practice a lot… DeMorgan Distributive law
  • 46. Tautology, Contradiction A tautology is a statement that is always true. A contradiction is a statement that is always false. (negation of a tautology) In general it is “difficult” to tell whether a statement is a contradiction. It is one of the most important problems in CS – the satisfiability problem. How this is a negation of the first tautology?
  • 47. Quick Summary Key points to know. 1. Write a logical formula from a truth table. 2. Check logical equivalence of two logical formulas. 3. DeMorgan’s rule and other simple logical rules (e.g. distributive). 4. Use simple logical rules to simplify a logical formula.