Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 1 Logic and Proofs Homework 2 Given the statement “A valid password is necessary for you to log on to the campus server.” Express the statement.

Similar presentations


Presentation on theme: "Chapter 1 Logic and Proofs Homework 2 Given the statement “A valid password is necessary for you to log on to the campus server.” Express the statement."— Presentation transcript:

1

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

3 Chapter 1 Logic and Proofs Solution to Homework 2 “A valid password is necessary for you to log on to the campus server.” “if p then q.” “If you can log on to the campus server, then you have a valid password.” Negation: “You can log on to the campus server even though you do not have a valid password.” Converse “If you have a valid password, then you can log on to the campus server.” Inverse “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.” ·q is necessary for p ·Negation: (p  q)  p  q ·Converse: q  p ·Inverse: p  q ·Contrapositive: q  p

4 Chapter 1 Logic and Proofs Solution to Homework 2 “If 5 is less then 4, then 5 is not a prime number.” “5 is not less then 4.” “Therefore, 5 is a prime number.” p  q p  q p q p q p q [(p  q)  p]  q T F The last column is not a tautology. Thus, the argument is not valid.

5 Chapter 2 Sets Set Terminologies In Discrete Mathematics, we study about discrete objects and discrete structures. Many discrete structures (such as combinations, relations, and graphs) are built using sets. A set is an unordered collection of different objects. These objects are denoted as elements or members of the set. A set is said to contain its elements / members. Examples of set: Vowels in Latin alphabet: V = { a, e, i, o, u } First seven prime numbers: X = { 2, 3, 5, 7, 11, 13, 17 }

6 Set Description Membership to a set is denoted as:
Chapter 2 Sets Set Description Membership to a set is denoted as: x  A : x is a member of set A. x  A : x is not a member of set A. Example: If 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

7 Representing Sets Representing a set can be done by:
Chapter 2 Sets Representing Sets Representing a set can be done by: Listing (enumerating) the members of the set. Definition by property, using the set builder notation. Notation: { x | properties of x }. Venn diagram Example: A set of even integers between 50 and 63 can be represented by E = { 50, 52, 54, 56, 58, 60, 62 } ·Enumeration E = { x | 50 ≤ x ≤ 63, x is an even integer} ·Set builder notation If enumeration of the members is difficult, we often use ellipses. A set of integers between 1 and 100 can be represented as: B = { 1, 2, 3, …, 100 }. A set containing all students who are present today can be represented as M = { x | x is the student who attends the Discrete Mathematics lecture today }.

8 Chapter 2 Sets Set Description Venn diagram is a method to graphically represent sets and the relation among them. Example: Suppose U = { 1, 2, …, 7, 8 }, with the subsets A = { 1, 2, 3, 5 } and B = { 2, 5, 6, 8 } can be represented by the Venn diagram.

9 Chapter 2 Sets Important Sets Important sets in Discrete Mathematics are represented by 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, ... }. Z+ = the set of positive integers = { 1, 2, 3,... } = N. Q = the set of rational numbers = { p/q | p  Z, q  Z, q ≠ 0 }. R = the set of real numbers. C = the set of complex numbers.

10 Chapter 2 Sets Special Sets A set that contains all objects under consideration is called universal set, denoted by U. For example, if universal set U = { 1, 2, 3, 4, 5 }, then set A = { 1, 3, 5 } is a member (subset) of U. A set that contains no member is called empty set (null set), denoted by  or { }. For example, E = { x | x > x + 1 } means that E =  or E = { }. Or if P = { Indonesian citizen who ever walks on the moon }, then P =  or P = { }.

11 Chapter 2 Sets Cardinality Let S be a set. If there are exactly n distinct elements in S, where n is a non-negative integer, we say S is a finite set and that n is the cardinality of S. The cardinality of S is denoted by n(S) or S. Examples: B = { x | x is a prime number less then 20 }, B = { 2, 3, 5, 7, 11, 13, 17, 19 }, thus B = 8. T = { 0, 1, 2, …, 20 }, thus T = 21.  = 0.

12 Chapter 2 Sets Subset A set A is said to be a subset of B if and only if every element of A is also an element of B. We use A  B to indicate that A is a subset of B. Empty set is a subset of any set,   S. Any set S is a subset of itself, S  S. If A  B and B  C, then A  C.

13 Chapter 2 Sets Subset Example: { 1, 2, 3 }  { 1, 2, 3, 4, 5 }. { 1, 2, 3 }  { 1, 2, 3 }. N  Z  R  C. 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.

14 Chapter 2 Sets Proper Subset A set A is said to be a proper subset of B if and only if A  B and A ≠ B. We denote that A is a proper subset of B with the notation A  B. Example: If A = { 1, 2, 3 }, B ={ 1, 2, 3, 4, 5 }, then A is a proper subset of B, A  B. Example: If A = { 1, 2, 3 }, C ={ 1, 2, 3 }, then A is not a proper subset of C, but still A is a subset of C, A  C.

15 Chapter 2 Sets 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 is not the case, then A  B. Notation: A = B  A  B and B  A. Example: If A = { 0, 1 } and B = { x | x(x – 1) = 0 }, then A = B. If A = { 3, 5, 8, 5 } and B = { 5, 3, 8 }, then A = B. If A = { 3, 5, 8, 5 } and B = { 3, 8 }, then A  B.

16 Chapter 2 Sets 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.

17 Chapter 2 Sets Power Set Given a set A, the power set of A is the set of all subsets 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} }.

18 Chapter 2 Sets Disjoint Sets Two sets A and B are said to be disjoint if both of them do not have any common member. That means, their intersection is empty. Notation: A // B if and only if A  B = . Example: If A = { x | x  P, x < 8 } and B = { 10, 20, 30, ... }, then A // B and A  B = .

19 Set Operations: Intersection
Chapter 2 Sets Set Operations: Intersection Let A and B be sets. The intersection of A and B, denoted by A  B, is the set that contains those elements that are in both A and B. 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   = .

20 Chapter 2 Sets Set Operations: Union Let A and B be sets. The union of A and B, denoted by A  B, is the set that contains those elements that are either in A or in B, or in both A and B. 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.

21 Set Operations: Complement
Chapter 2 Sets Set Operations: Complement Let A be a set in the universal set U. The complement of A, denoted by A, is a set that contains all element of U which is not in A. 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 }. If U = { x | x  P and x < 9 } and B = { x | x/2  P and x < 9 }, then B = { 1, 3, 5, 7 }.

22 Set Operations: Difference
Chapter 2 Sets Set Operations: Difference Let A and B be sets. The difference of A and B, denoted by A – B, is the set that contains those elements that are in A but not in B. The difference of A and B is also called the complement of B w. r. t. A. 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 }. { 1, 2, 3 } – { 1, 3, 5 } = { 2 }.

23 Set Operations: Symmetric Difference
Chapter 2 Sets Set Operations: Symmetric Difference Let A and B be sets. The symmetric difference of A and B, denoted by A  B, is the set that contains those elements that are in A or in B, but not in both. 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 }.

24 Example 1: Set Operations
Chapter 2 Sets Example 1: Set Operations Example: Suppose that: A = set of all cars made in Indonesia. B = set of all imported cars. C = set of all cars produces before D = set of all cars with market value less than Rp 150 millions. E = set of all cars owned by PU lecturers. Express the following statements using set operation notations. “All cars owned by PU lecturers produced whether in Indonesia or imported.” “All cars made in Indonesia, produced before 2015, with market value more than Rp.150 millions.” “All imported cars, produced after 2015 which have market value less than Rp.150 millions.” (EA)(EB)  E(AB) ACD BCD

25 Example 2: Set Operations
Chapter 2 Sets Example 2: Set Operations Example: Suppose that: 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 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. Express the following statements using set operation notations. “All students who get A.” “All students who get B.” “All students who get C.” P  Q P  Q U – ( P  Q )  P  Q

26 Chapter 2 Sets Cartesian Product Let A and B be sets. The Cartesian product of A and B, denoted by A × B, is the set of all ordered pairs ( a,b ), where a  A and b  B. 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 ) } and D × C = { ( a,1 ), ( a,2 ), ( a,3 ), ( b,1 ), ( b,2 ), ( b,3 ) }. Note that C × D ≠ D × C If A and B are finite sets, then the cardinality of the Cartesian product is given by |A × B| = |A|·|B|.

27 Chapter 2 Sets Set Laws

28 Chapter 2 Sets Set Laws

29 Example 3: Set Operations
Chapter 2 Sets Example 3: Set Operations 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  B B  C A  C B  A A  B  C (A  B)  C (A  B) – C A  B (A – B) – C A – (B – C) (A  B)  C A  (B  C) (A  B) – C (A  C) – B 1,2 1,3 1,2,3,4,5,7 4,7 1 2,6,7 3,4,6,7 7 1,4,7 1,5,6,7 3,4 4,8

30 Chapter 2 Sets 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  C A  B A  F (C  D)  E (F – C) – A

31 Homework 3A For the same sets as given in Homework 3, determine:
Chapter 2 Sets Homework 3A For the same sets as given in Homework 3, determine: (A  B)  (C  D) (B –C)  F (E  F) – A (E – C)  A B – (C  F) 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 "Chapter 1 Logic and Proofs Homework 2 Given the statement “A valid password is necessary for you to log on to the campus server.” Express the statement."

Similar presentations


Ads by Google