Exercises
- Give examples of the elements of the following sets:
- {n ∈ N: n is divisible by 5}
- {2n : n ∈ N }
- {1/n : n = 1, 2, 3, 4}
- { x ∈R : x = k/n, k ∈ {1, 2} and n ∈{1, 2,
4, 8} }
- How many elements are there in the following sets?
- {n ∈ N : n2 = 2}, {x ∈
Q: x2 = 2}, {x ∈ R: x2
= 2},
- {n ∈
N: n is a premier number, not grater than 10},
- {n ∈ N: n is a power of 2},
- {-1,1}, [-1, 1], (-1, 1),
- {x ∈
Z: |x| < 10}, {x ∈ R: |x| < 10},
- {n ∈ N : n is a pair and premier
number}.
- Let U={n ∈ N : n<20} be a fixed
universe and let A and B be their two subsets such that, A = {2n+1 : n ∈ N and n<6}, B = {3n+2 : n ∈ N and n<6}. List all elements of the sets: A
∪ B, A ∩ B, Ac
∪
B, A\B, B\A, A ⊕ B.
- Let A={x ∈ R : |x| ≥
5} and B = {x ∈ R : -6 ≤
x<0}. Illustrate the sets as intervals and indicate their elements:
A ∪ B, A ∩
B, A c , A\B, B\A.
- Let U = {a,b}* be the universe, the subsets of which are sets A,
B, C such that,
A= {a, b, aa, bb, aaa, bbb} B = {w ∈
U : length(w) ≥ 2} C = { w ∈
U : length(w) ≤ 2}. Point out the sets: Bc
∩ Cc, (B ∩
C)c, (B ∪
C)c, Bc ∪ Cc,
Ac ∩ Bc.
- Are the following sentences valid or not? Justify your answer.
- A ∩ B = Ac ∪ Bc,
- A ∩ ( ∅ ∪ B) = A iff A ⊆
B.
- List all elements of the set P(A), where A is the set of all
zeros (roots) of the equation x2 -7x + 6 = 0.
Prove that P(A ∩ B) = P(A) ∩ P(B) for arbitrary A and B.
- Explain under which assumptions the equalities {a, b, c} = {b, c,
d}, {{a,b}, c, {d}} = {{a}, c} could be valid.
- Prove using two different methods:
- A\B = A\(A ∩ B)
- A = (A ∩ B) ∪
(A\B)
- A\(B\C) = (A\B) ∪ (A ∩ C)
- Prove that the following equations are not valid. Point out the
counterexamples.
- (A\B) ∪ B = A,
- (A ∪ B) \B = A.
- Prove the following equations:
- A ∩ (B ⊕
C) = (A ∩ B) ⊕
( A ∩ C)
- A ⊕ B = ∅
iff A = B.
- Find the solutions to the equations:
- A\X = B, X\A = C, knowing that B ⊆
A i A ∩ C = ∅.
- A ∩ X = B, A ∪
X = C, knowing that B ⊆ A ⊆ C.
13. Find out an algorithm that allows to compute a set-theoretic sum
of two finite sets. Consider the following cases:
- Sets A and B are given as arrays with arbitrary elements.
- Elements of the sets are natural numbers not grater than k.
- Elements of the sets are ordered sequences.