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.

Slides:



Advertisements
Similar presentations
Discrete Mathematics I Lectures Chapter 6
Advertisements

Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
The Engineering Design of Systems: Models and Methods
Sets DISCRETE STRUCTURE ABDUL BASIT TAHIR, KAMRAN ALI, FAIZAN ILLAHI, NOMAN AHMAD, ARSALAN MUBASHIR.
Analytical Methods in CS (CIS 505)
EE1J2 – Discrete Maths Lecture 7
Chapter 2 The Basic Concepts of Set Theory
Sets 1.
Sets 1.
Sets. Copyright © Peter Cappello Definition Visualize a dictionary as a directed graph. Nodes represent words If word w is defined in terms of word.
Discrete Math 6A Max Welling. Recap 1. Proposition: statement that is true or false. 2. Logical operators: NOT, AND, OR, XOR, ,  3. Compound proposition:
1 Learning Objectives for Section 7.2 Sets After today’s lesson, you should be able to Identify and use set properties and set notation. Perform set operations.
SETS A set B is a collection of objects such that for every object X in the universe the statement: “X is a member of B” Is a proposition.
Mathematics.
Sets.
This section will discuss the symbolism and concepts of set theory
1.1 Sets and Logic Set – a collection of objects. Set brackets {} are used to enclose the elements of a set. Example: {1, 2, 5, 9} Elements – objects inside.
A Brief Summary for Exam 1 Subject Topics Propositional Logic (sections 1.1, 1.2) –Propositions Statement, Truth value, Proposition, Propositional symbol,
Chapter 3 – Set Theory  .
Set, Combinatorics, Probability & Number Theory Mathematical Structures for Computer Science Chapter 3 Copyright © 2006 W.H. Freeman & Co.MSCS Slides Set,
CS 103 Discrete Structures Lecture 10 Basic Structures: Sets (1)
Discrete Mathematics and Its Applications Sixth Edition By Kenneth Rosen Copyright  The McGraw-Hill Companies, Inc. Permission required for reproduction.
Chapter 7 Logic, Sets, and Counting Section 2 Sets.
Barnett/Ziegler/Byleen Finite Mathematics 11e1 Chapter 7 Review Important Terms, Symbols, Concepts 7.1. Logic A proposition is a statement (not a question.
Discrete Structure Sets. 2 Set Theory Set: Collection of objects (“elements”) a  A “a is an element of A” “a is a member of A” a  A “a is not an element.
DISCRETE COMPUTATIONAL STRUCTURES
Mathematical Proofs. Chapter 1 Sets 1.1 Describing a Set 1.2 Subsets 1.3 Set Operations 1.4 Indexed Collections of Sets 1.5 Partitions of Sets.
Chapter 2: Basic Structures: Sets, Functions, Sequences, and Sums (1)
1. Set Theory Set: Collection of objects (“elements”) a  A “a is an element of A” “a is a member of A” a  A “a is not an element of A” A = {a 1, a 2,
CompSci 102 Discrete Math for Computer Science
Section 2.2 Subsets and Set Operations Math in Our World.
Section 2.1. Section Summary Definition of sets Describing Sets Roster Method Set-Builder Notation Some Important Sets in Mathematics Empty Set and Universal.
ELEMENTARY SET THEORY.
Chapter SETS DEFINITION OF SET METHODS FOR SPECIFYING SET SUBSETS VENN DIAGRAM SET IDENTITIES SET OPERATIONS.
Sets Goal: Introduce the basic terminology of set theory.
Chapter 2 With Question/Answer Animations. Section 2.1.
Rosen 1.6, 1.7. Basic Definitions Set - Collection of objects, usually denoted by capital letter Member, element - Object in a set, usually denoted by.
Discrete Mathematics SETS. What is a set? ^A set is a unordered collection of “objects”  People in a class: {A yşe, B arış, C anan }  Cities in Turkey.
(CSC 102) Lecture 13 Discrete Structures. Previous Lectures Summary  Direct Proof  Indirect Proof  Proof by Contradiction  Proof by Contra positive.
Sets Definition: A set is an unordered collection of objects, called elements or members of the set. A set is said to contain its elements. We write a.
Discrete Mathematics Set.
Module #3 - Sets 3/2/2016(c) , Michael P. Frank 2. Sets and Set Operations.
Set Operations Section 2.2.
Discrete Mathematics Lecture # 10 Venn Diagram. Union  Let A and B be subsets of a universal set U. The union of sets A and B is the set of all elements.
Section 2.1. Sets A set is an unordered collection of objects. the students in this class the chairs in this room The objects in a set are called the.
Chapter 2 1. Chapter Summary Sets (This Slide) The Language of Sets - Sec 2.1 – Lecture 8 Set Operations and Set Identities - Sec 2.2 – Lecture 9 Functions.
Introduction to Set Theory (§1.6) A set is a new type of structure, representing an unordered collection (group, plurality) of zero or more distinct (different)
CPCS 222 Discrete Structures I
Sets.
Dr. Ameria Eldosoky Discrete mathematics
Applied Discrete Mathematics Week 1: Logic and Sets
Sets Finite 7-1.
Set Definition: A set is unordered collection of objects.
Chapter 1: Foundations: Sets, Logic, and Algorithms
CHAPTER 3 SETS, BOOLEAN ALGEBRA & LOGIC CIRCUITS
The Language of Sets If S is a set, then
CSNB 143 Discrete Mathematical Structures
Set, Combinatorics, Probability & Number Theory
Sets Section 2.1.
Taibah University College of Computer Science & Engineering Course Title: Discrete Mathematics Code: CS 103 Chapter 2 Sets Slides are adopted from “Discrete.
Exercises Show that (P  Q)  (P)  (Q)
CS100: Discrete structures
2.1 Sets Dr. Halimah Alshehri.
Sets. EXAMPLE 1 The set O of odd positive integers less than 10 can be expressed by O = { l, 3, 5, 7, 9}. * This way of describing a set is known as.
Discrete Mathematics CS 2610
Discrete Mathematics Dr.-Ing. Erwin Sitompul
Chapter 7 Logic, Sets, and Counting
Lecture Sets 2.2 Set Operations.
Sets & Set Operations.
Presentation transcript:

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.”

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

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.

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 }

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

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 }.

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.

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.

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 = { }.

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.

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.

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.

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.

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.

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.

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} }.

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 = .

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   = .

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.

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 }.

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 }.

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 }.

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 2015. 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

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

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|.

Chapter 2 Sets Set Laws

Chapter 2 Sets Set Laws

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

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

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.