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.
-
Sample Space:
Integers from 1 to 100 inclusive, so . -
Counting Multiples:
- Divisible by 2: .
- Divisible by 3: .
- Divisible by 5: .
-
Pairwise and Three-way Intersections:
- Divisible by : .
- Divisible by : .
- Divisible by : .
- Divisible by : .
-
Inclusion-Exclusion Calculation:
-
Count and Probability of NOT Divisible:
- Integers not divisible by 2, 3, or 5:
- Probability:
- Integers not divisible by 2, 3, or 5:
This lies squarely in the official key range .
0.26
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.