Probabilistic Analysis: HIRE-ASSISTANT Problem

799 Views Asked by At

Consider the below problem on Hiring Assistant

In HIRE-ASSISTANT, assuming that the candidates are presented in a random order, what is the probability that you hire exactly one time?

HIRE-ASSISTANT(n)
    best = 0 // candidate 0 is a least-qualified dummy candidate
    for i = 1 to n
        interview candidate i
        if candidate i is better than candidate best
            best = i
            hire candidate i

P(Hire exactly one)

= P(hire only 1st person) + P(hire only 2nd person) + ...

$= \frac{(n-1)!}{n!} + \frac{(n-1)!}{n!} + ...$

$= \frac{1}{n} + \frac{1}{n} + ...$

$= 1$

I'm getting wrong result can anybody tell me what I'm asuming wrong here.