Sets DISCRETE STRUCTURE ABDUL BASIT TAHIR, KAMRAN ALI, FAIZAN ILLAHI, NOMAN AHMAD, ARSALAN MUBASHIR.

Slides:



Advertisements
Similar presentations
Learning Objectives for Section 7.2 Sets
Advertisements

Lecture 2 Introduction To Sets CSCI – 1900 Mathematics for Computer Science Fall 2014 Bill Pine.
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
Section 1.6: Sets Sets are the most basic of discrete structures and also the most general. Several of the discrete structures we will study are built.
2.1 Sets. DEFINITION 1 A set is an unordered collection of objects. DEFINITION 2 The objects in a set are called the elements, or members, of the set.
Denoting the beginning
Analytical Methods in CS (CIS 505)
Chapter 2 The Basic Concepts of Set Theory
Sets 1.
CSE115/ENGR160 Discrete Mathematics 02/10/11 Ming-Hsuan Yang UC Merced 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.
Ch 9 Inequalities and Absolute Value
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.
Mathematics.
Sets.
Set Notation.
This section will discuss the symbolism and concepts of 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)
Chapter 7 Logic, Sets, and Counting Section 2 Sets.
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.
CS201: Data Structures and Discrete Mathematics I
Chapter 2: Basic Structures: Sets, Functions, Sequences, and Sums (1)
CompSci 102 Discrete Math for Computer Science
Section 2.1. Section Summary Definition of sets Describing Sets Roster Method Set-Builder Notation Some Important Sets in Mathematics Empty Set and Universal.
Sets Digital Lesson. Copyright © by Houghton Mifflin Company, Inc. All rights reserved. 2 Definition of Set A set is a collection of objects called elements.
ELEMENTARY SET THEORY.
Chapter SETS DEFINITION OF SET METHODS FOR SPECIFYING SET SUBSETS VENN DIAGRAM SET IDENTITIES SET OPERATIONS.
Set Operations Chapter 2 Sec 3. Union What does the word mean to you? What does it mean in mathematics?
Definition of a Set DM is study of discrete structures. Fundamental discrete structure upon which most of other discrete structures are built is the sets.
Chapter 2 With Question/Answer Animations. Section 2.1.
Basic Structures: Sets, Functions, Sequences, and Sums.
1 Chapter Two Basic Concepts of Set Theory –Symbols and Terminology –Venn Diagrams and Subsets.
Discrete Mathematics Lecture # 10. Set Theory  A well defined collection of {distinct} objects is called a set.  The objects are called the elements.
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.
Unit :1 Set Theory Prof. A.J. SHAKADWIPI. Sets and Subsets A well-defined collection of objects. finite sets, infinite sets, subset A={1,3,5,7,9} B={x|x.
Module #3 - Sets 3/2/2016(c) , Michael P. Frank 2. Sets and Set Operations.
MATH 2311 Section 2.2. Sets and Venn Diagrams A set is a collection of objects. Two sets are equal if they contain the same elements. Set A is a subset.
Discrete Mathematics CS 2610 August 31, Agenda Set Theory Set Builder Notation Universal Set Power Set and Cardinality Set Operations Set Identities.
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.
Sets and Operations TSWBAT apply Venn diagrams in problem solving; use roster and set-builder notation; find the complement of a set; apply the set operations.
CPCS 222 Discrete Structures I
Section 6.1 Set and Set Operations. Set: A set is a collection of objects/elements. Ex. A = {w, a, r, d} Sets are often named with capital letters. Order.
CSE15 Discrete Mathematics 02/13/17
The set of whole numbers less than 7 is {1, 2, 3, 4, 5, 6}
Sets Page 746.
Set Definition: A set is unordered collection of objects.
CHAPTER 3 SETS, BOOLEAN ALGEBRA & LOGIC CIRCUITS
Sets Section 2.1.
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.
ALGEBRA II H/G - SETS : UNION and INTERSECTION
Taibah University College of Computer Science & Engineering Course Title: Discrete Mathematics Code: CS 103 Chapter 2 Sets Slides are adopted from “Discrete.
CS100: Discrete structures
Set and Set Operations Grab a sheet from front.
        { } Sets and Venn Diagrams Prime Numbers Even Numbers
2.1 Sets Dr. Halimah Alshehri.
CHAPTER 1 - Sets and Intervals
CHAPTER 1 - Sets and Intervals
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
Chapter 7 Logic, Sets, and Counting
ALGEBRA II H/G - SETS : UNION and INTERSECTION
2.1 – Symbols and Terminology
Lecture Sets 2.2 Set Operations.
Introduction A set is a collection of objects.
3-5 Working with Sets.
Presentation transcript:

Sets DISCRETE STRUCTURE ABDUL BASIT TAHIR, KAMRAN ALI, FAIZAN ILLAHI, NOMAN AHMAD, ARSALAN MUBASHIR.

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 ∈ A to denote that ‘a’ is an element of the set ‘A’ (or that ‘a’ belongs to ‘A’).  The notation a ∈ A denotes that ‘a’ is not an element of the set ‘A’.  Two sets are equal if and only if they have the same elements. Therefore.  if A and B are sets, then A and B are equal if and only if ∀ x(x ∈ A ↔ x ∈ B).We write A = B if A and B are equal sets.

Set notation:  There are several ways to describe a set. One way is to list all the members of a set, When this is possible.  We use a notation where all members of the set are listed between braces. For example, the notation {a, b, c, d} represents the set with the four elements a, b, c, and d.  This way of describing a set is known as the roster method.

Examples:  EXAMPLE 1 The set V of all vowels in the English alphabet can be written as V = {a, e, i, o, u}.  EXAMPLE 2 The set O of odd positive integers less than 10 can be expressed by O = {1, 3, 5, 7, 9}.  EXAMPLE 3 The set of positive integers less than 100 can be denoted by {1, 2, 3,..., 99}.

Method two:  Another way to describe a set is to use set builder notation.  We characterize all those elements in the set by stating the property or properties they must have to be members. For instance, the set O of all odd positive integers less than 10 can be written as… O = {x | x is an odd positive integer less than 10}.

Sets and it’s types:  These sets, each denoted using a boldface letter, play an important role in discrete mathematics:  N = {0, 1, 2, 3,...}, the set of natural numbers  Z = {...,−2,−1, 0, 1, 2,...}, the set of integers  Z + = {1, 2, 3,...}, the set of positive integers  Q = {p/q | p ∈ Z, q ∈ Z, and q = 0}, the set of rational numbers  R, the set of real numbers  R +, the set of positive real numbers  C, the set of complex numbers.

Arsalan mubashir:

Equality of sets:  Two sets are equal if and only if they have the same elements. Therefore.  If A and B are sets, then A and B are equal if and only if ∀ x(x ∈ A ↔ x ∈ B).We write A = B if A and B are equal sets.  EXAMPLE The sets {1, 3, 5} and {3, 5, 1} are equal, because they have the same elements.  Note that the order in which the elements of a set are listed does not matter.

Types:  THE EMPTY SET There is a special set that has no elements. This set is called the empty set, or null set, and is denoted by ∅.  The empty set can also be denoted by { } (that is, we represent the empty set with a pair of braces that encloses all the elements in this set).

Subsets:  It is common to encounter situations where the elements of one set are also the elements of a second set.  DEFINITION The set A is a subset of B if and only if every element of A is also an element of B. We use the notation A ⊆ B to indicate that A is a subset of the set B.  EXAMPLE The set of all odd positive integers less than 10 is a subset of the set of all positive integers less than 10.  EXAMPLE The set of all computer science majors at your school is a subset of the set of all students at your school.

Draw a Venn diagram that represents V, the set of vowels in the English alphabet.  Solution: We draw a rectangle to indicate the universal set U, which is the set of the 26 letters  of the English alphabet. Inside this rectangle we draw a circle to represent V. Inside this circle  we indicate the elements of V with points Venn Diagram for the Set of Vowels.

Empty Set:  every nonempty set S is guaranteed to have at least two subsets, the empty set and the set S itself, that is, ∅ ⊆ S and S ⊆ S.  For every set S, ( i ) ∅ ⊆ S and (ii ) S ⊆ S.  Venn Diagram Showing that A Is a Subset of B.

Power set:  DEFINITION Given a set S, the power set of S is the set of all subsets of the set S. The power set of S is denoted by P(S).  What is the power set of the set {0, 1, 2}?  Solution : The power set P({0, 1, 2}) is the set of all subsets of {0, 1, 2}. Hence,  P({0, 1, 2}) = { ∅, {0}, {1}, {2}, {0, 1}, {0, 2}, {1, 2}, {0, 1, 2}}.  Note that the empty set and the set itself are members of this set of subsets.

Kamran Ali:

Cartesian product:  The order of elements in a collection is often important. Because sets are unordered, a different  structure is needed to represent ordered collections. This is provided by ordered n -tuples(multiples).  DEFINITION The ordered n-tuple (a1, a2,..., an) is the ordered collection that has a1 as its first element, a2 as its second element,..., and an as its nth element.

 DEFINITION 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.  Hence, A × B = {(a, b) | a ∈ A ∧ b ∈ B}.

Questions: List the members of these sets.

Q.2: Determine whether each of these pairs of sets are equal.  a) {1, 3, 3, 3, 5, 5, 5, 5, 5}, {5, 3, 1}  b) {{1}}, {1, {1}}  c) ∅, { ∅ }

3: For each of the following sets, determine whether 2 is an element of that set.  a) {x ∈ R | x is an integer greater than 1}  b) {x ∈ R | x is the square of an integer}  c) {2,{2}}  d) {{2},{{2}}}  e) {{2},{2,{2}}}  f ) {{{2}}}

Q 4: Determine whether each of these statements is true or false.  a) {1,2,3} ∈ N  b) {1,2,3,4,9} ∈ R  c) {0} ⊂ ∅  d) ∅ ⊂ {0}  e) {0} ∈ {0}  f ) {0} ⊂ {0}  g) { ∅ } ⊆ { ∅ }

Faizan Illahi:

Set operations:  Introduction Two, or more, sets can be combined in many different ways.  1: UNION  2: INTERSECTION  3: SUBTRACTION  4: ADDITION

Union of two sets:  DEFINITION Let A and B be sets. The union of the sets 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.  An element x belongs to the union of the sets A and B if and only if x belongs to A or x belongs to B. This tells us that  A ∪ B = {x | x ∈ A ∨ x ∈ B}.

Union of two sets:  EXAMPLE 1 The union of the sets {1, 3, 5} and {1, 2, 3} is the set {1, 2, 3, 5}; that is: {1, 3, 5} ∪ {1, 2, 3} = {1, 2, 3, 5}.  EXAMPLE 2 The union of the set of all computer science majors at your university and the set of all mathematics majors at your university is the set of students at your university who are majoring either in mathematics or in computer science (or in both).

Intersection of two sets:  DEFINITION Let A and B be sets. The intersection of the sets A and B, denoted by A ∩ B, is the set containing those elements in both A and B.  An element x belongs to the intersection of the sets A and B if and only if x belongs to A and x belongs to B. This tells us that  A ∩ B = {x | x ∈ A ∧ x ∈ B}.

Intersection of two sets:  EXAMPLE: The intersection of the sets {1, 3, 5} and {1, 2, 3} is the set {1, 3}; that is, {1, 3, 5} ∩ {1, 2, 3} = {1, 3}.  EXAMPLE: The intersection of the set of all computer science majors at your university and the set of all mathematics majors is the set of all students who are joint majors in mathematics and computer science.  Note: Two sets are called disjoint if their intersection is the empty set.

Noman Ahmad:

Question: Let A = {1, 2, 3, 4, 5} and B = {0, 3, 6}.  Find  a) A ∪ B.  b) A ∩ B.  c) A − B.  d) B − A.

Q’s: Let A = {a, b, c, d, e} and B = {a, b, c, d, e, f, g, h}. Find  a) A ∪ B.  b) A ∩ B.  c) A − B.  d) B − A.

Q’s: Let A and B be sets. Show that  a) (A ∩ B) ⊆ A.  b) A ⊆ (A ∪ B).  c) A − B ⊆ A.

Questions:  1. Let A be the set of students who live within one mile of school and let B be the set of students who walk to classes.  Describe the students in each of these sets.  a) A ∩ B  b) A ∪ B  c) A − B  d) B − A

Answers:  1: a) {−1,1} b) {1,2,3,4,5,6,7,8,9,10,11} c) ∅.  2. a) Yes b) No c) No  3. a) Yes b) No c) Yes d) No e) No f) No  4. a) True b) True c) False d) True e) False f) True g) True ____________________________________________________________________  1. a) The set of students who live within one mile of school  and walk to classes b) The set of students who live within  one mile of school or walk to classes (or do both) c) The  set of students who live within one mile of school but  do not walk to classes d) The set of students who walk  to classes but live more than one mile away from school

 2. a) {0,1,2,3,4,5,6} b) {3} c) {1, 2, 4,5} d) {0, 6}

Thankiew