Introduction to Algorithms, Third Edition


Analysis of the hiring problem using indicator random variables



Download 4,84 Mb.
Pdf ko'rish
bet85/618
Sana07.04.2022
Hajmi4,84 Mb.
#534272
1   ...   81   82   83   84   85   86   87   88   ...   618
Bog'liq
Introduction-to-algorithms-3rd-edition

Analysis of the hiring problem using indicator random variables
Returning to the hiring problem, we now wish to compute the expected number of
times that we hire a new office assistant. In order to use a probabilistic analysis, we
assume that the candidates arrive in a random order, as discussed in the previous
section. (We shall see in Section 5.3 how to remove this assumption.) Let
X
be the
random variable whose value equals the number of times we hire a new office as-
sistant. We could then apply the definition of expected value from equation (C.20)
to obtain
E
ŒX 
D
n
X
x
D
1
x
Pr
f
X
D
x
g
;
but this calculation would be cumbersome. We shall instead use indicator random
variables to greatly simplify the calculation.
To use indicator random variables, instead of computing E
ŒX 
by defining one
variable associated with the number of times we hire a new office assistant, we
define
n
variables related to whether or not each particular candidate is hired. In
particular, we let
X
i
be the indicator random variable associated with the event in
which the
i
th candidate is hired. Thus,
X
i
D
I
f
candidate
i
is hired
g
D
(
1
if candidate
i
is hired
;
0
if candidate
i
is not hired
;
and
X
D
X
1
C
X
2
C C
X
n
:
(5.2)


5.2
Indicator random variables
121
By Lemma 5.1, we have that
E
ŒX
i
D
Pr
f
candidate
i
is hired
g
;
and we must therefore compute the probability that lines 5–6 of H
IRE
-A
SSISTANT
are executed.
Candidate
i
is hired, in line 6, exactly when candidate
i
is better than each of
candidates
1
through
i
1
. Because we have assumed that the candidates arrive in
a random order, the first
i
candidates have appeared in a random order. Any one of
these first
i
candidates is equally likely to be the best-qualified so far. Candidate
i
has a probability of
1= i
of being better qualified than candidates
1
through
i
1
and thus a probability of
1= i
of being hired. By Lemma 5.1, we conclude that
E
ŒX
i
D
1= i :
(5.3)
Now we can compute E
ŒX 
:
E
ŒX 
D
E
"
n
X
i
D
1
X
i
#
(by equation (5.2))
(5.4)
D
n
X
i
D
1
E
ŒX
i
(by linearity of expectation)
D
n
X
i
D
1
1= i
(by equation (5.3))
D
ln
n
C
O.1/
(by equation (A.7)) .
(5.5)
Even though we interview
n
people, we actually hire only approximately ln
n
of
them, on average. We summarize this result in the following lemma.

Download 4,84 Mb.

Do'stlaringiz bilan baham:
1   ...   81   82   83   84   85   86   87   88   ...   618




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish