Placement AptitudeVery hardGoldman Sachs OA · CAT

Two numbers a and b are chosen independently and uniformly from 1 to 20 (they may be equal). What is the probability that gcd(a, b) = 1?

  1. A. 3/5
  2. B. 6/π²
  3. C. 51/80
  4. D. 1/2

Correct answer: C. 51/80

Ordered coprime pairs: for each larger value n there are φ(n) partners below or equal, and Σφ(1..20) = 128, so 2 × 128 − 1 = 255 pairs (the pair (1, 1) is counted once). P = 255/400 = 51/80. 6/π² ≈ 0.61 is only the large-range limit.

More Permutations, Combinations and Probability (Placement) questions

Exams that ask this topic