Unformatted text preview:

Sets A set is a collection of distinct objects The objects in a set are its elements or members A set is often expressed by listing its elements between braces and separated by commas Examples 1 5 9 21 True False Red Blue 10 Yes Penguin When x is an element of A we write x A and say x belongs to A When x is not in A we write x cid 54 A Example 1 1 5 9 11 but 2 cid 54 1 5 9 11 Sets Two sets are equal if they contain exactly the same elements For example 1 2 3 4 5 2 5 3 4 1 order is not important 1 2 3 4 5 cid 54 1 2 3 5 It is common to use uppercase letters for the names of sets For example we de ne A 1 5 9 21 Some Important Sets 1 N 1 2 3 4 the set of natural numbers 2 Z 2 1 0 1 2 the set of integers 3 Q the set of rational numbers 4 R the set of real numbers The empty set is the set that has no elements The empty set is also denoted Be careful but cid 54 Sets Cardinality An in nite set contains in nitely many elements For example the set of prime numbers 2 3 5 7 11 13 is an in nite set A set with nitely many elements is called a nite set If X is a nite set its cardinality or size denoted X is the number of elements it has Examples A 1 5 9 21 4 B True False 2 0 Set builder Notation We use the set builder notation to de ne describe sets that are too big or complex to list their elements To write a set X in set builder notation we use the syntax X expression rule or X expression rule to say X contains all values of expression that are speci ed by the rule Examples prime numbers n n is a prime number 2 3 5 7 11 is the set of n2 n Z 0 1 4 9 16 Q x x m x R x 2 2 x Z x 2 2 n where m n Z and n cid 54 0 2 2 Interval Notation For subsets of R which are intervals on the number line it is often convenient to use interval notation


View Full Document

CMU CS 15122 - Sets

Download Sets
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Sets and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Sets 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?