1. List the Members of These Sets
Total Page:16
File Type:pdf, Size:1020Kb
CSE260
Solutions to Homework Set #5
1. List the members of these sets. a) {x | x is a real number such that x² = 1} {-1, 1} b) {x | x is a positive integer less than 12} {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11} c) {x | x is the square of an integer and x < 100} {0, 1, 4, 9, 16, 25, 36, 49, 64, 81} d) {x | x is an integer such that x² = 2}
3. Determine whether each of these pairs of sets are equal. a) {1, 3, 3, 3, 5, 5, 5, 5, 5}, {5, 3, 1} Yes b) {{1}}, {1, {2}} No c) , {} No
7. Determine whether these statements are true or false. a) 0 False b) {0} False c) {0} False d) {0} True e) {0} {0} False f) {0} {0} False g) {} {} True 11. Use a Venn diagram to illustrate the set of all months of the year whose names do not contain the letter R in the set of all months of the year.
May January September June February October July March November August April December
13. Use a Venn diagram to illustrate the relationships A B and B C.
A B C
U 17. What is the cardinality of each of these sets? a) {a} 1 b) {{a}} 1 c) {, {}} 2 d) {a, {a}, {a, {a}}} 3
25. What is the Cartesian product A x B x C, where A is the set of all airlines and B and C are both the set of all cities in the United States? The set of triples (a, b, c), where a is an airline and b and c are cities.
27. Let A be a set. Show that x A = A x = . x A = {(x, y) | x and y A} = = {(x, y) | x A and y } = A x
38. This exercise presents Russell's paradox. Let S be the set that contains a set x if the set x does not belong to itself, so that S = {x | x x}. a) Show the assumption that S is a member of S leads to a contradiction. If S S, then by the defining condition for S we conclude that S S, a contradiction. b) Show the assumption that S is not a member of S leads to a contradiction. If S S, then by the defining condition for S we conclude that it is not the case that S S (otherwise S would be an element of S), again a contradiction.
39. Describe a procedure for listing all the subsets of a finite set. Let S = {a1, a2, ..., an}. Represent each subset of S with a bit string of length n, where the ith bit is 1 if and only if ai S. To generate all subsets of S, list all 2^n bit strings of length n (for instance, in increasing order), and write down the corresponding subsets.
1. Let A be the set of students who live within one mile of school and let B be the set of students who walk to classes. Describe the students in each of these sets. a) A B The set of students who live within one mile of school and who walk to classes. b) A B The set of students who live within one mile of school or who walk to classes. c) A – B The set of students who live within one mile of school but do not walk to classes. d) B – A The set of students who walk to classes but live more than one mile away from school. 3. Let A = {1, 2, 3, 4, 5} and B = {0, 3, 6}. Find a) A B {0, 1, 2, 3, 4, 5, 6} b) A B {3} c) A – B {1, 2, 4, 5} d) B – A {0, 6}
16. Let A and B be sets. Show that a) (A B) A. If x is in A B, then perforce it is in A (by definition of intersection). d) A (B – A) = . If x A then x B – A. Therefore there can be no elements in A (B – A), so A (B – A) = .
29. What can you say about the sets A and B if we know that a) A B = A? B A b) A B = A? A B e) A – B = B – A? A = B
33. Find the symmetric difference of the set of computer science majors at a school and the set of mathematics majors at this school. The set of students who are computer science majors but not mathematics majors or who are mathematics majors but not computer science majors.
49. Find i=1,∞ Ai and i=1,∞ Ai if for every positive integer i, a) Ai = { –i, –i + 1, ..., -1, 0, 1, ..., i – 1, i}. Z, {-1, 0, 1} d) Ai = [i, ∞], that is, the set of real numbers x with x ≥ i. [1, ∞),
62. The union of two fuzzy sets S and T is the fuzzy set S T, where the degree of membership of an element in S T is the maximum of the degrees of membership of this element in S and in T. Find the fuzzy set F R of rich or famous people. Taking the maximum for each person, we have S T - {0.6 Alice, 0.9 Brian, 0.4 Fred, 0.9 Oscar, 0.7 Rita}.
1. Enumerate the elements of the following sets where the universe of discourse for the variables x and y are all integers. Identify which is a free variable and which is a bound variable. a) {x | y(y ≥ 0 /\ y ≤ 5 /\ x = y²} {0, 1, 4, 9, 16, 25} b) {x | y(xy = 0 \/ xy = y} {0, 1} 2. Use the set builder notation and quantifiers to denote the symmetric difference (defined on page 131) of two sets. A B = {x | (x A /\ x B) \/ (x A /\ x B)}
3. For each row of the following table (see table 2 on page 91 for explanation), mark the corresponding regions in the Venn diagram below. A, B, C are the three sets. 1 in the table indicates an element x is in the set and 0 indicates that the element x is not in the set. Row A B C 1 1 1 1 2 1 1 0 3 1 0 1 4 1 0 0 5 0 1 1 6 0 1 0 7 0 0 1 8 0 0 0
4. There is a correspondence between logic operators and set operations as follows: /\ and , \/ and , ¬ and – (set complement). Give an expression for E (fourth column of the following table), where A, B, C are sets, using the above correspondence and disjunctive normal form in propositional logic. Then simplify this expression using the set identities of table 1 on page 124. A B C E 1 1 1 1 1 1 0 0 1 0 1 0 1 0 0 1 0 1 1 0 0 1 0 0 0 0 1 0 0 0 0 1 (A B C) (A –B –C) (–A –B –C) ≡ (A B C) ((A –A) –B –C) ≡ (Distributive Laws) (A B C) (U –B –C) ≡ (Complement Laws) (A B C) (–B –C) (Identity Laws)