Question

The probability that a given positive integer lying between 1 and 100 (both inclusive) is NOT divisible by 2, 3 or 5 is _____.

Official answer and solution
Accepted answers
0.259 to 0.261
From
Official GATE 2014 answer key

Solution

Apply the Principle of Inclusion-Exclusion to find the count of integers between 1 and 100 divisible by 2, 3, or 5.

  1. Sample Space:
    Integers from 1 to 100 inclusive, so N=100N = 100.

  2. Counting Multiples:

    • Divisible by 2: ∣A2∣=⌊100/2⌋=50|A_2| = \lfloor 100 / 2 \rfloor = 50.
    • Divisible by 3: ∣A3∣=⌊100/3⌋=33|A_3| = \lfloor 100 / 3 \rfloor = 33.
    • Divisible by 5: ∣A5∣=⌊100/5⌋=20|A_5| = \lfloor 100 / 5 \rfloor = 20.
  3. Pairwise and Three-way Intersections:

    • Divisible by lcm(2,3)=6\text{lcm}(2, 3) = 6: ∣A2∩A3∣=⌊100/6⌋=16|A_2 \cap A_3| = \lfloor 100 / 6 \rfloor = 16.
    • Divisible by lcm(2,5)=10\text{lcm}(2, 5) = 10: ∣A2∩A5∣=⌊100/10⌋=10|A_2 \cap A_5| = \lfloor 100 / 10 \rfloor = 10.
    • Divisible by lcm(3,5)=15\text{lcm}(3, 5) = 15: ∣A3∩A5∣=⌊100/15⌋=6|A_3 \cap A_5| = \lfloor 100 / 15 \rfloor = 6.
    • Divisible by lcm(2,3,5)=30\text{lcm}(2, 3, 5) = 30: ∣A2∩A3∩A5∣=⌊100/30⌋=3|A_2 \cap A_3 \cap A_5| = \lfloor 100 / 30 \rfloor = 3.
  4. Inclusion-Exclusion Calculation:

    ∣A2∪A3∪A5∣=50+33+20−(16+10+6)+3=103−32+3=74.|A_2 \cup A_3 \cup A_5| = 50 + 33 + 20 - (16 + 10 + 6) + 3 = 103 - 32 + 3 = 74.
  5. Count and Probability of NOT Divisible:

    • Integers not divisible by 2, 3, or 5:
      100−74=26.100 - 74 = 26.
    • Probability:
      P=26100=0.26.P = \frac{26}{100} = 0.26.

This lies squarely in the official key range [0.259,0.261][0.259, 0.261].

Final answer

0.26

Common trap

Omitting the 3-way intersection or making arithmetic errors in adding/subtracting intersection counts.

The answer is the one in the official GATE answer key. The solution is this site's own explanation.

Source

Paper
GATE 2014 Computer Science and Information Technology (CS) Session 2
Question
58 of 65, printed as CS Q.48
Section
Computer Science and Information Technology

Report an error in this question

GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.