Sets - PowerPoint PPT Presentation

1 / 22
About This Presentation
Title:

Sets

Description:

Set - a collection of unordered objects. Element /member ... A A A Idempotent. A A A = A Double Complement. CSE 2813 Discrete Structures. Set Identities (Cont. ... – PowerPoint PPT presentation

Number of Views:73
Avg rating:3.0/5.0
Slides: 23
Provided by: mahmood5
Category:
Tags: idempotent | sets

less

Transcript and Presenter's Notes

Title: Sets


1
Sets
  • Section 2.1

2
Sets
  • Set - a collection of unordered objects
  • Element /member - an object in a set
  • Two ways of describing a Set
  • Specifying the elements explicitly
  • V a, e, i, o, u
  • Specifying the property/properties of the
    elements (Set Builder notation)
  • P x x is a positive integer less than 10

3
Set membership and common sets
  • Set membership
  • a ? A a is an element of set A
  • b ? A b is not an element of set A
  • Some notations
  • N Set of natural numbers
  • Z Set of integers
  • Z Set of positive integers
  • Q Set of rational numbers
  • R Set of real numbers

4
Set Definitions
  • Equal sets
  • Two sets are equal iff they have the same
    elements
  • Order means nothing
  • Listing an object more than once does not change
    the set

5
Set Definitions (Cont..)
  • Empty set or Null set
  • Set that has no elements
  • Denoted by ? or
  • Singleton
  • Set that has one element
  • Example A 2

6
Set Definitions (Cont..)
  • The set A is a subset of B iff every element of A
    is also an element of B.
  • A ? B
  • The null set is a subset of every set.
  • ? ? A
  • Every set is a subset of itself.
  • A ? A
  • A is a proper subset of B, if A is a subset of B
    and A is not equal to B.
  • A ? B

7
Set Definitions (Cont..)
  • Cardinality
  • The number of distinct elements in a set
  • Denoted by S, for the set S

8
Power Set
  • Power Set
  • The set of all subsets of a set
  • Denoted by P(S), for the set S
  • If a set has n elements, then the power set has
    2n elements, i.e., P(S) 2S

9
Example
  • Let L a, b, c, d
  • What is the cardinality of L?
  • How many elements does the power set of L have?
  • What is the power set of L?

10
Venn Diagram
  • Universal set U is represented by rectangle
  • Circles or other geometrical figures inside the
    rectangle represent sets

11
Cartesian Product
  • The Cartesian product of two sets A and B
    (denoted by A ? B) is the set of all ordered
    pairs (a,b) where a is an element of A and b is
    an element of B.
  • A ? B (a,b) a?A ? b?B
  • Example A x, y, z B 1, 2
  • A ? B (x,1),(x,2),(y,1),(y,2),(z,1),(z
    ,2)
  • B ? A (1,x),(1,y),(1,z),(2,x),(2,y),(2
    ,z)

12
Set Operations
  • Section 2.2

13
Set Union
  • Union of two sets A and B is denoted by A?B
  • A?B contains elements that are either in A or in
    B or in both
  • A?B x x?A ? x?B
  • A 1,3,5, B 2,3,4

1,2,3,4,5
  • A?B

14
Set Intersection
  • Intersection of two sets A and B is denoted by
    A?B
  • A?B contains elements that are in both A and B
  • A?B x x?A ? x?B
  • A 1,3,5, B 1,2,3

1,3
  • A?B

15
Disjoint Sets
  • Two sets are called disjoint if their
    intersection is the empty set.
  • A 1,3,5, B 1,2,3, C 6,7,8

NO
  • Are A and B disjoint?

YES
  • Are A and C are disjoint?

16
Cardinality of union of sets
  • Exercise
  • How many elements does A U B have??
  • A?B AB-A ? B

17
Set Difference
  • Difference of two sets A and B is denoted by A?B
  • A?B contains elements that are in A but not in B.
  • A?B x x?A ? x?B
  • A 1,3,5, B 1,2,3

5
  • A?B

18
Complement of a Set
  • Done with respect to a Universal set U

19
Set Identities
20
Set Identities (Cont ..)
21
Examples
  • Use set builder notation to prove that
  • Use set identities to prove that

22
More Exercises
  • Describe the following sets using the set
  • builder notation
  • 1. The set of all positive integers
    between 1 and 99.
  • 2.
  • 3.
  • 4.
  • 5.
  • Use set builder notation to prove
    .
Write a Comment
User Comments (0)
About PowerShow.com