Set Operations and Important Laws

Set Operations and Important Laws

Data Science and A.I. Lecture Series

 

Set Operations

Union

Definition:

\[ A \cup B = \{x : x \in A \text{ or } x \in B\} \]

Examples:

  • \( A = \{1, 2, 3\}, B = \{3, 4, 5\} \implies A \cup B = \{1, 2, 3, 4, 5\} \)
  • \( A = \{a, b\}, B = \{b, c, d\} \implies A \cup B = \{a, b, c, d\} \)

Intersection

Definition:

\[ A \cap B = \{x : x \in A \text{ and } x \in B\} \]

Examples:

  • \( A = \{1, 2, 3\}, B = \{3, 4, 5\} \implies A \cap B = \{3\} \)
  • \( A = \{a, b, c\}, B = \{b, c, d\} \implies A \cap B = \{b, c\} \)

Complement

Definition:

\[ A^c = \{x \in U : x \notin A\} \]

Examples:

  • \( U = \{1, 2, 3, 4, 5\}, A = \{1, 2\} \implies A^c = \{3, 4, 5\} \)
  • \( U = \{a, b, c, d\}, A = \{a, b\} \implies A^c = \{c, d\} \)

Important Laws of Sets

Idempotent and Identity Laws

Idempotent Laws:

\[ A \cup A = A, \quad A \cap A = A \]

Identity Laws:

\[ A \cup \emptyset = A, \quad A \cap U = A \]

Example:

\( A = \{1, 2\}, U = \{1, 2, 3\}, \emptyset = \{\} \)

\( A \cup \emptyset = \{1, 2\}, \quad A \cap U = \{1, 2\} \)

Distributive and De Morgan’s Laws

Distributive Laws:

\[ A \cup (B \cap C) = (A \cup B) \cap (A \cup C) \]

\[ A \cap (B \cup C) = (A \cap B) \cup (A \cap C) \]

De Morgan’s Laws:

\[ (A \cup B)^c = A^c \cap B^c \]

\[ (A \cap B)^c = A^c \cup B^c \]

Applications of Sets

Practical problems using sets:

  • \( n(A \cup B) = n(A) + n(B) – n(A \cap B) \)
  • \( n(A \cup B) = n(A – B) + n(A \cap B) + n(B – A) \)

Example: Language Proficiency

In a group of 500 persons, 400 can speak Hindi and 150 can speak English. Using formulas, the results are:

  • Both Hindi and English: \( 50 \)
  • Only Hindi: \( 350 \)
  • Only English: \( 100 \)

PDF

Set Operations and Important Laws

Video

Thank You!

Follow PostNetwork Academy for more:

 

©Postnetwork-All rights reserved.