Download CS200 Worksheet 1: Sets and Set Operations and more Assignments Discrete Mathematics in PDF only on Docsity!
CS200 - Worksheet 1
A set is a collection of things. Those things could be numbers, letters, people, minerals, or other sets.
(The following is from Discrete Mathematics, an Open Introduction by Levin):
The following are โfamousโ sets:
- โ
= empty set = {}
- N = the set of natural numbers = { 1 , 2 , 3 ,... }. (Note: in DMOI, N = { 0 , 1 , 2 , 3 , 4 ,... })
- Z = set of integers = {... , โ 3 , โ 2 , โ 1 , 0 , 1 , 2 , 3... }
- R = the set of real numbers
- Q = the set of rational numbers
- Let T = {x, y, {g, h}, k}. True or false: (a) g โ T (b) {g, h} โ T (c) {g, h} โ T
Solution (a) False (b) True (c) False
- Describe the following sets in roster notation (list the first few elements). If the set is also โfamousโ give its symbol. (a) A = { 2 x^ : x โ N} (b) B = {x : x is even and x โ { 1 , 3 , 5 }} (c) C = {x โฅ 0 : x is even or x is odd}
Solution (a) A = { 1 , 2 , 4 , 8 , 16 ,... } (b) B = {} = โ
(c) C = { 0 , 1 , 2 , 3 , 4 ,... } = N โช { 0 }
- Write the following in set-builder notation using as concise notation as possible (a) { 2 , 4 , 6 , 8 , 10 , 12 } (b) { 2 , 4 , 8 , 16 , 32 , 64 } (c) { 0 , โ 1 , โ 2 , โ 3 ,... } (d) { 1 , 4 , 9 , 16 , 25 , 36 ,... } (e) { 1 , 3 , 5 , 7 , 9 , 11 ,... } (f) { 1 , 4 , 9 , 16 , 25 , 36 ,... } โฉ { 2 , 4 , 6 , 8 , 10 ,... } (g) {a, e, i, o, u}
Solution 7 = |A โช B| = |A โฉ B| + |A \ B| + |B \ A|. But |A \ B| = |B \ A| because |A| = |B|, so |A \ B| = 2 and |A| = |A โฉ B| + |A \ B| = 5.
- Let X = โ
, Y = {โ
}, Z = {{โ
}}. Are the following true or false?
(a) โ
โ X (b) โ
โ Y (c) โ
โ Z (d) X โ Y (e) Y โ Z (f) X โ Y (g) Y โ Z
Solution (a) False (b) True (c) False (d) True (e) False (f) True (g) True
- Find sets A and B such that A โ B and A โ B.
Solution For example, A = { 1 , 2 }, B = { 1 , 2 , 3 , 4 , { 1 , 2 }, 5 }.
- Does the empty set contain itself?
Solution No. The empty set contains nothing. If it contained the empty set, then it would no longer by empty!