Teori Himpunan

22 downloads 1121 Views 97KB Size Report
2. Teori Himpunan. • Himpunan: Kumpulan objek (konkrit atau abstrak) yang mempunyai syarat tertentu dan jelas, bisanya dinyatakan dengan huruf besar.
Teori Himpunan Bagian III 1

Teori Himpunan • Himpunan: Kumpulan objek (konkrit atau abstrak) yang mempunyai syarat tertentu dan jelas, bisanya dinyatakan dengan huruf besar. • a∈ A

“a anggota dari A”

• a∉ A

“a bukan anggota dari A”

• A = {a1, a2, …, an} “A memuat…” 2

Cara menyatakan himpunan a. Mendaftar b. Menyatakan sifat-sifat yang dipenuhi oleh anggota. c. Notasi pembentuk himpunan

3

Notasi Pembentuk Himpunan Format: “sedemikian hingga” {[struktur keanggotaan] | [syarat perlu untuk menjadi anggota]} Contoh: Q = {m/n : m,n ∈ Z, n≠0} – Q adalah himpunan bilangan rasional – Elemen-elemennya berstruktur m/n; harus memenuhi sifat setelah tanda “:” untuk menjadi anggota. {x ∈ R | x2 = 1} = {-1,1} 4

Contoh Himpunan: N – himpunan bil. Cacah = {0,1,2,3,4, …} P atau Z+ - himp. Bil. Bulat positif = {1,2,3,4, …} Z – himpunan bil. bulat R – himpunan bil. real φ or {} – himpunan kosong U – himpunan semesta, himp. yang memuat semua element yang dibicarakan.

5

Contoh Himpunan • A=∅

“empty set/null set”

• A = {z}

Note: z∈A, but z ≠ {z}

• A = {{b, c}, {c, x, d}} • A = {{x, y}} Note: {x, y} ∈A, but {x, y} ≠ {{x, y}} • A = {x | P(x)} “set of all x such that P(x)” • A = {x | x∈N ∧ x > 7} = {8, 9, 10, …} “set builder notation” 6

Relasi Antar Himpunan 1. 2. 3. 4. 5.

Himpunan yang Sama Himpunan Bagian Himpunan yang berpotongan Himpunan Saling Lepas Himpunan yang Ekuivalen

7

Himpunan yang Sama ( Set Equality) Himp. A and B dikatakan sama jika keduanya memuat anggotaanggota yang tepat sama. A = B ⇔ { x | x ∈A ↔ x ∈B} atau A = B ⇔ A ⊂ B ∧ B ⊂ A Contoh:

• A = {9, 2, 7, -3}, B = {7, 9, -3, 2} :

A=B

• A = {dog, cat, horse}, B = {cat, horse, squirrel, dog} :

A≠B

• A = {dog, cat, horse}, B = {cat, horse, dog, dog} :

A=B 8

Himpunan Bagian A⊆B A⊆B

“A adalah himpunan bagian dari B” jika setiap anggota A juga merupakan anggota B.

A ⊆ B ⇔ ∀x (x∈A → x∈B) Contoh: A = {3, 9}, B = {5, 9, 1, 3},

A ⊆ B ? benar

A = {3, 3, 3, 9}, B = {5, 9, 1, 3}, A ⊆ B ? benar A = {1, 2, 3}, B = {2, 3, 4},

A ⊆ B ? Salah 9

Himpunan Bagian

Sifat: • A = B ⇔ (A ⊆ B) ∧ (B ⊆ A) • (A ⊆ B) ∧ (B ⊆ C) ⇒ A ⊆ C (Lihat Venn Diagram)

U B

A

C

10

Himpunan Bagian Useful rules: • ∅ ⊆ A for any set A • A ⊆ A for any set A Proper subsets (Himpunan Bagian Sejati): A ⊂ B “A is a proper subset of B” A ⊂ B ⇔ ∀x (x∈A → x∈B) ∧ ∃x (x∈B ∧ x∉A) or A ⊂ B ⇔ ∀x (x∈A → x∈B) ∧ ¬∀x (x∈B → x∈A) 11

Dua himpunan A dan B dikatakan berpotongan, ditulis A)(B, jika ada anggota A yang menjadi anggota B. A)(B ⇔ ∃x (x ∈A ∧ x ∈ B)

Himpunan A dan B dikatakan saling lepas (A//B), jika A ≠ ∅, B ≠ ∅, ∀x (x ∉ A ∨ x ∉ B) Himpunan A dan B yang Ekuivalen, A∼B, jika setiap anggota A dapat dipasangkan (dikorespondensikan) satu-satu dengan anggota B Buat Contoh Masing-masing!!!

12

Latihan 1. Buktikan jika M ⊂ ∅, maka M = ∅. 2. A = {1,2,3,4}; B = himpunan bilangan ganjil. Buktikan A ⊄ B. 3. Buktikan A ⊂ B, B ⊂ C → A ⊂ C. 4. Buktikan K ⊂ L, L ⊂ M, M ⊂ K → K = M. 13

Interval Notation - Special notation for subset of R [a,b] = {x ∈ R | a ≤ x ≤ b} (a,b) = {x ∈ R | a < x < b} [a,b) = {x ∈ R | a ≤ x < b} (a,b] = {x ∈ R | a < x ≤ b} How many elements in [0,1]? In (0,1)? In {0,1}

14

Operasi Himpunan B (B complement)

B

– {x | x∈U ∧ x∉B} – Everything in the Universal set that is not in B

A ∪ B (A union B)

– {x | x∈A ∨ x∈B} – Like inclusive or, can be in A or B or both

A

B

15

A ∩ B (A intersect B)

• {x | x∈A ∧ x∈B} • A and B are disjoint if A ∩ B = Φ

A - B (A minus B or difference) • •

{x | x∈A ∧ x∉B} A-B = A∩B

A⊕B (symmetric difference) • •

{x | x∈A ⊕ x∈B} = (A∪B) - (A∩B) We have overloaded the symbol ⊕. Used in logic to mean exclusive or and in sets to mean symmetric difference 16

Contoh Let A = {n2 | n∈P ∧ n≤4} = {1,4,9,16} Let B = {n4 | n∈P ∧ n≤4} = {1,16,81,256} A∪B = {1,4,9,16,81,256} A∩B = {1,16} A-B = {4,9} B-A = {81, 256} A⊕B = {4,9,81,256} 17

Cardinality of Sets If a set S contains n distinct elements, n∈N, we call S a finite set with cardinality n. Examples: A = {Mercedes, BMW, Porsche}, |A| = 3 B = {1, {2, 3}, {4, 5}, 6} C=∅ D = { x∈N | x ≤ 7000 }

|B| = 4 |C| = 0 |D| = 7001

E = { x∈N | x ≥ 7000 }

E is infinite! 18

The Power Set P(A) “power set of A” P(A) = {B | B ⊆ A} (contains all subsets of A) Examples: A = {x, y, z} P(A) = {∅, {x}, {y}, {z}, {x, y}, {x, z}, {y, z}, {x, y, z}} A=∅ P(A) = {∅} Note: |A| = 0, |P(A)| = 1 19

The Power Set Cardinality of power sets: | P(A) | = 2|A| • Imagine each element in A has an “on/off” switch • Each possible switch configuration in A corresponds to one element in 2A A x y z

1 x y z

2 x y z

3 x y z

4 x y z

5 x y z

6 x y z

7 x y z

8 x y z

• For 3 elements in A, there are 2×2×2 = 8 elements in P(A) 20

Cartesian Product The ordered n-tuple (a1, a2, a3, …, an) is an ordered collection of objects. Two ordered n-tuples (a1, a2, a3, …, an) and (b1, b2, b3, …, bn) are equal if and only if they contain exactly the same elements in the same order, i.e. ai = bi for 1 ≤ i ≤ n. The Cartesian product of two sets is defined as: A×B = {(a, b) | a∈A ∧ b∈B} Example: A = {x, y}, B = {a, b, c} A×B = {(x, a), (x, b), (x, c), (y, a), (y, b), (y, c)} 21

Cartesian Product The Cartesian product of two sets is defined as: A×B = {(a, b) | a∈A ∧ b∈B} Example: A = {good, bad}, B = {student, prof}

}

A×B = { (good, student), (good, prof),

(bad, student), (bad, prof)

B×A = { (student, good), (prof, good),

(student, bad), (prof, bad)

}

22

Cartesian Product Note that: • A×∅ = ∅ • ∅×A = ∅ • For non-empty sets A and B: A≠B ⇔ A×B ≠ B×A • |A×B| = |A|⋅|B| The Cartesian product of two or more sets is defined as: A1×A2×…×An = {(a1, a2, …, an) | ai∈A for 1 ≤ i ≤ n} 23

Set Operations Union: A∪B = {x | x∈A ∨ x∈B} Example: A = {a, b}, B = {b, c, d} A∪B = {a, b, c, d} Intersection: A∩B = {x | x∈A ∧ x∈B} Example: A = {a, b}, B = {b, c, d} A∩B = {b} 24

Set Operations Two sets are called disjoint if their intersection is empty, that is, they share no elements: A ∩B = ∅ The difference between two sets A and B contains exactly those elements of A that are not in B: A-B = {x | x∈A ∧ x∉B} Example: A = {a, b}, B = {b, c, d}, A-B = {a}

25

Set Operations The complement of a set A contains exactly those elements under consideration that are not in A: Ac = U-A Example: U = N, B = {250, 251, 252, …} Bc = {0, 1, 2, …, 248, 249}

26

Set Operations Table 1 in Section 1.5 shows many useful equations. How can we prove A∪(B∩C) = (A∪B)∩(A∪C)? Method I: x∈A∪(B∩C) ⇔ x∈A ∨ x∈(B∩C) ⇔ x∈A ∨ (x∈B ∧ x∈C) ⇔ (x∈A ∨ x∈B) ∧ (x∈A ∨ x∈C) (distributive law for logical expressions) ⇔ x∈(A∪B) ∧ x∈(A∪C) ⇔ x∈(A∪B)∩(A∪C) 27

Set Operations Method II: Membership table 1 means “x is an element of this set” 0 means “x is not an element of this set” A B C B∩C

A∪(B∩C)

A ∪B

A ∪C

(A∪B) ∩(A∪C)

0 0 0

0

0

0

0

0

0 0 1

0

0

0

1

0

0 1 0

0

0

1

0

0

0 1 1

1

1

1

1

1

1 0 0

0

1

1

1

1

1 0 1

0

1

1

1

1

1 1 0

0

1

1

1

1

1 1 1

1

1

1

1

1 28

Sifat Operasi Himpunan 1.

Asosiatif: (A∪B) ∪ C = A∪(B ∪ C) (A∩B) ∩C = A∩(B∩C)

2. Idempoten: A∪A = A; A∩ A = A 3. Identitas: A∪S = S; A∩ S = A A∪ ∅ = A; A∩ ∅ = ∅ 4. Distributif: A∪(B ∩ C) = (A∪B) ∩(A ∪ C) A ∩(B ∪ C) = (A∩B)∪(A ∩ C) 5. Komplementer: A∪A’ = S; A ∩ A’ = ∅ 6. De Morgan: (A∪B)’ = A’∩B’ (A∩B)’ = A’ ∪ B’ 7. Penyerapan: A∪(A∩B) = A A∩(A∪B) = A

29

Latihan 1. Buktikan A∩(B∪C) = (A∩B)∪(A ∩ C) 2. Buktikan A-(B∪C) = (A-B)∩(A-C) 3. Bila A ⊂ B, buktikan A∩B = A dan A∪ B = B 4. Buktikan (A∪B) x C = (AxC)∪(BxC)

30