Sets & Set Operations.

Slides:



Advertisements
Similar presentations
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
Advertisements

Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
Week 21 Basic Set Theory A set is a collection of elements. Use capital letters, A, B, C to denotes sets and small letters a 1, a 2, … to denote the elements.
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.
Sets Definition of a Set: NAME = {list of elements or description of elements} i.e. B = {1,2,3} or C = {x  Z + | -4 < x < 4} Axiom of Extension: A set.
Discrete Structures Chapter 3 Set Theory Nurul Amelina Nasharuddin Multimedia Department.
Sets 1.
CSE115/ENGR160 Discrete Mathematics 02/10/11 Ming-Hsuan Yang UC Merced 1.
Sets 1.
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.
Discrete Maths Objective to re-introduce basic set ideas, set operations, set identities , Semester 2, Set Basics 1.
Operations on Sets – Page 1CSCI 1900 – Discrete Structures CSCI 1900 Discrete Structures Operations on Sets Reading: Kolman, Section 1.2.
MATHEMATICS XI SETS.
Discrete Mathematics Unit - I. Set Theory Sets and Subsets A well-defined collection of objects (the set of outstanding people, outstanding is very subjective)
Set theory Sets: Powerful tool in computer science to solve real world problems. A set is a collection of distinct objects called elements. Traditionally,
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,
Sets Defined A set is an object defined as a collection of other distinct objects, known as elements of the set The elements of a set can be anything:
CS 103 Discrete Structures Lecture 10 Basic Structures: Sets (1)
1 ENM 503 Block 1 Algebraic Systems Lesson 2 – The Algebra of Sets The Essence of Sets What are they?
CS201: Data Structures and Discrete Mathematics I
Chapter 2: Basic Structures: Sets, Functions, Sequences, and Sums (1)
1 Section 1.6 Sets. 2 Set Fundamental discrete structure on which all other discrete structures are built Can be loosely defined as a collection of elements.
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.
ELEMENTARY SET THEORY.
Discrete Mathematical Structures 4 th Edition Kolman, Busby, Ross © 2000 by Prentice-Hall, Inc. ISBN
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.
Introduction to Set theory. Ways of Describing Sets.
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 CS 2610 August 31, Agenda Set Theory Set Builder Notation Universal Set Power Set and Cardinality Set Operations Set Identities.
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
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.
Sets, Permutations, and Combinations. Lecture 4-1: Sets Sets: Powerful tool in computer science to solve real world problems. A set is a collection of.
Set. Outline Universal Set Venn Diagram Operations on Sets.
CSE15 Discrete Mathematics 02/13/17
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.
The Language of Sets If S is a set, then
Discrete Mathematical The Set Theory
CSNB 143 Discrete Mathematical Structures
Set, Combinatorics, Probability & Number Theory
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.
Taibah University College of Computer Science & Engineering Course Title: Discrete Mathematics Code: CS 103 Chapter 2 Sets Slides are adopted from “Discrete.
… and now for something completely different…
Exercises Show that (P  Q)  (P)  (Q)
CS100: Discrete structures
Set Operations Section 2.2.
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
The aim of education is to teach students how to think rather than what to think. Sets The set is the fundamental discrete structure on which all other.
Discrete Mathematics R. Johnsonbaugh
SET THEORY Chumki Sarkar.
… and now for something completely different…
2.1 – Symbols and Terminology
Lecture Sets 2.2 Set Operations.
CSC102 - Discrete Structures (Discrete Mathematics) Set Operations
Presentation transcript:

Sets & Set Operations

Basic discrete structures Discrete math: Study of the discrete structures used to represent discrete objects Many discrete structures are built using sets Sets : collection of objects Examples of discrete structures built with the help of sets: Combinations Relations Graphs

Set Definition: A set is a (unordered) collection of objects. These objects are sometimes called elements or members of the set.(Cantor's naive definition). A naïve theory in the sense of "naïve set theory" is a non-formalized theory, that is, a theory that uses a natural language to describe sets and operations on sets.

Examples: – Vowels in the English alphabet V = { a, e, i, o, u } – First seven prime numbers. X = { 2, 3, 5, 7, 11, 13, 17 }

Representing sets Representing a set by: 1) Listing (tabulation method)) the members of the set. 2) Definition by property, using the set builder notation.(Rule method) {x| x has property P}. Example: Even integers between 50 and 63. 1) E = {50, 52, 54, 56, 58, 60, 62} 2) E = {x| 50 <= x < 63, x is an even integer}

If enumeration of the members is hard we often use ellipses. Example: a set of integers between 1 and 100 A= {1,2,3 …, 100} Rational numbers Q = {p/q | p ∈ Z, q ∈ Z, q ≠ 0}

Set can be Finite set Infinite set Singleton set

A set is determined only when we know definitely what object it contains. There must be no ambiguity or doubt in this regard. Example: The collection of all tall students in a college does not define a set. Because there will always be some doubt about as to which boys are to be regarded as tall. For this reason the objects of a set are required to be “well defined”. Thus, if we speak of the collection of all students in a college who are above 170cms then we are actually speaking of set.

Interval Notation

Universal Set and Empty Set The universal set U is the set containing everything currently under consideration. Content depends on the context. Sometimes explicitly stated, sometimes implicit. The empty set is the set with no elements. Symbolized by ∅ or { }

Things to remember

Equal sets Definition: Two sets are equal if and only if they have the same elements. Example: • {1,2,3} = {3,1,2} = {1,2,1,3,2} Note: Duplicates don't contribute anything new to a set, so remove them. The order of the elements in a set doesn't contribute anything new.

Subsets Definition: 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 A is a subset of B. Example: A={1,2,3}, B={1,2,3,4,5}, C={2,3,5,6} Clearly A ⊆ B and A ⊄ C

Proper Subset proper subset / strict subset A⊂B In the example We observe that the set B which contains A as subset, contains elements that are not in A. In such a situation we say that the set A is Properly contained in B or is a Proper subset of B. A⊂B proper subset / strict subset

Things to remember Every set is a subset of itself Two sets A and B are equal if and only if A ⊆ B and B ⊆ A. The Null set ∅ is a subset of every set A. For any sets A,B,and C if A ⊆ B and B ⊆ C then A ⊆ C. For any sets A,B,C if A=B AND B=C, then A=C.

Venn Diagrams Relationship between the sets can be depicted in diagrams called Venn Diagrams. represent A ⊆ B B A

For any sets A,B,and C if A ⊆ B and B ⊆ C then A ⊆ C. The truth of the above statement is obvious from the following Venn diagram. C B A

The Null set ∅ is a subset of every set S

Power Set Given a set S, the power set of S is the set of all subsets of S. The power set is denoted by P(S). Example: Consider set A={a,b} P(A)={∅, {a},{b}, {a,b}= )={∅, {a},{b}, A} If A={1,2,3} P(A)={∅,{1},{2},{3},{1,2},{2,3},{1,3},A} If a finite set A has n elements, then P(A) has 2n elements.

If a finite set has n elements, prove that the power set of A has 2n elements If a finite set has n elements, then subset of A can have No element(Null set) One element(singleton set) Two elements(each combination of two elements of A) Three elements(each combination of three elements of A) …… n-1 elements and n elements(A itself) Null set( 1 in number) Singleton sets: n in number: nc1 Each combination of two elements of A gives a subset of A containing two elements: nc2 Each combination of 3 elements of A gives a subset of A containing 3 elements : nc3 ..... ncn-1 n elements… ncn Binomial theorem: (1+x)n 1+nc1+nc2+nc3……………+ncn-1+ncn= (1+1)n= 2n

Cardinality |{∅}| = 1

Set Operators: Union Definition: The union of two sets A and B is the set that contains all elements in A, B, r both. We write: AB = { x | (a  A)  (b  B) } U A B

Set Operators: Intersection Definition: The intersection of two sets A and B is the set that contains all elements that are element of both A and B. We write: A  B = { x | (a  A)  (b  B) } U A B

Disjoint Sets Definition: Two sets are said to be disjoint if their intersection is the empty set: A  B =  U A B

Set Difference Definition: The difference of two sets A and B, denoted A\B or A−B, is the set containing those elements that are in A but not in B U A B

Set Complement Definition: The complement of a set A, denoted A ($\bar$), consists of all elements not in A. That is the difference of the universal set and A: U\A A= AC = {x | x  A } U A A

Set Complement: Absolute & Relative The (absolute) complement of A is A=U\A The (relative) complement of A in B is B\A U U B A A A

Relative Compliment Given two sets A and B, the set of all the elements that belong to B but not A is called the compliment of A relative to B(or relative compliment of A in B) and is denoted as B-A B-A={x|x∈B and x ∉ A}. The set A-B(Relative compliment of B in A) can be defined similarly. B-A and A-B are not same

Things to remember For any sets A and B, the sets A-B and B-A are disjoint. If A and B are disjoint, then A-B=A, B-A=B. If U is a universal set and A ⊆ U, the U-A= Ac A=(A U B)-(B-A), B=(AUB)-(A-B) A=(A ∩ B)U(A-B),B=(A ∩ B)U(B-A)

Symmetric Difference For Two sets A and B, the releative compliment of A ∩ B in A U B is called symmetric difference of A and B denoted as A∆B or A⊖B. Simply A∆B= (A – B) ∪ (B – A) A⊖B=(A U B)-(A ∩ B ) ={x|x ∈ A U B and x ∉ A ∩ B }

Set Identities Identity laws A ∪ ∅ = A A ∪ U = U A ∪ A = A A ∩ U = A Domination laws Idempotent laws Complementation law (A) = A Complement laws A ∩ A = ∅ A ∪ A = U

Set Identities (cont.) Commutative laws A ∪ B = B ∪ A Associative laws A ∪ (B ∪ C) = (A ∪ B) ∪ C A ∩ (B ∩ C) = (A ∩ B) ∩ C Distributive laws A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C) A ∪ (B ∩ C) = (A ∪ B) ∩ (A ∪ C) Absorption laws A ∪ (A ∩ B) = A De Morgan’s laws A ∪ B = A ∩ B A ∩ (A ∪ B) = A A ∩ B = A ∪ B

Duality Each union replaced by intersection Each intersection replaced by union U by ∅ and ∅ by U If two sets P and Q are equal then their duals also equal.

Cartesian Product of sets Definition: Let A and B be two sets. The Cartesian product of A and B, denoted AxB, is the set of all ordered pairs (a,b) where aA and bB AxB = { (a,b) | (aA)  (b  B) } The Cartesian product is also known as the cross product

A1A2… An ={ (a1,a2,…,an) | ai  Ai for i=1,2,…,n} Cartesian Product Cartesian Products can be generalized for any n-tuple Definition: The Cartesian product of n sets, A1,A2, …, An, denoted A1A2… An, is A1A2… An ={ (a1,a2,…,an) | ai  Ai for i=1,2,…,n}