Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Recitation Guide - Week 11: N+K 1 K N 1

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

CIS 160

Recitation Guide - Week 11

Topics Covered: Geometric Distribution, Matchings, Planar Graphs

Problem 0:
Prove the Memoryless Property for geometric random variables: For a geometric random vari-
able X with parameter p and for n > 0,

Pr[X = n + k | X > k] = Pr[X = n]

Solution:

Pr[X = n + k ∩ X > k]
Pr[X = n + k | X > k] =
Pr[X > k]
Pr[X = n + k]
= (since n > 0)
Pr[X > k]
p(1 − p)n+k−1
=
(1 − p)k
= p(1 − p)n−1 = Pr[X = n]

1
Problem 1:
Calculate the expectation of a geometric random variable X with parameter p.
Solution:
First, we need some more mechanics:

Conditional Expectation. The following is the definition of conditional expectation.


X
E[Y | Z = z] = y · Pr[Y = y | Z = z],
y

where the summation is over all possible values y that the random variable Y can assume.

Law of Total Expectation For any random variables X and Y ,


X
E[X] = E[X|Y = y] Pr[Y = y]
y

Proof:
X
E[X] = x · Pr[X = x]
x
X X
= x· Pr[X = x|Y = y] Pr[Y = y]
x y
X X
= Pr[Y = y] · x · Pr[X = x|Y = y]
y x
X
= Pr[Y = y] · E[X|Y = y]
y

Now let us calculate the expectation of a geometric random variable X using the memoryless
property of the geometric random variable. Let Y be a random variable that is 0 if the first flip
results in tails, and 1 otherwise.
Using total expectation we have:

E[X] = E[X|Y = 0] Pr[Y = 0] + E[X|Y = 1] Pr[Y = 1]

Let us try to determine E[X|Y = 0]:



X
E[X|Y = 0] = x · Pr[X = x|Y = 0]
x=1
= 1 · Pr[X = 1|Y = 0]
X∞
+ x · Pr[X = x|Y = 0]
x=2

2
Note that Pr[X = 1|Y = 0] = 0 (consider what these events mean):


X
= x · Pr[X = x|Y = 0]
x=2

By the memoryless property, Pr[X = x|Y = 0] = Pr[X = x|X > 1] = Pr[X = x − 1]:


X
= x · Pr[X = x − 1]
x=2

X
= (x + 1) · Pr[X = x]
x=1

X ∞
X
= x · Pr[X = x] + Pr[X = x]
x=1 x=1
∴ E[X|Y = 0] = E[X] + 1

Returning to E[X]:

E[X] = E[X|Y = 0] Pr[Y = 0] + E[X|Y = 1] Pr[Y = 1]


= (E[X] + 1)(1 − p) + 1 · p
∴ p · E[X] = 1
1
E[X] =
p

3
Problem 2:
Consider a normal chessboard (an 8x8 grid), in which in each row and in each column there are
exactly n pieces, where 0 < n ≤ 8. Prove that we can pick 8 pieces such that no two of them are
in the same row or column.
Solution:
We construct a bipartite graph G as follows. Let X be the set of rows modeled as vertices. Let Y
be the set of columns modeled as vertices. Let E be the set of edges such that if a piece exists in
row i and column j, then there is an edge between xi ∈ X and yj ∈ Y . Note that the graph must
be bipartite because no edges exist between two vertices in X or two vertices in Y .
The question asks us to find a matching: can we match each of the 8 rows to a unique column?
Note that this would mean that we could pick 8 edges (in our matching) that are not in the same
row or same column.
We must prove the existence of such a perfect matching. Note that the size of our two bipartite
sets X and Y are the same; in other words, |X| = |Y |. If we can find a matching that saturates X,
then it must also saturate Y . We show that Hall’s Condition is satisfied, that is that |NG (S)| ≥
|S|, ∀S ⊆ X, to prove the existence of this matching.
Consider an arbitrary but particular subset A ⊆ X (of the rows). Recall that there are n pieces in
each row and n pieces in each column. Thus, there must be n|A| edges from A to NG (A). We also
know that each column in NG (A) has at most n edges back to A, meaning that there are at most
n|NG (A)| edges from NG (A) to A. This means that n|A| ≤ n|NG (A)|, meaning that |A| ≤ |NG (A)|.
This satisfies Hall’s Condition, leading us to prove the existence of our matching.
This method can be applied to prove that any k-regular bipartite graph has a perfect matching.

4
Problem 3:
A vertex cover of graph G is a set of vertices, S, such that every edge in G is incident to at least
one vertex in S. Find a relationship between the size of a maximum matching and the size of a
minimum vertex cover of a graph G.
Solution:
Let M be a maximum matching of G, and let S be a minimum vertex cover. For every edge
e = {u, v} ∈ M , there exists an endpoint of e (u or v) in S, since for every edge in a graph,
one of its endpoints must belong to S. Thus, because edges of a matching share no endpoints,
|S| ≥ |M |.

You might also like