A computer program selects an integer in the set {k : 1 ≤ k ≤ 10,00,000} at…

2014

A computer program selects an integer in the set {k : 1 ≤ k ≤ 10,00,000} at random and prints out the result. This process is repeated 1 million times. What is the probability that the value k = 1 appears in the printout atleast once ?

  1. A.

    0.5

  2. B.

    0.704

  3. C.

    0.632121

  4. D.

    0.68

Attempted by 19 students.

Show answer & explanation

Correct answer: C

Key idea: compute the probability that the value 1 never appears, then subtract from 1.

  1. Probability a single random integer is not 1 = 999999/1000000.

  2. Probability none of the 1,000,000 independent trials equals 1 = (999999/1000000)^1000000.

  3. Therefore the probability that 1 appears at least once = 1 − (999999/1000000)^1000000.

  4. Numerical approximation: (999999/1000000)^1000000 ≈ e^{-1} ≈ 0.367879, so the desired probability ≈ 1 − e^{-1} ≈ 0.6321205588 ≈ 0.632121.

Answer: 1 − (999999/1000000)^1000000 ≈ 0.632121

Explore the full course: Nta Ugc Net Paper 1