Presentation is loading. Please wait.

Presentation is loading. Please wait.

Discrete Mathematics Dr.-Ing. Erwin Sitompul

Similar presentations


Presentation on theme: "Discrete Mathematics Dr.-Ing. Erwin Sitompul"— Presentation transcript:

1 Discrete Mathematics Dr.-Ing. Erwin Sitompul
Lecture 3 2. SETS Discrete Mathematics Dr.-Ing. Erwin Sitompul

2 Homework 2 No.1: Given the statement “A valid password is necessary for you to log on to the campus server.” a) Express the statement above in the proposition form of “if p then q.” b) Determine also the negation, converse, inverse, and contrapositive of the statement. No.2: Check the validity of the argument below: “If 5 is less than 4, then 5 is not a prime number.” “5 is not less than 4.” “5 is a prime number.”

3 Solution of Homework 2 No.1: Solution:
“A valid password is necessary for you to log on to the campus server.” q is necessary for p Solution: a) “If you can log on to the campus server, then you have a valid password.” b) Negation: “You can log on to the campus server even though you do not have a valid password.” Conversion: “If you have a valid password, then you can log on to the campus server.” Inversion: “If you cannot log on to the campus server, then you do not have a valid password.” Contrapositive: “If you do not have a valid password, then you cannot log on to the campus server.” Negation: ~(p  q)  p  ~q Conversion: q  p Inversion: ~p  ~q Contrapositive: ~q  ~p

4 Solution of Homework 2 No.2: Solution:
Check the validity of the argument below: “If 5 is less then 4, than 5 is not a prime number.” “5 is not less than 4.” “5 is a prime number.” Solution: Define: p : 5 is less than 4. q : 5 is not a prime number. Then, the above argument can be written as: p  q ~p  ~q See line 3. Conclusion ~q is false, even when all the hypotheses are right. Thus, the argument is i n v a l i d.

5 Set Terminologies A set is an unordered collection of different objects. An object in a set is denoted as element or member. A set is said to contain its elements. Example: HIPMI, HKTI, Paguyuban Pasunand, etc, PSMS, PSSI, AFC, FIFA. PUSU (PU Student Union), PUSC (PU Student Council). A set of letters (capital letter and lowercase).

6 Set Description 1. Enumeration Example:
Each member of a set is mentioned in detail. Example: The set of the first 4 natural numbers: A = { 1, 2, 3, 4 }. The set of the first 5 positive even integers: B = { 2, 4, 6, 8, 10 }. C = { cat, a, Justin, 10, nail }. R = { a, b, {a, b, c}, {a, c} }. C = { a, {a}, {{a}} }. K = { {} }, where {} is a null set. The set of the first 100 natural numbers: { 1, 2, ..., 100 }. The set of integers: {…, –2, –1, 0, 1, 2, …}.

7 Set Description Set membership Example:
x  A : x is a member of set A. x  A : x is not a member of set A. Example: Suppose A = { 1, 2, 3, 4 }, R = { a, b, {a, b, c}, {a, c} }, K ={ {} }, then: 3  A { a, b, c }  R { c }  R { }  K { }  R

8 Set Description Example:
If P1 = { a, b }, P2 = { { a, b } }, P3 = { { { a, b } } }, then a  P1 a  P2 P1  P2 P1  P3 P2  P3

9 Set Description 2. Standard Symbols
P = the set of positive integers = { 1, 2, 3, ... }. N = the set of natural numbers = { 1, 2, ... }. Z = the set of integers = { ..., –2, –1, 0, 1, 2, ... }. Q = the set of rational numbers. R = the set of real numbers. C = the set of complex numbers. A set that contains all other sets is called: set universe, and is denoted with U. Example: If U = { 1, 2, 3, 4, 5 }, then A is a member (subset) of U, where A = { 1, 3, 5 }.

10 Set Description 3. Set Builder Notation Example:
Notation: { x | properties of x }. Example: a) A is the a set of positive integer less than 5. A = { x | x is a positive integer less than 5 }. A = { x | x  P, x < 5 }. A = { 1, 2, 3, 4 }. b) M = { x | x is the student who attends the Discrete Mathematics lecture today }.

11 Set Description 4. Venn Diagram Example:
A method to graphically represent sets and the relation among them. Example: Suppose U = { 1, 2, …, 7, 8 }, A = { 1, 2, 3, 5 }, and B = { 2, 5, 6, 8 }. Venn Diagram:

12 Cardinality The cardinal of set A is defined as the number of the members in A. Notation: n(A) or A. Example: a) B = { x | x is a prime number less then 20 }, B = { 2, 3, 5, 7, 11, 13, 17, 19 }, thus B = 8. b) T = { cat, a, Justin, 10, nail}, thus T = 5. c) A = { a, {a}, {{a}} }, thus A = 3.

13 Null Set A set with cardinal equals zero is called a null set.
Notation:  or { }. Example: a) E = { x | x < x }, thus n(E) = 0  E =  or E = { }. b) P = { Indonesian people ever flied to the moon}, then n(P) = 0  P =  or P = { }. c) A = { x | x is a real root of the quadratic equation x2 + 1 = 0 }, then n(A) = 0  A =  or A = { }.

14 Subset A set A is said to be the subset of B if and only if every member of A is also a member of B. In this case, B is called as superset of A. Notation: A  B

15 Subset Example: Theorem 1. a) { 1, 2, 3 }  { 1, 2, 3, 4, 5 }.
c) N  Z  R  C. d) If A = { (x, y) | x + y < 4, x  0, y  0 } and B = { (x, y) | 2x + y < 4, x  0 and y  0 }, then B  A. Theorem 1. For an arbitrary set A, the followings apply: a) A is a subset of A itself (A  A). b) The null set is a subset of A (  A). c) If A  B and B  C, then A  C.

16 Proper and Improper Subset
In case of   A and A  A, then A is said to be improper subset of A. Example: If A = { 1, 2, 3 }, then { 1, 2, 3 } and  are improper subset of A. A  B is not the same as A  B. A  B : A is a subset of B, and A  B A is a proper subset of B). A  B : A is a subset of B, but it is still allowed that A = B (A is improper subset of B).

17 Proper and Improper Subset
Example: Given A = { 1, 2, 3 } and B = { 1, 2, 3, 4, 5 }. Determine all possibility for a set C so that A  C and C  B, that is A is a proper subset of C and C is a proper subset of B. Solution: C must contain all members of set A = { 1, 2, 3 } and at least one member of B which is not a member of A. Therefore, C = { 1, 2, 3, 4 } or C = { 1, 2, 3, 5 }. C may not contain 4 and 5 simultaneously, because C is a proper subset of B.

18 Identical Sets Example:
A = B (A is identical to B) if and only if every member of A is a member of B and conversely, every member of B is a member of A. A = B if A is a subset of B and B is a subset of A. If it not the case, then A  B. Notation: A = B  A  B and B  A Example: a) If A = { 0, 1 } and B = { x | x(x – 1) = 0 }, then A = B. b) If A = { 3, 5, 8, 5 } and B = { 5, 3, 8 }, c) If A = { 3, 5, 8, 5 } and B = { 3, 8 }, then A  B.

19 Equivalent Sets Example:
A set A is said to be equivalent with set B if and only if the cardinals of both sets are equal. Notation: A ~ B  A = B Example: If A = { 1, 3, 5, 7 } and B = { a, b, c, d }, then A ~ B, because A = B = 4.

20 Independent Sets Example:
Two sets A and B are said to be disjoint if both of them do not have any common member. Notation: A // B Example: If A = { x | x  P, x < 8 } and B = { 10, 20, 30, ... }, then A // B.

21 Power Set The power set of A is a set whose members are all subset of A, including the null set and set A itself. Notation : P(A) or 2A If A= m, then P(A)= 2m. Example: If A = { 1, 2 }, then P(A) = { , { 1 }, { 2 }, { 1, 2 }}. If T = {cat, Justin, nail}, then P(T) = { , {cat}, {Justin}, {nail}, {cat, Justin}, {cat, nail}, {Justin, nail}, {cat, Justin, nail} }.

22 Set Operations 1. Intersection Example:
Notation: A  B = { x | x  A and x  B } Example: If A = { 2, 4, 6, 8, 10 } and B = { 4, 10, 14, 18 }, then A  B = { 4, 10 }. If A = { 3, 5, 9 } and B = { –2, 6 }, then A  B = , means A // B. A   = .

23 Set Operations 2. Union Example:
Notation: A  B = { x | x  A or x  B } Example: If A = { 2, 5, 8 } and B = { 7, 5, 22 }, then A  B = { 2, 5, 7, 8, 22 }. A   = A.

24 Set Operations 3. Complement Example:
Notation: A = { x | x  U and x  A } Example: Suppose U = { a, b, c, d, e, f, g, h, i, j }. If A = { a, c, d, f, h, i }, then A = { b, e, g, j }. Suppose U = { x | x  P and x < 9 }. If B = { x | x/2  P and x < 9 }, then B = { 1, 3, 5, 7 }.

25 Set Operations Example: Suppose:
A = set of all cars made in Indonesia. B = set of all imported cars. C = set of all cars produces before 2005. D = set of all cars with market value less than Rp 150 millions. E = set of all cars owned by PU students. then: a) “All cars owned by PU students produced whether in Indonesia or imported.” b) “All cars made in Indonesia, produced before 2005, with market value less than Rp.150 millions.” c) “All imported cars, produced after 2005 which have market value more than Rp.150 millions.” (EA)(EB)  E(AB) ACD BCD

26 Set Operations 4. Difference Example:
Notation: A – B = { x | x  A and x  B } = A  B Example: If A = { 1, 2, 3, ..., 10 } and B = { 2, 4, 6, 8, 10 }, then A – B = { 1, 3, 5, 7, 9 } and B – A = . { 1, 3, 5 } – { 1, 2, 3 } = { 5 }, but { 1, 2, 3 } – { 1, 3, 5 } = { 2 }.

27 Set Operations 5. Symmetric Difference Example:
Notation: A  B = (A  B) – (A  B) = (A – B)  (B – A) Example: If A = { 2, 4, 6 } and B = { 2, 3, 5 }, then A  B = { 3, 4, 5, 6 }.

28 Set Operations Example: Suppose: U = set of all students
P = set of students with mid exam grade > 80 Q = set of students with final exam grade > 80 A student gets an A if both his/her mid and final exam grades are greater than 80, gets a B if one of the exams is greater than 80, and gets a C if both exams are less than 80. Then: a) “All students who get A.” b) “All students who get B.” c) “All students who get C.” PQ PQ U–(PQ) PQ

29 Set Operations 5. Cartesian Product Example:
Notation: A  B = { (a, b) | a  A or b  B } Example: If C = { 1, 2, 3 } and D = { a, b }, then C  D = { (1, a), (1, b), (2, a), (2, b), (3, a), (3, b) }. Suppose I = the set of all real numbers along x axis. J = the set of all real numbers along y axis. then I  J = the set of all points on xy plane.

30 Set Operations Remarks: Example:
1. If A and B are finite sets, then A  B = A.B. 2. (a, b)  (b, a). 3. A  B  B  A, where A or B may not be a null set. 4. If A =  or B = , then A  B = B  A = . Example: As given previously, C = { 1, 2, 3 } and D = { a, b }, C  D = { (1, a), (1, b), (2, a), (2, b), (3, a), (3, b) }. D  C = { (a, 1), (a, 2), (a, 3), (b, 1), (b, 2), (b, 3) }. C  D  D  C

31 Set Operations Example: Solution:
Defining A = set of food = { s=soto, g=gado-gado, f=fried rice, n=instant noodle} J = set of drinks = { c=coca-cola, t=tea, m=mineral water } How many combinations of food and drinks can be made out of the two sets above? Solution: A  B = AB = 43 = 12 combination, which are: { (s, c), (s, t), (s, m), (g, c), (g, t), (g, m), (f, c), (f, t), (f, m), (n, c), (n, t), (n, m) }.

32 Set Laws

33 Set Laws

34 Exercise Example: The next Venn diagram shows sets A, B, and C in a set universe U. Determine the regions corresponding to the following symbolic set notation: a) A  B b) B  C c) A  C d) B  A e) A  B  C f) (A  B)  C g) (A  B) – C 3,4,6,7 1,2 h) A  B i) (A – B) – C j) A – (B – C) k) (A  B)  C l) A  (B  C) m) (A  B) – C n) (A  C) – B 1,3 7 1,4,7 1,2,3,4,5,7 1,5,6,7 4,7 1,5,6,7 1 2,6,7 3,4 4,8 2,6,7

35 Homework 3 Given U = { 1, 2, 3, 4, 5, 6, 7, 8, 9 } as a set universe and the sets : A = { 1, 2, 3, 4, 5 }, B = { 4, 5, 6, 7 }, C = { 5, 6, 7, 8, 9 }, D = { 1, 3, 5, 7, 9 }, E = { 2, 4, 6, 8 }, F = { 1, 5, 9 }. Determine: a) A  C b) A  B c) A  F d) (C  D)  E e) (F – C) – A

36 Homework 3 New No.1: For the same problem as on the previous slide, determine: f) (A  B)  (C  D) i) (B –C)  F g) (E  F) – A j) (E – C)  A h) B – (C  F) No.2: Out of 35 IE students from the same batch, 15 students are considering to choose Management concentration, with 6 of them already give confirmation. Meanwhile, 25 students are thinking to join Manufacturing concentration and just 17 of them confirm already. Power Plant Management concentration is considered by 4 students and only 1 student has not confirmed yet. If no students consider all 3 concentration simultaneously, sketch the Venn diagram that can describe the situation above.


Download ppt "Discrete Mathematics Dr.-Ing. Erwin Sitompul"

Similar presentations


Ads by Google