380 likes | 721 Views
Discrete Mathematics. 2. SETS. Lecture 3. Dr.-Ing. Erwin Sitompul. http://zitompul.wordpress.com. 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. ”
E N D
Discrete Mathematics 2. SETS Lecture 3 Dr.-Ing. Erwin Sitompul http://zitompul.wordpress.com
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.”
Conversion: qp q is necessary for p Negation: ~(pq) p ~q Inversion: ~p ~q Contrapositive: ~q ~p Solution of Homework 2 No.1: “A valid password is necessary for you to log on to the campus server.” 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.”
Solution of Homework 2 No.2: 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: pq ~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.
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).
Set Description 1. Enumeration 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, …}.
Set Description Set membership xA : x is a member of set A. xA : 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
Set Description Example: If P1 = { a, b },P2 = { { a, b } },P3 = { { { a, b } } }, then aP1 aP2 P1P2 P1P3 P2P3
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: setuniverse, 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 }.
Set Description 3. Set Builder Notation 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 }.
Set Description 4. Venn Diagram 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:
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.
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 }, thenn(A) = 0 A= or A= { }.
Subset A set Ais said to be the subset of Bif and only if every member of Ais also a member of B. In this case, B is called as supersetofA. Notation: AB
Subset Example: a) { 1, 2, 3 } { 1, 2, 3, 4, 5 }. b) { 1, 2, 3 } { 1, 2, 3 }. 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 }, thenBA. Theorem 1. For an arbitrary set A, the followings apply: a) A is a subset of A itself (AA). b) The null set is a subset of A (A). c) If AB and BC, then AC.
Proper and Improper Subset In case of A and AA, thenA is said to be improper subset of A. Example: If A = { 1, 2, 3 }, then { 1, 2, 3 } and are impropersubset of A. • AB is not the same as AB. • AB : A is a subset of B, and A BA is a proper subset of B). • AB : A is a subset of B, but it is still allowed that A = B (A is improper subset of B).
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 AC and CB, 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.
Identical Sets • 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 AB. • Notation: A = B AB and BA 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 }, then A = B. c) If A = { 3, 5, 8, 5 } and B = {3, 8}, then AB.
Equivalent Sets • 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.
Independent Sets • 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.
Power Set • The powersetof Ais a set whose members are all subset of A, including the null set and set Aitself. • 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}}.
Set Operations 1. Intersection Notation: AB = { x|xA and xB } • Example: • If A = {2, 4, 6, 8, 10}and B = {4, 10, 14, 18}, • then AB = {4, 10}. • If A = { 3, 5, 9 } and B = { –2, 6 }, then AB= , means A // B. • A = .
Set Operations 2. Union Notation: AB = { x|xAorxB } • Example: • If A = { 2, 5, 8 } and B = { 7, 5, 22 }, • then AB = { 2, 5, 7, 8, 22 }. • A= A.
Set Operations 3. Complement Notation:A= { x|xUandxA } • 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|xPandx < 9 }. If B = { x|x/2Pandx < 9 }, thenB = { 1, 3, 5, 7 }.
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.” (EA)(EB) E(AB) ACD BCD
Set Operations 4. Difference Notation:A – B= { x|xAandxB }=A B • Example: • IfA = { 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}.
Set Operations 5. Symmetric Difference Notation:AB = (AB) – (AB) = (A – B) (B – A) Example: IfA = { 2, 4, 6 } and B = { 2, 3, 5 }, then AB = { 3, 4, 5, 6 }.
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.” PQ PQ U–(PQ) PQ
Set Operations 5. Cartesian Product Notation: AB = { (a, b)|aAorbB } • Example: • If C = { 1, 2, 3 } and D = { a, b }, • then CD = { (1, a), (1, b), (2, a), (2, b), (3, a), (3, b) }. • SupposeI = 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.
Set Operations Remarks: 1. If A and B are finite sets, then AB = A.B. 2. (a, b) (b, a). 3. AB BA, where A or B may not be a null set. 4. If A = or B = , then AB = BA = . • Example: • As given previously, C = { 1, 2, 3 } and D = { a, b }, • CD = { (1, a), (1, b), (2, a), (2, b), (3, a), (3, b) }. • DC = { (a, 1), (a, 2), (a, 3), (b, 1), (b, 2), (b, 3) }. • CD DC
Set Operations Example: DefiningA = 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 = AB = 43 = 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) }.
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) AB b) BC c) AC d) B A e) AB C f) (AB)C g) (AB)–C 3,4,6,7 h) AB i) (A –B) – C j) A –(B – C) k) (AB) C l) A(BC) m) (AB) – C n) (AC) – B 1,2 7 1,3 1,4,7 1,2,3,4,5,7 1,5,6,7 4,7 1,5,6,7 1 3,4 2,6,7 4,8 2,6,7
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) AC b) AB c) AF d) (CD) E e) (F –C) – A
Homework 3 No.1: For the same problem as on the previous slide, determine: f) (AB) (CD) i) (B –C) F g) (EF) – A j) (E –C) A h) B – (C F) New No.2: Out of 35 IE students from the same batch, 15 students are considering to choose Managementconcentration, with 6 of them already give confirmation. Meanwhile, 25 students are thinking to join Manufacturingconcentration and just 17 of them confirm already. Power Plant Managementconcentration 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.