Question: need help with all letters 7 Algorithm 3 int hire Assistant(int n) best=0; 1: while in do if candidate is better than candidate best then

need help with all letters  need help with all letters 7 Algorithm 3 int hire Assistant(int
n) best=0; 1: while in do if candidate is better than candidate

7 Algorithm 3 int hire Assistant(int n) best=0; 1: while in do if candidate is better than candidate best then best = t; Whire candidate" //Very costly! end if i=i+1; end while Similar to before, let X be the random variable which is 1 if the ith candidate is hired and is 0 otherwise. Let X be the random variable denoting the number of the n candidates hired. Specifically: X(s) = # people hired when the candidates arrive in order s Suppose, we now learn that the better candidates are more likely to arrive later. In particular, assume that half the time the next candidate in line will be better than all those that have already been interviewed. For the sake of simplicity, you can assume the first candidate in line also has a 50% chance of being hired. (a) (0 points) What is the new expected value of X.? I (b) (0 points) Define X using n copies of the random var ble X, (c) (0 points) Compute the expected value of X for using the linearity of expectation. Given this, do we expect the runtime of hire Assistant to be better or worse than our original estimate (where we hired (log n) people)? 7 Algorithm 3 int hire Assistant(int n) best=0; 1: while in do if candidate is better than candidate best then best = t; Whire candidate" //Very costly! end if i=i+1; end while Similar to before, let X be the random variable which is 1 if the ith candidate is hired and is 0 otherwise. Let X be the random variable denoting the number of the n candidates hired. Specifically: X(s) = # people hired when the candidates arrive in order s Suppose, we now learn that the better candidates are more likely to arrive later. In particular, assume that half the time the next candidate in line will be better than all those that have already been interviewed. For the sake of simplicity, you can assume the first candidate in line also has a 50% chance of being hired. (a) (0 points) What is the new expected value of X.? I (b) (0 points) Define X using n copies of the random var ble X, (c) (0 points) Compute the expected value of X for using the linearity of expectation. Given this, do we expect the runtime of hire Assistant to be better or worse than our original estimate (where we hired (log n) people)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!