CS 336 Pre-Test 2
Sets
3. Sets
3.1* What are these sets?
Write them using braces, commas, numerals, … (for infinite
sets), and
∅
only.
N
is the set of natural numbers.
(
P
(
S
)
is the power set of
S
.)
a)
({1, 3, 5}
∪
{3, 1})
∩
{3, 5, 7} = {1, 3, 5}
∩
{3, 5, 7} = {3, 5}
b)
∪
{{A}, {A, 5},
∩
{{5, 7}, {7, 9}}} =
∪
{{A}, {A, 5}, {7}} = {A, 5, 7}
c)
({1, 2, 5} - {5, 7, 9})
∪
({5, 7, 9} - {1, 2, 5}) = {1, 2}
∪
{7, 9} = {1, 2, 7, 9}
d)
{1}
∪
{
∅
}
∪
∅
= {1,
∅
}
e)
P
({7, 8, 9}) –
P
({7, 9}) = {
∅
, {7}, {8}, {9}, {7, 8}, {7, 9}, {8, 9}, {7, 8, 9}} –
{
∅
, {7}, {9}, {7, 9}}
= {{8}, {7, 8}, {8, 9}, {7, 8, 9}}
f)
P (
∅
)
= {
∅
}
g)
{
x
:
x
is an integer and
x
2
= 2
} =
∅
h)
{
x
:
5
y
∈
N
where
x = y
2
} = {0, 1, 4, 9, 16, …}
i)
{1}
×
{1, 2}
×
{1, 2, 3} = {(1, 1, 1), (1, 1, 2), (1, 1, 3), (1, 2, 1), (1, 2, 2), (1, 2,
3)}
j)
∅
×
{1, 2} =
∅
k)
P
({1, 2})
×
{1, 2} = {
∅
, {1}, {2}, {1, 2}}
×
{1, 2}
= {(
∅
, 1), (
∅
, 2), ({1}, 1), ({1}, 2), ({2}, 1), ({2}, 2) ({1, 2}, 1), ({1, 2}, 2)}