Skip to content
Official PYQ · 2017

GATE CS 2017 Set 1 Q47 — Sets, Relations and Functions

Explain with AI
The number of integers between 11 and 500500 (both inclusive) that are divisible by 33 or 55 or 77 is ____________ .
View worked solution

Answer: 271

We can solve this using the Principle of Inclusion-Exclusion (PIE).

Let U={1,2,…,500}U = \{1, 2, \dots, 500\} be the universal set. Let AA, BB, and CC be the subsets of UU containing integers divisible by 33, 55, and 77 respectively.

The number of elements in each set is calculated as follows:

  • ∣A∣=⌊5003⌋=166|A| = \lfloor \frac{500}{3} \rfloor = 166
  • ∣B∣=⌊5005⌋=100|B| = \lfloor \frac{500}{5} \rfloor = 100
  • ∣C∣=⌊5007⌋=71|C| = \lfloor \frac{500}{7} \rfloor = 71

Now, we find the pairwise intersections using the least common multiple (LCM) of the divisors:

  • ∣A∩B∣=⌊500lcm(3,5)⌋=⌊50015⌋=33|A \cap B| = \lfloor \frac{500}{\text{lcm}(3,5)} \rfloor = \lfloor \frac{500}{15} \rfloor = 33
  • ∣B∩C∣=⌊500lcm(5,7)⌋=⌊50035⌋=14|B \cap C| = \lfloor \frac{500}{\text{lcm}(5,7)} \rfloor = \lfloor \frac{500}{35} \rfloor = 14
  • ∣C∩A∣=⌊500lcm(7,3)⌋=⌊50021⌋=23|C \cap A| = \lfloor \frac{500}{\text{lcm}(7,3)} \rfloor = \lfloor \frac{500}{21} \rfloor = 23

The intersection of all three sets is:

  • ∣A∩B∩C∣=⌊500lcm(3,5,7)⌋=⌊500105⌋=4|A \cap B \cap C| = \lfloor \frac{500}{\text{lcm}(3,5,7)} \rfloor = \lfloor \frac{500}{105} \rfloor = 4

Applying the Principle of Inclusion-Exclusion:

∣A∪B∪C∣=(∣A∣+∣B∣+∣C∣)−(∣A∩B∣+∣B∩C∣+∣C∩A∣)+∣A∩B∩C∣|A \cup B \cup C| = (|A| + |B| + |C|) - (|A \cap B| + |B \cap C| + |C \cap A|) + |A \cap B \cap C|∣A∪B∪C∣=(166+100+71)−(33+14+23)+4|A \cup B \cup C| = (166 + 100 + 71) - (33 + 14 + 23) + 4∣A∪B∪C∣=337−70+4=271|A \cup B \cup C| = 337 - 70 + 4 = 271

Free practice · Your answers on this page are not saved.

Published
Report a correction
Keep exploringMore Sets, Relations and Functions questions