Assignment.1.Solutions.cs2102

Assignment.1.Solutions.cs2102 - Assignment 1 Solutions...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
1 Assignment 1 Solutions CS2102, Fall 2009 1. (5.1, 1) Answer: A and C are equal, B and D are equal Explanation: Two sets are equal if they are both subsets of each other. Every element of A is an element of C, so A is a subset of C. Every element of C is an element of A, so C is a subset of A. Therefore the sets are equal. The same applies for sets B and D. 2. (5.1, 2) Answer: 4 is not equal to {4} Explanation: 4 is a number. {4} is a set which contains the element 4. The two are not of the same type, and thus it does not make sense to say they are equal. 3. (5.1, 5c) Answer: ø is an element of { ø } Explanation: { ø} contains one element, the empty set. Therefore, ø, the empty set, is an element of { ø } 4. (5.1, 8c, d, e, h, j) Answer: 8c. {2} is not an element of {1, 2}. Explanation: {2} is a set that contains the element 2. In the set {1, 2}, there is no element that is a set. Therefore, {2} can not be an element of {1, 2}. If the question had asked if {2} is an element of {1, {2}}, or if 2 is an element of {1, 2}, the answer would have been yes. Answer: 8d. {3} is an element of {1, {2}, {3}}. Explanation: {1, {2}, {3}} has three elements: the number 1, a set that contains the number 2, and a set that contains the number 3. Therefore {3}, a set that contains the number 3, is an element of the set. Answer: 8e. 1 is an element of {1}. Explanation: {1} is a set with a single element, the number 1. Therefore, 1 is an element of the set.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Answer: 8h. 1 is not an element of {{1}, 2}. Explanation: The set {{1}, 2} has 2 elements: a set that contains the number 1, and the number 2. The number 1 is not in this set, so it is not an element. Answer: 8j. {1} is a subset of {1}. Explanation: Set A is a subset of set B if every element of set A is also in set B. Let set A = {1} and set B = {1}. Set A has one element, 1. 1 is also an element in set B. Therefore, {1} is a subset of {1}. 5. (5.1, 9f, g, h) Answer: 9f. {6} Explanation: B – A denotes the symmetric difference between B and A, or the set of all elements that are in B, but not in A. The only element that is in B but not in A is 6. Therefore, B – A = {6}. Answer: 9g. {2, 3, 4, 6, 8, 9} Explanation: B U C denotes the union of sets B and C. The union of 2 sets is the set of all elements that are in either (or both) sets. Answer: 9h. {6} Explanation: B ∩ C denotes the intersection of sets B and C. The intersection of 2 sets is the set of all elements that are in both sets. The only element that is in both sets B and C is 6. Therefore, the intersection of B and C is {6}. 6. (5.1, 11) Answer: 11a. {x Є R| -3 <= x < 2 } Explanation: The upper blue line represents set A, and the lower blue line represents set B. The union of these two sets is the set of all elements in either or both sets, or the entire range of both sets, shown in red above. Answer: 11b. {x element R| -1 < x <= 0 }
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 10/10/2009 for the course CS 2102 taught by Professor Knight during the Spring '08 term at UVA.

Page1 / 9

Assignment.1.Solutions.cs2102 - Assignment 1 Solutions...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online