SlideShare a Scribd company logo
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

Ppt pembukktian mat veni
Ppt pembukktian  mat veniPpt pembukktian  mat veni
Ppt pembukktian mat veniNoveni Hartadi
 
Daftar referensi
Daftar referensiDaftar referensi
Daftar referensiFreelancer
 
Deret taylor and mac laurin
Deret taylor and mac laurinDeret taylor and mac laurin
Deret taylor and mac laurinMoch Hasanudin
 
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
 
Bidang dan garis dalam d3
Bidang dan garis dalam d3Bidang dan garis dalam d3
Bidang dan garis dalam d3Yulian Sari
 
Rpp bidang kartesius 1 pertemuan
Rpp bidang kartesius 1 pertemuanRpp bidang kartesius 1 pertemuan
Rpp bidang kartesius 1 pertemuanndaay
 
Bab ii pembahasan a. persamaan schrodinger pada gerak partikel b
Bab ii pembahasan a. persamaan schrodinger pada gerak partikel bBab ii pembahasan a. persamaan schrodinger pada gerak partikel b
Bab ii pembahasan a. persamaan schrodinger pada gerak partikel bMuhammad Ali Subkhan Candra
 
Homomorfisma grup
Homomorfisma grupHomomorfisma grup
Homomorfisma grupYadi Pura
 
Modul 4 kongruensi linier
Modul 4   kongruensi linierModul 4   kongruensi linier
Modul 4 kongruensi linierAcika Karunila
 
Makalah Persamaan Deferensial NON EKSAK
Makalah Persamaan Deferensial NON EKSAKMakalah Persamaan Deferensial NON EKSAK
Makalah Persamaan Deferensial NON EKSAKRaden Ilyas
 
Transformasi linier " Matematika Geodesi "
Transformasi linier " Matematika Geodesi "Transformasi linier " Matematika Geodesi "
Transformasi linier " Matematika Geodesi "Dedy Kurniawan
 
Pengantar metode numerik
Pengantar metode numerikPengantar metode numerik
Pengantar metode numerikputra_andy
 
persamaan-diferensial-orde-ii
persamaan-diferensial-orde-iipersamaan-diferensial-orde-ii
persamaan-diferensial-orde-iiFaried Doank
 

What's hot (20)

Aturan trapesium
Aturan trapesiumAturan trapesium
Aturan trapesium
 
Ppt pembukktian mat veni
Ppt pembukktian  mat veniPpt pembukktian  mat veni
Ppt pembukktian mat veni
 
Pengenalan Persamaan Differensial Parsial
Pengenalan Persamaan Differensial ParsialPengenalan Persamaan Differensial Parsial
Pengenalan Persamaan Differensial Parsial
 
Daftar referensi
Daftar referensiDaftar referensi
Daftar referensi
 
Deret taylor and mac laurin
Deret taylor and mac laurinDeret taylor and mac laurin
Deret taylor and mac laurin
 
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
 
Bidang dan garis dalam d3
Bidang dan garis dalam d3Bidang dan garis dalam d3
Bidang dan garis dalam d3
 
deret kuasa
deret kuasaderet kuasa
deret kuasa
 
Rpp bidang kartesius 1 pertemuan
Rpp bidang kartesius 1 pertemuanRpp bidang kartesius 1 pertemuan
Rpp bidang kartesius 1 pertemuan
 
Deret Fourier
Deret FourierDeret Fourier
Deret Fourier
 
Bab ii pembahasan a. persamaan schrodinger pada gerak partikel b
Bab ii pembahasan a. persamaan schrodinger pada gerak partikel bBab ii pembahasan a. persamaan schrodinger pada gerak partikel b
Bab ii pembahasan a. persamaan schrodinger pada gerak partikel b
 
Homomorfisma grup
Homomorfisma grupHomomorfisma grup
Homomorfisma grup
 
kekontinuan fungsi
kekontinuan fungsikekontinuan fungsi
kekontinuan fungsi
 
Pembuktian dalam matematika
Pembuktian dalam matematikaPembuktian dalam matematika
Pembuktian dalam matematika
 
Modul 4 kongruensi linier
Modul 4   kongruensi linierModul 4   kongruensi linier
Modul 4 kongruensi linier
 
Persamaan diferensial
Persamaan diferensialPersamaan diferensial
Persamaan diferensial
 
Makalah Persamaan Deferensial NON EKSAK
Makalah Persamaan Deferensial NON EKSAKMakalah Persamaan Deferensial NON EKSAK
Makalah Persamaan Deferensial NON EKSAK
 
Transformasi linier " Matematika Geodesi "
Transformasi linier " Matematika Geodesi "Transformasi linier " Matematika Geodesi "
Transformasi linier " Matematika Geodesi "
 
Pengantar metode numerik
Pengantar metode numerikPengantar metode numerik
Pengantar metode numerik
 
persamaan-diferensial-orde-ii
persamaan-diferensial-orde-iipersamaan-diferensial-orde-ii
persamaan-diferensial-orde-ii
 

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

How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?XfilesPro
 
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar
 
GraphAware - Transforming policing with graph-based intelligence analysis
GraphAware - Transforming policing with graph-based intelligence analysisGraphAware - Transforming policing with graph-based intelligence analysis
GraphAware - Transforming policing with graph-based intelligence analysisNeo4j
 
GraphSummit Stockholm - Neo4j - Knowledge Graphs and Product Updates
GraphSummit Stockholm - Neo4j - Knowledge Graphs and Product UpdatesGraphSummit Stockholm - Neo4j - Knowledge Graphs and Product Updates
GraphSummit Stockholm - Neo4j - Knowledge Graphs and Product UpdatesNeo4j
 
Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)
Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)
Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)Gáspár Nagy
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2
 
iGaming Platform & Lottery Solutions by Skilrock
iGaming Platform & Lottery Solutions by SkilrockiGaming Platform & Lottery Solutions by Skilrock
iGaming Platform & Lottery Solutions by SkilrockSkilrock Technologies
 
Abortion ^Clinic ^%[+971588192166''] Abortion Pill Al Ain (?@?) Abortion Pill...
Abortion ^Clinic ^%[+971588192166''] Abortion Pill Al Ain (?@?) Abortion Pill...Abortion ^Clinic ^%[+971588192166''] Abortion Pill Al Ain (?@?) Abortion Pill...
Abortion ^Clinic ^%[+971588192166''] Abortion Pill Al Ain (?@?) Abortion Pill...Abortion Clinic
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Anthony Dahanne
 
Agnieszka Andrzejewska - BIM School Course in Kraków
Agnieszka Andrzejewska - BIM School Course in KrakówAgnieszka Andrzejewska - BIM School Course in Kraków
Agnieszka Andrzejewska - BIM School Course in Krakówbim.edu.pl
 
KLARNA - Language Models and Knowledge Graphs: A Systems Approach
KLARNA -  Language Models and Knowledge Graphs: A Systems ApproachKLARNA -  Language Models and Knowledge Graphs: A Systems Approach
KLARNA - Language Models and Knowledge Graphs: A Systems ApproachNeo4j
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandIES VE
 
Secure Software Ecosystem Teqnation 2024
Secure Software Ecosystem Teqnation 2024Secure Software Ecosystem Teqnation 2024
Secure Software Ecosystem Teqnation 2024Soroosh Khodami
 
AI/ML Infra Meetup | ML explainability in Michelangelo
AI/ML Infra Meetup | ML explainability in MichelangeloAI/ML Infra Meetup | ML explainability in Michelangelo
AI/ML Infra Meetup | ML explainability in MichelangeloAlluxio, Inc.
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfOrtus Solutions, Corp
 
StrimziCon 2024 - Transition to Apache Kafka on Kubernetes with Strimzi
StrimziCon 2024 - Transition to Apache Kafka on Kubernetes with StrimziStrimziCon 2024 - Transition to Apache Kafka on Kubernetes with Strimzi
StrimziCon 2024 - Transition to Apache Kafka on Kubernetes with Strimzisteffenkarlsson2
 
Advanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should KnowAdvanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should KnowPeter Caitens
 
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAG
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAGAI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAG
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAGAlluxio, Inc.
 
Breaking the Code : A Guide to WhatsApp Business API.pdf
Breaking the Code : A Guide to WhatsApp Business API.pdfBreaking the Code : A Guide to WhatsApp Business API.pdf
Breaking the Code : A Guide to WhatsApp Business API.pdfMeon Technology
 

Recently uploaded (20)

How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
 
Top Mobile App Development Companies 2024
Top Mobile App Development Companies 2024Top Mobile App Development Companies 2024
Top Mobile App Development Companies 2024
 
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBroker
 
GraphAware - Transforming policing with graph-based intelligence analysis
GraphAware - Transforming policing with graph-based intelligence analysisGraphAware - Transforming policing with graph-based intelligence analysis
GraphAware - Transforming policing with graph-based intelligence analysis
 
GraphSummit Stockholm - Neo4j - Knowledge Graphs and Product Updates
GraphSummit Stockholm - Neo4j - Knowledge Graphs and Product UpdatesGraphSummit Stockholm - Neo4j - Knowledge Graphs and Product Updates
GraphSummit Stockholm - Neo4j - Knowledge Graphs and Product Updates
 
Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)
Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)
Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
iGaming Platform & Lottery Solutions by Skilrock
iGaming Platform & Lottery Solutions by SkilrockiGaming Platform & Lottery Solutions by Skilrock
iGaming Platform & Lottery Solutions by Skilrock
 
Abortion ^Clinic ^%[+971588192166''] Abortion Pill Al Ain (?@?) Abortion Pill...
Abortion ^Clinic ^%[+971588192166''] Abortion Pill Al Ain (?@?) Abortion Pill...Abortion ^Clinic ^%[+971588192166''] Abortion Pill Al Ain (?@?) Abortion Pill...
Abortion ^Clinic ^%[+971588192166''] Abortion Pill Al Ain (?@?) Abortion Pill...
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
 
Agnieszka Andrzejewska - BIM School Course in Kraków
Agnieszka Andrzejewska - BIM School Course in KrakówAgnieszka Andrzejewska - BIM School Course in Kraków
Agnieszka Andrzejewska - BIM School Course in Kraków
 
KLARNA - Language Models and Knowledge Graphs: A Systems Approach
KLARNA -  Language Models and Knowledge Graphs: A Systems ApproachKLARNA -  Language Models and Knowledge Graphs: A Systems Approach
KLARNA - Language Models and Knowledge Graphs: A Systems Approach
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
 
Secure Software Ecosystem Teqnation 2024
Secure Software Ecosystem Teqnation 2024Secure Software Ecosystem Teqnation 2024
Secure Software Ecosystem Teqnation 2024
 
AI/ML Infra Meetup | ML explainability in Michelangelo
AI/ML Infra Meetup | ML explainability in MichelangeloAI/ML Infra Meetup | ML explainability in Michelangelo
AI/ML Infra Meetup | ML explainability in Michelangelo
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
 
StrimziCon 2024 - Transition to Apache Kafka on Kubernetes with Strimzi
StrimziCon 2024 - Transition to Apache Kafka on Kubernetes with StrimziStrimziCon 2024 - Transition to Apache Kafka on Kubernetes with Strimzi
StrimziCon 2024 - Transition to Apache Kafka on Kubernetes with Strimzi
 
Advanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should KnowAdvanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should Know
 
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAG
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAGAI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAG
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAG
 
Breaking the Code : A Guide to WhatsApp Business API.pdf
Breaking the Code : A Guide to WhatsApp Business API.pdfBreaking the Code : A Guide to WhatsApp Business API.pdf
Breaking the Code : A Guide to WhatsApp Business API.pdf
 

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.