

































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
During the study of discrete mathematics, I found this course very informative and applicable.The main points in these lecture slides are:Expected Value and Variance, Distribution of Random Variable, Set of Pairs, Real Number, Expected Value, Coin Flipping Example, Linearity of Expectation, Two Dice Sum Example, Bernoulli Trials, Notion of Functions
Typology: Slides
1 / 41
This page cannot be seen from the preview
Don't miss anything!


































X is the number that comes up when a die is rolled. What is the expected value of X? E(X) = 1/6 1 + 1/6 2 + 1/6 3 + … 1/6 6 = 21/6 = 7/
X: number of heads E(X) = 1/8 3 + 3/8 2 + 3/8 1 + 1/8 0 = 12/8 = 3/
E(X) = ∑r ∈ X(S) p(X=r) r.
p(X=2) = p(X=12) = 1/ p(X=3) = p(X=11) = 2/ p(X=4) = p(X=10) = 3/ p(X=5) = p(X=9) = 4/ p(X=6) = p(X=8) = 5/ p(X=7) = 6/ E(X) =
Ch. 8.
Relations
Relation generalizes the notion of functions.
Recall: A function takes EACH element from a set and maps it
to a UNIQUE element in another set f: X → Y ∀ x ∈ X, ∃ y such that f(x) = y
Let A and B be sets.
A binary relation R from A to B is a subset of A × B Recall: A x B = {(a, b) | a ∈ A, b ∈ B} aRb: (a, b) ∈ R.
Application
Relational database model is based on the concept of relation.
Let A be the cities in the US Let B be the states in the US We define R to mean a is a city in state b Thus, the following are in our relation: (Minneapolis, MN) (Philadelphia, PA) (Portland, MA) (Portland, OR) etc…
CS1901 CS2011 CS
Alice (^) X
Bob (^) X X
Claire
Dan (^) X X
We can represent
relations graphically:
We can represent relations in a table:
A relation on the set A is a relation from A to
A
Six properties of relations we will study:
Definition: A relation is reflexive if ( a , a ) ∈ R for all a ∈ A
Definition: A relation is irreflexive if ( a , a ) ∉ R for all a ∈ A
Is the “divides” relation on Z +^ reflexive? Is the “” (not ⊆) relation on a P(A) irreflexive?
Symmetry, Asymmetry, Antisymmetry
for all a, b ∈ A, ( a , b ) ∈ R ⇒ ( b , a ) ∈ R
for all a, b ∈ A, ( a , b ) ∈ R ⇒ ( b,a ) ∉ R
for all a, b ∈ A, (( a , b ) ∈ R ∧ ( b,a ) ∈ R) ⇒ a = b (Second definition) for all a, b ∈ A, (( a , b ) ∈ R ∧ a ≠ b ) ⇒ ( b,a ) ∉ R )
A relation can be neither symmetric or
asymmetric
-4 is not related to itself
4 is related to itself