An absent-minded professor has n keys in his pocket of which only one (he does not remember which one) fits his office door. He picks a key at random and tries it on his door. If that does not work, he picks a key again to try, and so on until the door unlocks. Let X denote the number of keys that he tries. Find the pmf of X in the following two cases: (a) A key that does not work is put back in his pocket so that when he picks another key, all n keys are equally likely to be picked (sampling with replacement). (b) A key that does not work is put in his briefcase so that when he picks another key, he picks at random from those remaining in his pocket (sampling without replacement).