Recitation R8
- Math: Sets & Functions
Fall 2013
CS160: Foundations in Programming
The purpose of this lab is to learn sets and functions:
- Go over sets in math
- Perform basic set operations
1. Problems involving sets
Solve the following problems; it is probably easiest to write them down on a sheet of paper.
Your TA will go over them when everyone has completed the problems.
Given that:
- N = {0,1,2,3,4,...} is the set of natural numbers
- Z = {...,-2,-1,0,1,2,...} is the set of all integers
- Z+ = {1,2,3,4,....} is the set of all positive integers
- R is the set of all real numbers
- For each of these pairs of sets, determine whether the first is a subset
of the second, the second a subset of the first, or neither is a subset
of the other.
- the set of people who speak English, the set of people who speak English
with an Australian accent
- the set of fruits, the set of citrus fruits
- the set of students studying discrete math, the set of students studying chemistry
- For each of the following sets, identify the cardinality of the set.
- {2,4,6,8,10,12,14}
- x ∈ N | x < 6
- x ∈ Z | -3 < x < 3
- x ∈ Z+ | x ≤ 4
- the set of primary colors
- the set of days of the work week
- the set of midterms in this class
- List the members of these sets
- (x | x is a real number such that x2 = 1)
- (x | x is a positive integer less than 10)
- (x | x is a squared integer and x < 100)
- (x | x is an integer such that x2 = 2)
- For the following sets: A = {2, 4, 6, 8, 10}, B = {1, 2, 3, 4, 5, 6, 11, 14}.
- What is the cardinality of A and B?
- What is the union of A and B?
- What is the intersection of A and B?
- What is the complement of A, if the universal set is N?
- What is A minus B?
- What is B minus A?
- Does A minus B = B minus A?
- If not, draw a Venn diagram that shows why.
Show your work to the TA for grading and to get credit for this lab.
© 2013 CS160 Colorado State University. All Rights Reserved.