1 of 12

Matematika Diskrit

Rahmat Hidayat, S.Kom., M.Cs

Muhammad Galih Wonoseto, M.T.

2. Operasi Himpunan

2 of 12

Tujuan Pembelajaran

  • Mahasiswa memahami Operasi Himpunan Union, Intersection dan Complement

3 of 12

Union

  • The union of two sets A and B is the set that contains all elements in A, B or both. We write A ∪ B = {x | (x ∈ A) ∨ (x ∈ B)}
  • A= {5, 7, 9}, B = {5, 6, 8}
  • A ∪ B = {5, 6, 7, 8, 9}

4 of 12

Intersection

  • The intersection of two sets A and B is the set that contains all elements that are elements of both A and B
  • We write A ∩ B = {x | (x ∈ A) ∧ (x ∈ B)}
  • A= {5, 7, 9}, B = {5, 6, 8}
  • A ∩ B = {5}
  • |A ∪ B|=|A|+|B|−|A ∩ B|.

5 of 12

Disjoint Sets

  • Two sets are said to be disjoint if their intersection is the empty set: A ∩ B = ∅
  • A= {5, 7, 9}, B = {4, 6, 8}
  • A & B are Disjoint

6 of 12

Difference

  •  

$a\in\xnot b

7 of 12

Complement

  •  

8 of 12

Generalized Union and Intersection

  •  

9 of 12

Computer representation of sets

 

10 of 12

Bit vectors

  • U = {2, 3, 4, 5, 6, 7, 8, 9}
  • A = {8, 6, 9, 9}
  • bit vector A = 0000 1011 What’s the empty set? What’s U?

11 of 12

Union Intersection Bit vectors

  • U dan A (seperti slide sebelumnya)
  • B = {2, 3, 4}
  • Bit vector B = 1110 0000.
  • A ∪ B : 0000 1011 ∨ 1110 0000 = 1110 1011
  • A ∩ B : 0000 1011 ∧ 1110 0000 = 0000 0000
  • Maka A ∪ B dan A ∩ B ?

12 of 12

Pustaka

  • Rosen
  • Ken Bogart
  • Nebraska