Worked examples a) Find A, where A = {x | x ∈ ℤ ∧ x > –3}. Step 1: understand the set comprehension statement. This is asking for all of the values of x, such that x is a member of the set of integers AND x is larger than –3. Step 2: integers are negative and positive whole numbers. Therefore integers larger than –3 are –2, –1, 0, 1, 2, 3, 4 and so on. This set continues infinitely upwards. Step 3: as the set shows a regular sequence, use the … notation to show that the values continue. Therefore, A = {–2, –1, 0, 1, 2, 3, …} b)If A = {7, 8, 9, 10} and B = {5, 6, 7, 8}, find: i A ∪ B The union of two sets includes the elements that are members of either set (or both). Be careful not to repeat any elements. It may be helpful to think of this as joining the sets together and removing any duplicates. A ∪ B = {5, 6, 7, 8, 9, 10} ii A ∩ B The intersection of two sets includes the elements that are members of both sets. A ∩ B = {7, 8} iii A \ B The difference of two sets is simply the elements that are in the first which are not in the second. A \ B = {9, 10}
0 Comments
Leave a Reply. |
AuthorLearn the facts about Computer Science. Archives
September 2020
Categories |