GATE Computer ScienceHardGATE CS (PYQ pattern)
How many integers from 1 to 1000 are divisible by exactly two of the three numbers 4, 6 and 10?
- A. 118
- B. 134
- C. 70
- D. 166
Correct answer: A. 118
Use lcms, not products: 4 & 6 → 12: 83; 4 & 10 → 20: 50; 6 & 10 → 30: 33; all three → 60: 16. Exactly two = 83 + 50 + 33 − 3·16 = 118 (subtracting 2·16 gives 'at least two' = 134; using products 24, 40, 60, 240 gives 70).
More Discrete Mathematics questions
- A family F of subsets of {1, 2, 3} is union-closed if A ∪ B ∈ F whenever A, B ∈ F. How many union-closed families (including the empty…
- How many ordered pairs (f, g) of functions from {1, 2, 3} to itself satisfy f∘g = g∘f?
- In how many ways can 8 distinct people be split into 3 non-empty groups (groups unlabelled) such that no group has exactly one person?
- The relation R = {(1,2), (2,3), (3,1), (3,4), (5,6), (6,5), (4,5)} is defined on {1, …, 6}. How many ordered pairs does its transitive…
- Let I be the identity relation on {1, 2, 3, 4}. How many relations R on this set satisfy R∘R = I (composition of R with itself equals I)?
- Which of the following sets are countable? I. The set of all finite subsets of ℕ II. The set of all functions f : ℕ → {0, 1} III. The set…