Principle of Inclusion and Exclusion Practice Questions

Last Updated : 26 Oct, 2026

The Principle of Inclusion and Exclusion (PIE) is a counting method used to find the total number of elements in the union of two or more overlapping sets. It gives the correct count by adding the sizes of the sets and subtracting the overlapping elements that are counted more than once.

Example: Suppose 20 students play cricket, 15 play football, and 5 play both. The total number of students who play cricket or football is 20 + 15 − 5 = 30

Here, the 5 students who play both games are subtracted once to avoid counting them twice.

Solved Examples

Question 1: In a class of 100 students:

  • 60 study Math.
  • 45 study Science.
  • 20 students study both Math and Science.

How many students study either Math or Science?

Solution:

As we know, n(A⋃B) = n(A) + n(B) – n(A⋂B)

Given:

  • n(A) = 60
  • n(B) = 45
  • n(A∩B) = 20

n(A⋃B) = n(A) + n(B) – n(A⋂B) = 60 + 45 - 20 = 85

Thus, 85 students study either Math or Science.

Question 2: The probability of getting at least one head is Problem: In a survey of 120 people:

  • 80 people like tea.
  • 70 people like coffee.
  • 50 people like both tea and coffee.

How many people like either tea or coffee?

Solution:

As we know, n(A⋃B) = n(A) + n(B) – n(A⋂B)

Given:

  • IAI = 80
  • IBI = 70
  • IA∩BI = 50

Thus, n(A⋃B) = 80 + 70 - 50 = 100

Thus, 100 people like either tea or coffee.

Question 3: A company has 30 employees, 10 are assigned to Task A, 15 to Task B, and 5 are assigned to both. How many employees are assigned to at least one task?

Solution:

As we know, n(A⋃B) = n(A) + n(B) – n(A⋂B)

Given:

  • IAI = 10 Task A
  • IBI = 15 Task B
  • IA∩BI = 5 Both tasks

Substitute the Values, We get

n(A⋃B) = 10 + 15 - 5 = 20

Thus, 20 employees are assigned to at least one task.

Question 4: In a survey of 200 people:

  • 120 likes pizza.
  • 100 like burgers.
  • 80 like tacos.
  • 60 likes both pizza and burgers.
  • 40 likes both burgers and tacos.
  • 30 likes both pizza and tacos.
  • 20 likes all three: pizza, burgers, and tacos.

How many people like at least one of these three foods?

Solution:

As we know, ∣AUBUC∣ = ∣A∣ + ∣B∣ + ∣C∣ - ∣A∩B∣ - ∣A∩C∣ - ∣B∩C∣ + ∣A∩B∩C∣

Given:

  • ∣A∣ = 120 Pizza lovers
  • ∣B∣ = 100 Burger lovers
  • ∣C∣ = 80 Taco lovers
  • ∣A∩B∣ = 60
  • ∣A∩C∣ = 30
  • ∣B∩C∣ = 40
  • ∣A∩B∩C∣ = 20

Substituting in the formula, we get,

∣AUBUC∣ = 120 + 100 + 80 - 60 - 30 - 40 + 20 = 190

Thus, 190 people like at least one of the three foods.

Question 5: In a university of 300 students:

  • 150 students take Math.
  • 120 students take Physics.
  • 100 students take Chemistry.
  • 80 students take both Math and Physics.
  • 60 students take both Physics and Chemistry.
  • 50 students take both Math and Chemistry.
  • 30 students take all three subjects.

How many students are taking at least one subject?

Solution:

As we know, ∣AUBUC∣ = ∣A∣ + ∣B∣ + ∣C∣ - ∣A∩B∣ - ∣A∩C∣ - ∣B∩C∣ + ∣A∩B∩C∣

Given:

  • ∣A∣ = 150 (Math),
  • ∣B∣ = 120 (Physics),
  • ∣C∣ = 100 (Chemistry),
  • ∣A∩B∣ = 80
  • ∣A∩C∣ = 60
  • ∣B∩C∣ = 50
  • ∣A∩B∩C∣ = 30

Substituting values, we get

∣AUBUC∣ = 150 + 120 + 100 - 80 - 60 - 50 + 30 = 210

Thus, 210 students are taking at least one subject.

Practice Problems

Question 1: In a group of 200 people:

  • 120 people like chocolate.
  • 90 people like vanilla.
  • 50 people like both chocolate and vanilla.

How many people like either chocolate or vanilla?

Question 2: In a class of 100 students:

  • 70 students play football.
  • 60 students play basketball.
  • 50 students play cricket.
  • 30 students play both football and basketball.
  • 25 students play both basketball and cricket.
  • 20 students play both football and cricket.
  • 15 students play all three sports.

How many students play at least one of these three sports?

Question 3: Out of 150 attendees at an event:

  • 80 attended Workshop A.
  • 70 attended Workshop B.
  • 40 attended both Workshop A and Workshop B.

How many people attended at least one workshop?

Question 4: A card is drawn from a deck of 52 cards. What is the probability that it is:

  • A heart,
  • A face card (King, Queen, Jack),
  • Or a red card (hearts or diamonds)?

There are 13 hearts, 12 face cards, and 26 red cards.

Note that:

  • 3 face cards are also hearts,
  • 6 face cards are red.

Question 5: In a school of 300 students:

  • 180 students are enrolled in Math.
  • 150 students are enrolled in Science.
  • 120 students are enrolled in English.
  • 90 students are enrolled in both Math and Science.
  • 80 students are enrolled in both Science and English.
  • 70 students are enrolled in both Math and English.
  • 50 students are enrolled in all three subjects.

How many students are enrolled in at least one subject?

Answer Key

  • 160 people like either chocolate or vanilla.
  • 120 students play at least one of these sports.
  • 110 people attended at least one workshop.
  • The probability is 8/13.
  • 260 students are enrolled in at least one subject.
Comment

Explore