Upload
valtina-tony
View
21
Download
1
Embed Size (px)
DESCRIPTION
תרגילי חזרה. General Things to Remember. Be careful to identify if we’re talking about gains or costs (because the search cost is always negative) Check carefully if the payoff cost allows you to use advance formulation of the original model. Problem 1. You have 5 boxes on the table - PowerPoint PPT Presentation
Citation preview
חזרה תרגילי
General Things to Remember
• Be careful to identify if we’re talking about gains or costs (because the search cost is always negative)
• Check carefully if the payoff cost allows you to use advance formulation of the original model
Problem 1• You have 5 boxes on the table– Each box can generate a random number from a
uniform distribution (0,100)– In order to activate a box you need to feed it with a
$1– In addition, in order to approach the table you need
to pay $2– You can approach the table up to 5 times, and
activate as many boxes as you want each time– Your revenue will be the maximum prize revealed
Problem 1 (cont.)
• Show that 81 is an upper bound for your expected revenue
Solution
• Searching sequentially, with a search cost of c=1 and an infinite decision horizon will always yield a better expected net revenue thus this is an upper bound:
14.114x
85.86
*01.001.01
)()()()(
100
x
xxxydy
xxVxFdyyyfcxV
xy
xy
Good, but not good enough…
Parallel Search is an even tighter bound (if infinite horizon)…
• We know that:
xxxdyyNyN
xNxfxFNxf
xxFxF
xxVxFdyyyfNcxV
N
xy
N
NNN
NNN
N
xy
N
01.001.0*01.02
01.0*01.0)()()(
01.0)()(
)()()()()(
1001
11
N=1: x=75.5N=2: x=79.2N=3: x=80.5N=4: x=80.95N=5: x=81
המזכירה בעיית
עם • המזכירה בעיית , n=5נתונה מועמדים , סיימנו אם גם המקורית לבעיה בניגוד כאשר
הטוב המועמד את מצאנו ולא החיפוש אתשבהסתברות הרי פנוי αביותר יהיה עדיין הוא
אותו לשכור יהיה וניתןכאשר – לחיפוש האופטימלית האסטרטגיה מהי
α=0.2?ערך – - Nבחר מ ) - 10גדול .αו( שנית ופתור כרצונך
Analysis
• What is the probability of selecting the best applicant?– For r=1 or r=n, 1/n– For r>1:
timeline
n
max of r-1 max of j-r
rn
n
rj
n
rj
n
rjn jn
r
j
r
nPr
1
11
1
11
itselect you and
best isapplicant th -j
> the probability that the maximum number in a sample of j-1 is one of the
first r-1 numbers
Adding α
• The revised equation:
n
r
jn
rr
n
rjn
1
1
11
r 1/(j-1)sum(1/(j-
1)) (r-1)/5 A (r-1)*a/n1 0.22 1 2.08 0.2 0.42 0.04 0.463 0.5 1.08 0.4 0.43 0.08 0.514 0.33 0.58 0.6 0.35 0.12 0.475 0.25 0.25 0.8 0.2 0.16 0.36
rn
A
And if you’re a wiseguy…
• Just choose α=1 and the probability of ending up with the best equals 1…
Buying a Laptop
• Assume you are a comparison shopping agent and a buyer offers you sqrt(x) dollars for each saving of x dollars below a price of $50 for a product
• You have 3 stores to look at:
• How will you search and what is the probability of getting to store C?
f(x)
0 100Store AcA=1.3
f(x)
10 90Store BcB=0.5
f(x)
20 80Store CcC=0.3
This is a Pandora’s version!
Seller fi(x)
A 1/100
B 1/80
C 1/60
i
z
x iiiii dxxfzxci
5050
And the rule: go to store with minimal zi unless found a price below zi
Cont.
• Optimal strategy: start with B, if price above 37.41 then go to C and if best price is above 45.23 then go to A
Seller zi
A 45.23
B 36.98
C 37.41
i
z
x iiiii dxxfzxci
5050
Probability of getting to C
66.0)41.37( BPP
Yet another Pandora…
• You go to NY for a month• There are N pubs you might find attractive• Each pub has a different a-priori distribution
of value for you and different exploration cost• Your performance will be the accumulated
value• What is the optimal strategy?
Solution
• All search should be conducted during first day.
• Cost to be used is c/30
dyyfzycz
30/
Pandora’s Problem
• We have two boxes:– One with payoffs $10 with probability 0.99 and $K
with probability 0.01. Cost of opening is $1.– The other with probability 0.5 has a prize of 100$
and with probability 0.5 has a prize of $200. its cost for opening is c->0.
– What should be the value of K so that the first box will be opened first
Solution
• RV of second box is 200• RV of first box is:
(K-200)*0.01=10.01K=3K=300
dyyfzycz
שאלה
מעבד • כל בנוי מעבדים מרובת מחשב במערכתליבות משתי
• ) ליבה ) כל על המתנה זמן הרגעי שהעומס ידוע(x<1>0עבור ) f(x)=2xמתפלג מנורמל,
הוא • במעבד לליבה גישה ובמידה 0.05זמןהשניה לליבה גם לגשת מכן לאחר ומחליטים
מעבד – אותו 0.02שלהיא • והמטרה במידה הדגימה מדיניות מהי
למינימום הכולל הזמן את להביא
פתרון
שני • בעלת כהזדמנות מעבד כל על להסתכל ניתןשלבים.
•: השני מהשלב נתחיל
• - מ גדול ערך שמצאנו זמן כל לדגום 0.39כלומר נרצההשניה הליבה את גם
39.0
202.00
0
x
dyyyz
dyyfyzc
z
z
פתרון
•: הראשונה הליבה על נסתכל כעת
• - מ קטן ערך מצאנו שלא זמן כל 0.52כלומרהראשונה הליבה את לדגום נרצה
52.0
02.0)(1)(39.0 0
39.0
0
z
dyyfyFydwwwfzdyyfyzcz
y
y
wy