Union & Intersection

CharliePark·2020년 9월 3일
0

TIL

목록 보기
22/67

Venn Diagram

use to show relationships between items

 

Set Operations (Union & Intersection)

AB={x  xA or xB}A \cup B = \{x\ |\ x \in A\ or\ x \in B\} : Union

AB={x  xA and xB}A \cap B = \{x\ |\ x \in A\ and\ x \in B\} : Intersection

e.g. A={1,2,3,4}, B={3,4,5,6}, then, AB={1,2,3,4,5,6}, AB={3,4}e.g.\ A = \{1, 2, 3, 4\},\ B = \{3, 4, 5, 6\},\ then,\ A \cup B = \{1, 2, 3, 4, 5, 6\},\ A \cap B = \{3, 4\}

 

 

Properties of Union and Intersection

AB=BA, AB=BAA \cup B = B \cup A,\ A \cap B = B \cap A : Commutative Law

(AB)C=A(BC), (AB)C=A(BC)(A \cup B) \cup C = A \cup (B \cup C),\ (A \cap B) \cap C = A \cap (B \cap C) : Associative Law

A(BC)=(AB)(AC), A(BC)=(AB)(AC)A \cup (B \cap C) = (A \cup B) \cap (A \cup C),\ A \cap (B \cup C) = (A \cap B) \cup (A \cap C) : Distributive Law

A{}=A, A{}={}A \cup \{ \} = A,\ A \cap \{ \} = \{ \}

AU=UA \cup U = U

AA=A,AA=AA \cup A = A, A \cap A = A : Idempotent Law

0개의 댓글