Ti = indicator random variable of the event - PowerPoint PPT Presentation

About This Presentation
Title:

Ti = indicator random variable of the event

Description:

Coupon collector problem. n coupons to collect. What is the expected number of ... Las Vegas algorithm (never makes error, randomness. only influences running time) ... – PowerPoint PPT presentation

Number of Views:12
Avg rating:3.0/5.0
Slides: 24
Provided by: csRoch
Category:

less

Transcript and Presenter's Notes

Title: Ti = indicator random variable of the event


1
Ti indicator random variable of the event
that i-th throw results in a tail ET
ET1 ET6 6(1/2) 3
P(T3) P(H3) binomial(6,3)/26 5/16 lt 1/2
2
EXi,j ½ (consider
only iltj)
X?Xi,j EX n(n-1) /4
1? iltj? n
3
?
T 1 (1/2) 0 (1/2) ( T T ) T 1 T
4
There exists c such that T(n) ?
T(n/2)T(n/3)cn.We need to show that there
exists d such that
T(n) ? dn for all n.
Induction step T(n) ? T(n/2) T(n/3) cn ?
dn/2 dn/3 cn ?
dn (c-d/6)n ? dn, taking d6c.
5
l ? m1
6
if B ? Am then
7
Reverse(a,b) for i from a to ?ab? do
swap(Ai,Aab-i)
1,.,k,k1,.,n k,.,1,k1,.,n k,.,1,n,.,k1 k
1,.,n,1,.,k
Rotate(k) Reverse(1,k) Reverse(k1,n)
Reverse(1,n)
8
  1. find the median m of A

? m
m
? m
sum S
3) if S\geq C then recurse on An/2..n
else recurse on A1..n/2 with
CC-S
9
T(n) T(n/2) O(n)
3) if S\geq C then recurse on An/2..n
else recurse on A1..n/2 with
CC-S
10
Coupon collector problem
n coupons to collect What is the expected number
of cereal boxes that you need to buy?
11
Coupon collector problem
Assume that a dart throw is uniform in the
circle. Let p be The fraction occupied by the
bulls eye.
Expected number of darts needed to hit the
bulls eye ?
12
Coupon collector problem
Assume that a dart throw is uniform in the
circle. Let p be The fraction occupied by the
bulls eye.
Expected number of darts needed to hit the
bulls eye ?
1/p
13
What is the expected number of boxes that I buy
in k-th phase ? k-th phase when I have k
different Kinds of coupons.
EX0 1 EXk ? EXn-1 n
14
What is the expected number of boxes that I buy
in k-th phase ? k-th phase when I have k
different Kinds of coupons.
EX0 1 EXk n/(n-k) EXn-1 n
15
What is the expected number of boxes that I buy
in k-th phase ? k-th phase when I have k
different Kinds of coupons.
n-1
n
n
1
XX0X1Xn-1 ? n ?

n-k
k
k0
k1
? (n ln n)
16
What is the expected number of boxes that I buy
in k-th phase ? k-th phase when I have k
different Kinds of coupons.
n-1
n
n
1
XX0X1Xn-1 ? n ?

n-k
k
k0
k1

? (n ln n)
EXEX0EXn-1
17
Harmonic numers
n
?
1
? 1ln n
ln n ?
k
k1
18
Randomized algorithm for median
SELECT k-th element
for random x
1)
x
ltx
gtx
R
L
2) recurse on the appropriate part
19
Randomized algorithm for median
Las Vegas algorithm
(never makes error, randomness only influences
running time)
The identity testing algorithm was Monte Carlo
algorithm with 1 sided error.
20
Markov inequality
For non-negative random variable X
P(X gt a.EX) lt 1/a P(X ? a.EX) ? 1/a
21
Variance
For a random variable X V X
E (X-EX)2
What is the variance of Xthe number on a
(6-sided) dice ?
22
Variance
For a random variable X V X
E (X-EX)2
Y (X-EX)2
P( Y gt a.EY ) lt 1/a
P( (X-EX)2 gt a.VX ) lt 1/a
P( (X-EX)2 gt b2.EX2 ) lt VX/(b2 EX2)
VX
1
P( X-EX gt b.EX ) lt

b2
EX2
23
Chebychevs inequality
VX
1
P( X-EX gt b.EX ) lt

b2
EX2
P( (1-b)EX ? X ? (1b)EX )
gt
VX
1
1 -

b2
EX2
Write a Comment
User Comments (0)
About PowerShow.com