# Entrance exams

452 views
0

Suppose you have a 4 digit combination lock,but you have forgotten the correct combination.Consider the following 3 strategies to find the correct one-

i)Try the combinations consecutively from 0000 to 9999.

ii)Try combinations using simple random sampling with replacement from the set of all possible combinations.

iii)Try combinations using simple random sampling without replacement from the set of all possible combinations.

Assume that the true combination was chosen uniformly at random from all possible combinations.Determine the expected number of attempts needed to find the correct combination in all 3 cases.

0

We are to crack the password of a 4 digit combination lock, and are provided with three strategies.

Let us define K: to be the correct combination among {0,1,2,3,…,9999},i.e,   K follows a Discrete Uniform {0,1,2,3,4,….,9999} Distribution.

Also let N:denote the number of trials required to get the correct combination of the lock.

We also know E(E[N|K])=E(N).

STRATEGY 1:

We are to try all possible combination consecutively from 0000,….,9999.

Here if the correct combination is K, then the no.of trials required to get the correct combination is K i.e., N=K.

Therefore E(N)=E(K)=9999/2=4999.5

STRATEGY 2:

We are to try the combinations using SRSWR.

Now if we focus on N: it actually denotes the number of trials to get the first success or in other words the number of failures preceding the first success, hence N|K can be modeled as Geometric(p) Random Variable where p=probability of getting the correct combination when using SRSWR as the sampling scheme i.e., p=1/10000. Therefore E(N|K)=10000.

Now E(N)=EE(N|K)=E(10000)=10000.

STRATEGY 3:

We are to try the combinations using SRSWOR.

E(N|K)= Now p(N|K=i)=(9999/10000)*(9998/9999)*(9997/9998)*…..*((10001-i)/(10002-i))*1/10000=10001-i/(10000*10000), for all i.

E(N|K)=10001/20000.

Therefore, E(N)=EE(N|K)=E(10001/20000)=10001/20000.