离散数学英文试题A
信计11级 离散数学A试题 B卷
A.6is even or –5 is not negative. B.6is odd and –5 is not negative.
C.6is odd or –5 is not negative. D.6is even and –5 is negative.
2. When the propositionp(qr) is true? ( )
A.Ris antisymmetric B.Ris reflexive
C.Ris symmetric D.Ris asymmetric
5. Let Q(x) be the statement “x+1<3”. If the universe of discourse consists of the integers, in the following, which is false? ( )
A . 0 B. 1 C. 2 D. 3
9.In the Boolean algebra D30, the complement (补元) of 3 is ( )
A. 10 B.6 C. 15 D. 30
山东建筑大学试卷共5页第3页
10. Let Z4be a group with operationas the Table 1, which is the inverse of [3]? ( )
9. Is the poset A={2, 3, 6, 18} under the relation of divisibility a lattice? _______.
10.Supposef:NNhas the rulef(ቤተ መጻሕፍቲ ባይዱ)=3n+2. Determine whetherfis one-to-one? ___________.
离散数学英文试卷答案高三
I. Multiple-choice Questions (40 points, 1 point each)1. The number of vertices in a tree with n edges is:A. n+1B. nC. n-1D. n-2Answer: C2. The binary operation defined on the set of natural numbers is given by ab = a+b+1. Which of the following is not a binary operation?A. 1B. 2C. 3D. 4Answer: B3. The truth value of the statement "p ∨ q" is:A. TrueB. FalseC. UnknownD. Cannot be determinedAnswer: A4. The function f: R → R defined by f(x) = 2x + 3 is:A. One-to-oneB. OntoC. Both one-to-one and ontoD. Neither one-to-one nor ontoAnswer: A5. The number of distinct permutations of the letters in the word "MATH" is:A. 3!B. 4!C. 5!D. 6!Answer: BII. Fill in the blanks (20 points, 2 points each)6. A _______ is a finite set of symbols.Answer: alphabet7. The binary operation + on the set of integers is commutative if a + b = b + a for all _______ a and b.Answer: integers8. A _______ is a subset of a set that contains all the elements of the set.Answer: superset9. The binary operation on the set of natural numbers is associative if(a b) c = a (b c) for all _______ a, b, and c.Answer: natural numbers10. The _______ of a graph is the number of edges in the graph.Answer: number of edgesIII. Short Answer Questions (30 points, 3 points each)11. Prove that the set of even numbers is not a subset of the set of odd numbers.Proof: Let A be the set of even numbers and B be the set of odd numbers. We can show that A is not a subset of B by providing a counterexample. For example, 2 is an even number and belongs to A, but it does notbelong to B because it is not an odd number. Therefore, A is not asubset of B.12. Determine whether the function f: R → R defined by f(x) = x^2 isone-to-one or onto.Solution: To determine if the function is one-to-one, we need to checkif f(a) = f(b) implies a = b for all a and b in R. If we take a = 2 andb = -2, we have f(2) = 2^2 = 4 and f(-2) = (-2)^2 = 4. Since f(2) = f(-2) but 2 ≠ -2, the function is not one-to-one. To determine if thefunction is onto, we need to check if for every y in R, there exists anx in R such that f(x) = y. Since the square of any real number is non-negative, the function is onto.13. Find the sum of the first 10 terms of the arithmetic sequence with a first term of 3 and a common difference of 2.Solution: The formula for the sum of the first n terms of an arithmetic sequence is given by Sn = n/2 (2a + (n-1)d), where a is the first term and d is the common difference. Substituting a = 3, d = 2, and n = 10, we have Sn = 10/2 (23 + (10-1)2) = 5 (6 + 18) = 5 24 = 120.IV. Long Answer Questions (10 points)14. (5 points) Prove that the product of two even numbers is an even number.Proof: Let a and b be even numbers. Then, there exist integers m and n such that a = 2m and b = 2n. The product of a and b is given by ab =(2m)(2n) = 4mn. Since 4mn is divisible by 2, the product of two even numbers is an even number.15. (5 points) Solve the following system of linear equations using Cramer's rule:2x + 3y = 74x - y = 1Solution: The determinant of the coefficient matrix is given by D = |23| = 21 - 34 = -10. The determinant of the matrix obtained by replacing the first column with the constants is given by D1 = |7 3| = 71 - 34 = -5. The determinant of the matrix obtained by replacing the second column with the constants is given by D2 = |2 1| = 21 - 31 = -1. Therefore, x = D1/D = -5/-10 = 1/2 and y = D2/D = -1/-10 = 1/10.。
离散数学答案英文版
离散数学答案英⽂版P.161.14.f) If I did not buy a lottery ticket this week, then I did not win the million dollar jackpot on Friday.g) I did not buy a lottery ticket this week, and I did not win the million dollar jackpot on Friday.h ) Either I did not buy a lottery ticket this week, or else I did buy one and won the million dollar jackpot on Friday.10.a) r ∧┐q b) p ∧ q∧ r c)r → pd) p ∧┐q ∧ r e) (p ∧q) → r f) r? ( q ∨ p)20.a) If I am to remember to send you the address, then you will have to send me ane-mail message.(This has been slightly reworded so that the tenses make more sense.)b) If you were born in the United States, then you are a citizen of this country.c) If you keep your textbook, then it will be a useful reference in your future courses.(The word "then" is understood in English, even if omitted.)d) If their goaltender plays well, then the Red Wings will win the Stanley Cup.e) If you get the job, then you had the best credentials.f) If there is a storm, then the beach erodes.g) If you log on to the server, then you have a valid password.h) If you don’t begin your climb too late, then you will reach the summit.33.c)P.261.28.a) Kwame will not take a job in industry and he will not go to graduate school.b) Yoshiko doesn’t know Java or she doesn’t know calculus.c) James is not young or he is not strong.d) Rita will not move to Oregon and she will not move to Washington.10.a)c)12.a) Assume the hypothesis is true. Then p is false. Since p∨q is true, we conclude that q must be true.Here is a more "algebraic" solution:[┐p∧(p ∨q)]→q <=> ┐[┐p∧(p ∨q)]∨q <=> ┐┐p∨┐(p∨q)∨q <=> p∨┐(p∨q)∨q <=> (p ∨q)∨┐(p∨q) <=> Tc) Assume the hypothesis is true. Then p is true, and since the second part of the hypothesis is ture, we conclude that q is also true, as desired.51.((p ↓ p) ↓ q )↓((p ↓ p) ↓ q )7.The graph is planar.20.The graph is not homeomorphic to K3,3, since by rerouting the edge between a and h we see that it is planar.22.Replace each vertex of degree two and its incident edges by a single edge. Then the result is K3,3 : the parts are {a,e,i} and {c,g,k}. Therefore this graph is homeomorphic to K3,3.23.The graph is planar.25. The graph is not planar.9.83. 3F E8. 310.417. time slot 1: Math 115, Math 185; time slot 2: Math 116, CS 473;time slot 3: Math 195, CS 101; time slot 4: CS 102time slot 5: CS 273P.461.33. a) true b) false c) false d) false5. a) There is a student who spends more than 5 hours every weekday in class.b) Every student spends more than 5 hours every weekday in class.c) There is a student who does not spend more than 5 hours every weekday in class.d) No student spends more than 5 hours every weekday in class.9. a) x(P(x)∧Q(x)) b) x(P(x)∧﹁Q(x))c) x(P(x)∨Q(x)) d) x﹁(P(x)∨Q(x))16. a) true b) false c) true d) false24. Let C(x) be the propositional function “x is in your class.”a)x P(x) and x(C(x)→P(x)), where P(x) is “x has a cellular phone.”b) x F(x) and x(C(x)∧F(x)), where F(x) is “x has seen a foreign movie.”c)x﹁S(x) and x(C(x)∧﹁S(x)), where S(x) is “x can swim.”d)x E(x) and x(C(x)→E(x)), where E(x) is “x can solve quad ratic equations.”e)x﹁R(x) and x(C(x)∧﹁R(x)), where R(x) is “x wants to be rich.”62.a) x (P(x)→﹁S(x)) b)x(R(x)→S(x))c) x (Q(x)→P(x))d)x(Q(x)→﹁R(x))e) Yes. If x is one of my poultry, then he is a duck (by part(c)), hence not willing to waltz (part (a)). Since officers are always willing to waltz (part (b)), x is not an officer.1.412.d)x┐C(x, Bob)h)x y (I(x) ∧((x≠y) →┐ I(y)))k)x y( I(x) ∧┐C(x, y))n)x y z ((x≠y) ∧┐ (C(x, z) ∧ C(y, z)))14.a) x H(x), where H(x) is “x can speak Hindi”and the universe of the discourse consists of all students in this class.b) x y P(x, y), where P(x, y) is “x plays y.” and the universe of the discourse for x consists of all students in this class, and the universe of the discourse for y consists of all sports.c) x A(x) ∧┐H(x) , where A(x) is “x has visited Alaska.” , H(x) is “x has visited Hawaii” and the universe of the discourse for x consists of all students in this class.d) x y L(x, y), where L(x, y) is “x has learned programming language y” and the universe of the discourse for x consists of all students in this class, and the universe of the discourse for y consists of all programming languages.e) x z y (Q(y,z) →P(x, y)), where P(x, y) is“x has taken course y.”, Q(y, z) is “course y is offered by department z.”, and theuniverse of the discourse for x consists of all students in this class, the universe of the discourse for y consists of all courses in this school, and the universe of the discourse for z consists of all departments in this school.f)x y z ( (x≠y) ∧P(x, y)∧ ((x≠y≠z) →┐P(x, z))), where P(x, y) is “x and y grew up in the same town.” and the universe of the discourse for x, y, z consists of all students in this class.g) x y z C(x, y) ∧G(y, z), where C(x, y) is “x has chatted with y”, G(y, z) is “y is in chat group z”, the universe of the discourse for x, y consists of all students in this class, and the universe of the discourse for z consists of all chat group in this class. a) There is an additive identity for the real numbers.d) The product of two nonzero numbers is nonzero for the real numbers.38.b) There are no students in this class who have never seen a computer.d) There are no students in this class who have taken been in at least one room of every building on campus.1.5(1)(┐r∧(q→p))→(p→(q∨r)) <=> ┐(┐r∧(┐q∨p))∨(┐p∨(q∨r)) <=>(q∧┐p)∨(┐p∨q∨r)<=> (┐p∨q∨r∨q)∧(┐p∨q∨r∨┐p) <=> (┐p∨q∨r) <=> ∏3 <=> ∑0,1,2,4,5,6,7 (2) P.726. Let r be the proposition "It rains", let f be the proposition "It is foggy", let s be the proposition "The sailing race will be held", let l be the proposition "The lifesaving demonstration will go on", and let t be the proposition "The trophy will be awarded". We are given premises (┐r∨┐f)→(s∧l), s→t, and ┐t. We want to conclude r. We set up the proof in two columns, with reasons. Note that it is valid to replace subexpressions by other expressions logically equivalent to them.Step Reason1. ┐t Hypothesis2. s→t Hypothesis3. ┐s Modus tollens using Steps 1 and 24. (┐r∨┐f)→(s∧l) Hypothesis5. (┐(s∧l))→┐(┐r∨┐f) Contrapositive of step 46. (┐s∨┐l)→(r∧f) De Morgan's law and double negative7. ┐s∨┐l Addition, using Step 38. r∧f Modus ponens using Step 6 and 79. r Simplification using Step 8First, using the conclusion of Exercise 11, we should show that the argument form with premises (p ∧t) → (r ∨s), q→ (u ∧t), u→p, ┐s, q, and conclusion r is valid. Then, we use rules of inference from Table 1.Step Reason1. q Premise2. q→ (u ∧t)P remise3. u ∧t Modus ponens using Steps 1 and 24. u Simplification using Step 35. u→p Premise6. p Modus ponens using Steps 3 and 47. t Simplification using Step 38. p ∧t Conjunction using Steps 6 and 79. (p ∧t) → (r ∨s) Premise10. r ∨s Modus ponens using Steps 8 and 911. ┐s Premise12. r Disjunctive syllogism using Steps 10 and 11 14.b)Let R(x) be “x is one of the five roommates,” D(x) be “x has taken a course in discrete mathematics,” and A(x) be “x can take a course in algorithms.” The premises are x (R(x) → D(x)), x (D(x) → A(x)) and R(Melissa). Using the first premise and Universal Instantiation, R(Melissa) → D(Melissa) follows. Using the third premise and Modus Ponens, D(Melissa) follows. Using the second premise and Universal Instantiation, A(Melissa) follows. So do the other roommates.d) Let C(x) be “x is in the class,”F(x) be “x has been to France,” and L(x) be “x has visited Louvre.” The premises are x(C(x)∧F(x)) and x (F(x) → L(x)). From the first premise and Existential Instantiation imply that C(y) ∧F(y) for a particularperson y. Using Simplification, F(y) follows. Using the second premise and Universal Instantiation F(y) → L(y) follows. Using Modus Ponens, L(y) follows. Using Existential Generalization, x(C(x) ∧L(x)) follows.24. The errors occur in steps (3), (5) and (7).For steps (3) and (5), we cannot assume, as is being done here, that the c that makes P(x) true is the same as the c that makes Q(x) true at the same time. For step (7), it is not a conjunction and there is no such disjunction rule.29.Step Reason1. x ┐P(x) Premise2. ┐P(c) Existential instantiation from (1)3. x (P(x) ∨Q(x)) Premise4. P(c) ∨Q(c) Universal instantiation from (3)5. Q(c) Disjunctive syllogism from (2) and (4)6. x (┐Q(x) ∨S(x)) Premise7. ┐Q (c) ∨S(c) Universal instantiation from (6)8. S(c) Disjunctive syllogism from (5) and (7)9. x (R(x) →┐S(x)) Premise10. R(c) →┐S(c) Universal instantiation from (9)11. ┐R(c) Modus tollens from (8) and (10)12. x ┐R(x) Existential generalization from (11)P.861.637.Suppose that P1→P4→P2→P5→P3→P1. To prove that one of these propositions implies any of the others, just use hypothetical syllogism repeatedly.P.1031.713.a) This statement asserts the existence of x with a certain property. If we let y=x, then we see that P(x) is true. If y is anythingother than x, then P(x) is not true. Thus, x is the unique element that makes P true.b) The first clause here says that there is an element that makes P true. The second clause says that whenever two elements both make P true, they are in fact the same element. Together these say that P is satisfied by exactly one element.c) This statement asserts the existence of an x that makes P true and has the further property that whenever we find an element that makes P true, that element is x. In other words, x is the unique element that makes P true.P.1202.19.T T F T T F16. Since the empty set is a subset of every set, we just need to take a set B that contains Φ as an element. Thus we can letA = Φ andB = {Φ} as the simplest example.20 .The union of the sets in the power set of a set X must be exactly X. In other words, we can recover X from its power set, uniquely. Therefore the answer is yes.22.a) The power set of every set includes at least the empty set, so the power set cannot be empty. Thus Φ is not the power set of any set.b) This is the power set of {a}c) This set has three elements. Since 3 is not a power of 2, this set cannot be the power set of any set.d) This is the power set of {a,b}.28.a) {(a,x,0), (a,x,1), (a,y,0), (a,y,1), (b,x,0), (b,x,1), (b,y,0), (b,y,1), (c,x,0), (c,x,1), (c,y,0), (c,y,1)}c) {(0,a,x), (0,a,y), (0,b,x), (0,b,y), (0,c,x), (0,c,y), (1,a,x), (1,a,y), (1,b,x), (1,b,y), (1,c,x), (1,c,y)}P.1302.214. Since A = (A - B)∪(A∩B), we conclude that A = {1,5,7,8}∪{3,6,9} ={1,3,5,6,7,8,9}. Similarly B = (B - A)∪(A ∩ B) = {2,10}∪{3,6,9} = {2,3,6,9,10}.24. First suppose x is in the left-hand side. Then x must be in A but in neither B nor C. Thus x∈A - C, but x B - C, so x is in the right-hand side. Next suppose that x is in the right-hand side. Thus x must be in A - C and not in B - C. The first of these implies that x∈A and x C. But now it must also be the case that x B, since otherwise we would have x∈B - C. Thus we have shown that x is in A but in neither B nor C, which implies that x is in the left-hand side.40. This is an identity; each side consists of those things that are in an odd number of the sets A,B,and C.P147.2.335a) This really has two parts. First suppose that b is in f(S∪T). Thus b=f(a) for somea∈S∪T. Either a ∈S, in which case b∈f(S), or a∈T, in which case b∈f(T). Thus in either case b∈ f(S) ∪f(T). This shows that f(S∪T) ?f(S) ∪f(T), Conversely, suppose b∈f(S) ∪f(T). Then either b∈f(S) or b∈f(T). This means either that b=f(a) for somea∈S or that b=f(a) for some a ∈T. In either case, b=f(a) for some a∈S∪T, so b∈f(S∪T). This shows that f(S) ∪f(T) ?f(S∪T), and our proof is complete. b)Suppose b∈f(S∩T). Then b=f(a) for some a∈S∩T. This implies that a∈S anda∈T , so we have b∈f(S) and b∈f(T). Therefore b∈f(S)∩f(T), as desired.52In some sense this question is its own answer—the number of integers between a and b, inclusive, is the number of integers between a and b, inclusive. Presumably we seek an express involving a, b, and the floor and/or ceiling function to answer this question. If we round a up and round b down to integers, then we will be looking at the smallest and largest integers just inside the range of the integers we want to count, respectively. These values are of course ??a and ??b, respectively. Then the answer isb-+1 (just think of counting all the integers between these two values, aincluding both ends—if a row of fenceposts one foot apart extends for k feet, then there are k +1 fenceposts). Note that this even works when, for example, a=0.3 and b=0.7 .P1622.434.a) This is countable. The integers in the set are ±1,±2,±4,±5,±7,andso on. We can listthese numbers in the order 1, -1 , 2, -2, 4, -4,…, thereby establishing the desired correspondence. In other words, the correspondence is given by 1?1,2?-1,3?2,4?-2,5?4,and so on.b) This is similar to part(a);we can simply list the elements of the set in order ofincreasing absolute value, listing each positive term before its correspondingnegative:5,-5,10,-10,15,-15,20,-20,30,-30,40,-40,45,-45,50,-50,……c) This is countable but a little tricky. We can arrange the numbers in a 2-dimensionaltable as follows:1..1 0.11 0.111 0.1111 0.11111 ……1.1 1 1.1 1.11 1.111 1.1111 ……1.1111 11.1 11.11 11.111 11.1111 ……1111.111 111.1 111.11 111.111 111.1111 ……………………………………d) This set is not countable. We can prove it by the same diagonalization argument aswas used to prove that the set of all reals is uncountable in Example 21.All we need to do is choose d i=1 when d ii=9 and choose d i=9 when d ii=1 or d ii is blank(if the decimal expansion is finite)46.We know from Example 21 that the set of real numbers between 0 and 1 is uncountable. Let us associate to each real number in this range(including 0 but excluding 1) a function from the set of positive integers to the set {0,1,2,3,4,5,6,7,8,9} as follows: If x is a real number whose decimal representation is 0.d1d2d3…(with ambiguity resolved by forbidding the decimal to end with an infinite string of9's),then we associate to x the function whose rule is given by f(n)=d n. clearly this is a one-to-one function from the set of real numbers between 0 and 1 and a subset of the set of all functions from the set of positive integers the set{0,1,2,3,4,5,6,7,8,9}.Two different real numbers must have different decimal representations, so the corresponding functions are different.(A few functions are left out, because of forbidding representations such as 0.239999…)Since the set of real numbers between 0 and 1 is uncountable, the subset of functions we have associated with them must be uncountable. But the set of all such functions has at least this cardinality, so it, too, must be uncountable.P1913.21. The choices of C and k are not unique.a) Yes C = 1, k = 10 b) Yes C = 4, k = 7 c) Nod) Yes C = 5, k = 1 e) Yes C = 1, k = 0 f) Yes C = 1, k = 29. x2+4x+17 ≤ 3x3 for all x>17, so x2+4x+17 is O(x3), with witnesses C = 3, k=17. However, if x3 were O(x2+4x+17), thenx3≤C(x2+4x+17) ≤ 3Cx2for some C, for all sufficiently large x, which implies that x≤ 3C, for all sufficiently large x, which is impossible.P2093.419.a) no b) no c) yes d) no31.a) GR QRW SDVV JRb) QB ABG CNFF TBc) QX UXM AHJJ ZXP2183.513.a) Yes b) No c) Yes d) Yes17a) 2 b) 4 c) 12P2804.122.A little computation convinces us that the answer is that n2 ≤ n! for n= 0, 1, and all n≥ 4. (clearly the inequality doesn’t hold for n=2 or n=3) We will prove by mathematical induction that the inequality holds for all n≥ 4. The base case is clear, since 16 ≤24. Now suppose that n2 ≤ n! for a given n≥ 4. We m ust show that (n+1)2≤ (n+1)!. Expanding the left-hand side, applying the inductive hypothesis, and then invoking some valid bounds shows this:n2 + 2n+ 1 ≤ n! + 2n + 1≤ n! + 2n + 1 = n! + 3n≤ n! + n·n≤ n! + n·n!≤ (n+1)n! = (n+1)!P2934.231.Assume that the well-ordering property holds. Suppose that P(1) is true and that the conditional statement [P(1)∧P(2)∧···∧P(n)] →P(n+1) is true for every positive integer n. Let S be the set of positive integers n for which P(n) is false. We will show S=?. Assume that S≠?, then by the well-ordering property there is a least integer m in S. We know that m cannot be 1 because P(1) is true. Because n=m is the least integer such that P(n) is false, P(1), P(2),…,P(m-1) are true, and m-1 ≥1. Because [P(1)∧P(2) ∧···∧P(m-1)] →P(m) is true, it follows that P(m) must also be true, which is a contradiction. Hence, S= ?. P3084.310.The base case is that S m(0)=m. The recursive part is that S m(n+1) is the successor of S m(n)(i.e., S m(n)+1)12.The base case n=1 is clear, since f12=f1f2=1. Assume the inductive hypothesis. Thenf12+f22+…+f n2+f n+12 = f n+12+f n f n+1= f n+1(f n+1+f n)= f n+1f n+2, as desired.31.If x is a set or variable representing set, then x is well-formed formula. if x and y are all well-formed formulas, then x, (x∪y), (x∩y) and (x-y) are all well-formed formulas.50.Let P(n) be “A(1, n) = 2n .”BASIC STEP: P(1) is true, because P(1) = A(1, 1) = 2 = 21.INDCUTIVE STEP: Assume that P(m) is true, that is A(1, m) = 2m and m≥1. Then P(m+1) = A(1, m+1) = A(0, A(1, m))= A(0, 2m)=2·2m=2m+1.So A(1, n) = 2n whenever n≥159.b) Not well defined. F(2) is not defined since F(0) isn’t.Also, F(2) is ambiguous.d) Not well defined. The definition is ambiguous about n=1.P3445.13.a) 104b) 10512.We use the sum rule, adding the number of bit strings of each length up to 6. If we include the empty string, then we get 20 + 21 + 22 + 23 + 24 + 25 + 26= 27–1=12720.a) Every seventh number is divisible by 7. Therefore there are 999 / 7=142such numbers. Note that we use the floor function, because the k th multiple of 7 does not occur until the number 7k has been reached.b) For solving this part and the next four parts, we need to use the principle of inclusion-exclusion. Just as in part(a), there are 999/11=90 numbers in our range divisible by 11, and there are 999/77=12 numbers in our range divisible by both 7 and 11 (the multiples of 77 are the numbers we seek). If we take these 12 numbers are away from the 142 numbers divisible by 7, we see that there are 130 numbers in our range divisible by 7 but not by 11.c) as explained in part(b), the answer is 12.d) By the principle of inclusion-exclusion, the answer, using the data from part (b), is 142+90-12=220.e) If we subtract from the answer to part(d) the number of numbers divisible by neither of them; so the answer is 220-12=208.f) If we subtract the answer to part(d) from the total number of positive integers less than 1000, we will have the number of numbers divisible by exactly one of them; so the answer is 999-220=779.g) If we assume that numbers are written without leading 0s, then we should break the problem down into three cases-one-digit numbers, two-digit numbers. Clearly there are 9 one-digit numbers, and each of them has distinct digits. There are 90 two-digit numbers (10 through 99), and all but 9 of them have distinct digits. An alternativeway to compute this is to note that the first digit must be 1 through 9 (9 choices) and the second digit must be something different from the first digit (9 choices out of the 10 possible digits), so by the product rule, we get 9*9=81 choices in all. This approach also tells us that there are 9*9*8=648 three-digit numbers with distinct digits (again, work from left to right-in the ones place, one 8 digits are left to choose from). 80 the final answer is 9+81+648=738.h) It turns out to be easier to count the odd numbers with distinct digits and subtract from our answer to part(g), so let us proceed that way. There are 5 odd one-digit numbers. For two-digit numbers, first choose the one digit (5 choices), then choose the tens digits (8 choices), since neither the ones digit value not 0 is available); therefore there are 40 such two-digit numbers. (Note that this is not exactly half of 81.) For the three-digit numbers, first choose the ones digit (5 choices), then the hundreds digit (8 choices), then the tens digit (8 choices), giving us 320 in all. So there are 5+40+320=365 odd numbers with distinct digits. Thus the final answer is 738-365=373.35.a) 若n=1, 为2;若n=2, 为2; 若n>=3, 为0b) 对于n>1, 为22 n;若n=1, 为1;c) 2(n-1) (注:n可映射到0,1两种可能)44.First we count the number of bit strings of length 10 that contain five consecutive 0’s. We will base the count on where the string of five or more consecutive 0’s starts. If it starts in the first bit, then the first five bits are all 0’s, but there is free choice for the last five bits; therefore there are 25 = 32 such strings. If it starts in the second bit, then the first bit must be a 1, the next five bits are all 0’s, but there is free choice for the last four bits; therefore there are 24 = 16 such strings. If it starts in the third bit, then the second bit must be a 1 but the first bit and the last three bits are arbitrary; therefore there are 24= 16 such strings. Similarly, there are 16 such strings that have the consecutive 0’s starting in each of positions four, five ,and six. This gives us a total of 32+5×16=112 strings that contain five consecutive 0’s. Symmetrically, there are 112 strings that contain five consecutive 1’s. Clearly there are exactly two strings that contain both (0000011111,1111100000). Therefore by the inclusion-exclusion principle, the answer is 2*(112)-2=222.52.We draw the tree, with its root at the top. We show a branch for each of the possibilities 0 and 1, for each bit in order, except that we do not allow three consecutive 0’s. Since there are 13 leaves, the answer is 13.second bitthird bitfourth bitP3535.26.There are only d possible remainders when an integer is divided by d, namely 0, 1, …, d-1. By the pigeonhole principle, if wehave d+1 remainders, then at least two must be the same.10.The midpoint of the segment whose endpoints are (a,b) and (c,d) is ( ( a + c ) / 2, ( b + d ) / 2). We are concerned only with integer values of the original coordinates. Clearly the coordinates of these fractions will be integers as well if and only if a and c have the same parity (both odd or both even) and b and d have the same parity. Thus what matters in this problem is the parities of coordinates. There are four possible pairs of parities: (odd,odd), (odd, even), (even, even) and (even,odd). Since we are given five points, the pigeonhole principle guarantees that at least two of them will have the same pair of parties. The midpoint of the segment joining these two points will therefore have integer coordinates.38.a) T b) Tc) T1 ≤a1< a2 < …< a75≤ 125 , and 26 ≤a1 + 25 < a2 + 25 < …< a75 + 25 ≤ 150.Now either of these 150 numbers are precisely all the number from 1 to 150, or else by the pigeonhole principle we get, as in Exercise 37, a i = a j + 25 for some i and j and we are done. In the former case, however, since each of the number a i + 25 is greater than or equal to 26, the numbers 1, 2, … , 25 must all appear among the a i’s. But since the a i’s are increasing, the only way this can happen is if a1=1, a2 =2 , …, a25=25. Thus there were exactly 25 matches in the first25 hours.d) TWe need a different approach for this part, an approach, incidentally, that works for many numbers besides 30 in this setting. Let a1, a2 , …a75 be as before, and note that 1 ≤a1< a2 < …< a75≤ 125. By the pigeonhole principle two of the numbers among a1, a2 , …a 31 are congruent modulo 30. If they differ by 30, then we have our solution. Otherwise they differ by 60 or more, so a 31 ≥ 61. Similarly, among a 31through a 61 ,either we find a solution, or two numbers must differ by 60 or more; therefore we assume that a 61 ≥ 121. But this means that a 66 ≥ 126, a contradiction.注:38题d 因为30⼤于25,不能⽤解决a,b,c的⽅法解决,所以适⽤⼀种新的⽅法(这种⽅法对前⾯3问同样适⽤的)。
《离散数学》考试试卷(试卷库20卷)及答案
《离散数学》考试试卷(试卷库20卷)及答案第 1 页/共 4 页《离散数学》考试试卷(试卷库20卷)试题总分: 100 分考试时限:120 分钟、选择题(每题2分,共20分)1. 设论域为全总个体域,M(x):x 是人,Mortal(x):x 是要死的,则“人总是要死的”谓词公式表示为( )(A ))()(x Mortal x M → (B ))()(x Mortal x M ∧(C )))()((x Mortal x M x →?(D )))()((x Mortal x M x ∧?2. 判断下列命题哪个正确?( )(A )若A∪B=A∪C,则B =C (B ){a,b}={b,a}(C )P(A∩B)≠P(A)∩P (B)(P(S)表示S 的幂集)(D )若A 为非空集,则A ≠A∪A 成立3. 集合},2{N n x x A n∈==对( )运算封闭(A )乘法(B )减法(C )加法(D )y x -4. 设≤><,N 是偏序格,其中N 是自然数集合,“≤”是普通的数间“小于等于”关系,则N b a ∈?,有=∨b a ( )(A )a(B )b(C )min(a ,b)(D ) max(a ,b)5. 有向图D=,则41v v 到长度为2的通路有( )条(A )0 (B )1 (C )2 (D )36. 设无向图G 有18条边且每个顶点的度数都是3,则图G 有( )个顶点(A )10 (B )4 (C )8 (D )127. 下面哪一种图不一定是树?()(A )无回路的连通图(B )有n 个结点n-1条边的连通图(C )每对结点间都有通路的图(D )连通但删去一条边则不连通的图 8. 设P :我将去镇上,Q :我有时间。
命题“我将去镇上,仅当我有时间”符号化为()(A )P →Q (B )Q →P (C )P Q (D )Q P ?∨? 9. 下列代数系统中,其中*是加法运算,()不是群。
离散数学试题及答案
离散数学试题及答案Mock ExamNotes___________________________________________________________________________________ 1. There are 38 questions in this mock exam. The real exam will consist of about 25 questions that will be relatively similar to those here... that does not mean “identical” to those...2. If you do these well, you should have no big difficulties in the final exam.3. I encourage you to work these questions first on your own, without help, to see what you do or do not understand. You may seek help after that. Remember that no one will help you or give you hints during the exam. We will clarify the questions if something is not clear but not more than that.#01 - Page 13 #8Let p and q be the propositionsp : I bought a lottery ticket this week.q : I won the million dollar jackpot.Express each of these propositions as an English sentence.a) ¬p I did not buy a lottery ticket this week.b) p ∨q I bought a lottery ticket this week or I won the million dollar jackpot.c) p → q If I bought a lottery ticket this week then I won the million dollar jackpot.d) p ∧q I bought a lottery ticket this week and I won the million dollar jackpot.e) p ? q I bought a lottery ticket this week if, and only if, I won the million dollar jackpot.#02 - Page 15 #36Construct a truth table for each of these compound propositions.a) (p ∨q) ∨rp q r p ∨q(p ∨q) ∨rT T T T TT T F T TT F T T TT F F T TF T T T TF T F T TF F T F TF F F F Fc) (p ∧q) ∨r∧(p q)∧∨rT T T T TT T F T TT F T F TT F F F FF T T F TF T F F FF F T F TF F F F Fe) (p ∨q)∧¬r∨∧¬rp q r p ∨q¬r(p q)T T T T F FT T F T T TT F T T F FT F F T T TF T T T F FF T F T T TF F T F F FF F F F T F#03 - Page 35 #9Show that each of these conditional statements is a tautology by using truth tables.c) ¬p → (p → q)p q¬p p → q¬p → (p → q)T T F T TT F F F TF T T T TF F T T Td) (p ∧q) → (p → q)∧p → q(p q) → (p → q)∧p q p qT T T T TT F F F TF T T T Te) ¬(p → q) → pp q p → q¬(p → q)¬(p → q) → p T T T F TT F F T TF T T F TF F T F T#04 - DNFWrite the following proposition in disjunctive normal form:s = (r → p) → (p∧q)p q r r → p p∧q sT T T T T TT T F T T TT F T T F FT F F T F FF T T F F TF T F T F FF F T F F TF F F T F Fs=(p∧q∧r)∨(p∧q∧?r)∨(?p∧q∧r)∨(?p∧?q∧r)=(p∧q)∨(?p∧r)#05 - Page 53 #8Let I (x) be the statement “x has an Internet connection” and C(x, y) be the statement “x and y have chatted over the Internet,”where the domain for the variables x and y consists of all students in your class. Use quantifiers to express each of these statements.b) Rachel has not chatted over the Internet with Chelsea.C(Rachel, Charles)e) Sanjay has chatted with everyone except Joseph.x(x ≠ Joseph → C(Sanjay, x))f ) Someone in your class does not have an Internet connection.x(¬I(x))i) Everyone except one student in your class has an Internet connection.!?y[¬I(y) ∧?x(x ≠ y → I(x))]j) Everyone in your class with an Internet connection has chatted over the Internet with at least one other student in your class.x yC(x, y)m) There is a student in your class who has chatted with everyone in your class over the Internet.xyC(x, y)a) ?x?y(x2 = y) Truec) ?x?y(xy = 0)Truee) ?x(x = 0 → ?y(xy = 1))False∧x ? y = 1)Falsei) ?x?y(x + y = 2 2j) ?x?y?z(z = (x + y)/2)TrueUse rules of inference to show that the hypotheses “If it does not rain or if it is not foggy, then the sailing race will be held and the lifesaving demonstration will go on,” “If the sailing race is held, then the trophy will be awarded,” and “The trophy was not awarded” imply the conclusion “It rained.”Define the following literals:r It rainsf It is foggys The sailing race will be heldd The lifesaving demonstration will go ont The trophy will be awardedThe premises are then∧P1(?r ∨ ?f) → (s d)P2s → tP3?tand the conclusion isrThe proof proceeds as follows:1?t P32s → t P23?s Modus tollens with 1 and 2'∨Addition to 34?s ?d∧De Morgan's law5?(s d)∨) → (s d)∧P16(?r ?f∨)Modus tollens with 5 and 67?(?r ?f8r f9r Simplification of 8#09 – Page 80 #27Use rules of inference to show that if ?x(P(x) → (Q(x) ∧S(x))) and ?x(P(x) ∧R(x)) are true, thenx(R(x) ∧S(x)) is true.∧Premise1x(P(x) R(x))∧Universal instantiation2P(c) R(c)3P(c)Simplification from 24x(P(x) →∧Premise(Q(x) S(x)))∧Universal instantiation5P(c) → (Q(c) S(c))∧Modus ponens with 3 and 56Q(c) S(c)7S(c)Simplification from 68R(c)Simplification from 2∧Conjunction of 7 and 89R(c) S(c)∧Universal generalization10x(R(x) S(x))Prove that if n is a positive integer, then n is odd if and only if 5n + 6 is odd.First, assume that n is odd, so that n = 2k+1 for some integer k. Then 5n+6 = 5(2k+1)+6 = 10k + 11 = 2(5k + 5) + 1. Hence, 5n + 6 is odd. To prove the converse, suppose that n is even, so that n = 2k for some integer k. Then 5n + 6 = 10k + 6 = 2(5k + 3), so 5n + 6 is even. Hence, n is odd if and only if 5n + 6 is odd.#11 – Page 126 #19What is the cardinality of each of these sets?a) {a}1b) {{a}}1c) {a, {a}}2d) {a, {a}, {a, {a}}}3#12 – Page 126 #40Explain why (A × B) × (C × D) and A × (B × C) × D are not the same.#13 – Page 136 #27Draw the Venn diagrams for each of these combinations of the sets A, B, and C.b) (A ∩ B) ∪(A ∩ C)c) (A ∩ B) ∪(A ∩ C)#14 – Page 153 #22Determine whether each of these functions is a bijection from R to R.a) f (x) = ?3x + 4Yesb) f (x) = ?3x2 + 7No: elements greater than 7 have no preimages.c) f (x) = (x + 1)/(x + 2)No: -2 has no imaged) f (x) = x5 + 1YesFor each of these sequences find a recurrence relation satisfied by this sequence. (The answers are not unique because there are infinitely many different recurrence relations satisfied by any sequence.)a) a n= 3a n= a n-1c) a n= 2n + 3a n-1= 2(n - 1)+ 3 = 2n + 3 – 2 = a n – 2. This implies that a n= a n-1+ 2.f ) a n= n2 + n(e1)Here we have two independent terms with n. We will need two additional formulas:a n-1= (n-1)2 + n – 1 = n2 – 2n + 1 + n – 1 = n2 – n(e2)a n-2= (n-2)2 + n – 2 = n2 – 4n + 4 + n – 2 = n2 – 3n + 2(e3)From (e1) and (e2), we have a n – a n-1 = 2n(e4)From (e2) and (e3), we have a n-1 – a n-2 = 2n – 2(e5)From (e4) and (e5), we have a n – a n-1 – (a n-1 – a n-2) = a n – 2a n-1+ a n-2 = 2, or a n = 2a n-1– a n-2+ 2 g) a n= n + (?1)n(e1)a n-1 = n – 1 + (?1)n-1 = n – 1 – (?1)n(e2)or a n = a n-1 + 1 + 2(?1)nWe can split this into the odd an even n's:a2k = a2k-1 + 1a2k+1 = a2k? 1h) a n= n!a n = n a n-1#16 – Page 583 #30 (+ additional questions)Let R1 = {(1, 2), (2, 3), (3, 4)} and R2 = {(1, 1), (1, 2), (2, 1), (2, 2), (2, 3), (3, 1), (3, 2), (3, 3), (3, 4)} be relations from {1, 2, 3, 4} to {1, 2, 3, 4}. Finda) R1∪R2 = {(1, 1), (1, 2), (2, 1), (2, 2), (2, 3), (3, 1), (3, 2), (3, 3), (3, 4)} = R2b) R1 ∩ R2 = {(1, 2), (2, 3), (3, 4)} = R1c) R1 ? R2 = ?d) R2 ? R1 = {(1, 1), (2, 1), (2, 2), (3, 1), (3, 2), (3, 3)}e) R1 ? R2 = {(1, 2), (1, 3), (2, 2), (2, 3), (2, 4), (3, 2), (3, 3), (3, 4)}f ) R2 ? R1 =g) Draw the graph of R1 ? R2.h) Find the reflexive, symmetric and transitive closures ofReflexive closure = {(1, 1), (1, 2), (2, 2), (2, 3), (3, 4), (3, 4), (4, 4)}Symmetric closure = {(1, 2), (2, 1), (2, 3), (3, 2), (3, 3), (4, 3)}Transitive closure = {(1, 2), (1, 3), (2, 3), (2, 4), (3, 1), (3, 4), (4, 1), (4, 2)}Let R be the relation consisting of all pairs (x, y) such that x and y are strings of uppercase and lowercase English letters with the property that for every positive integer n, the n th characters in x and y are the same letter, either uppercase or lowercase. Show that R is an equivalence relation.That definition basically means that two strings are equivalent if, and only if, they have the same length and every corresponding characters x i and y i are the same letter, either lower or upper case.Let c and C stand for the lower and upper cases of a same letter in the English alphabet.Clearly k, xk = x k. So (x, x) ∈ R.So R is reflexive.If (x,y)∈ R, then k, xk∈ {c, C} and y k∈ {c, C}. So (y, x) ∈ R also. So R is symmetric.Therefore R is an equivalence relation.#18 – Page 631 #34Answer these questions for the poset ({2, 4, 6, 9, 12, 18, 27, 36, 48, 60, 72}, |).a) Find the maximal elements.27, 48, 60, 72b) Find the minimal elements.2, 9c) Is there a greatest element?Nod) Is there a least element?Noe) Find all upper bounds of {2, 9}.18,36 72f ) Find the least upper bound of {2, 9}, if it exists.18g) Find all lower bounds of {60, 72}.2, 4, 6, 12h) Find the greatest lower bound of {60, 72},if it exists.12#19 – Group TheoryConsider the set G={a1+a2√3 | a1,a2∈?∧a1a2≠0}with the usual multiplication operation.a) Show that G is a group by verifying the axioms of closure, associativity, existence of an identity element, and existence of an inverse element for every element. Specify what the identity element is and the form an an inverse element.1. Closure: Let a,b∈G. Then ab=(a1+a2√3)(b1+b2√3)=(a1b1+3a2b2)+(a1b2+a2b1)√(3)∈G2 Associativity: Let a ,b ,c ∈G . Then (ab )c =[(a 1+a 2√3)(b 1+b 2√3)]c=[(a 1b 1+3a 2b 2)+(a 1b 2+a 2b 1)√(3)](c 1+c 2√3)=[(a 1b 1+3a 2b 2)c 1+3(a 1b 2+a 2b 1)c 2]+[(a 1b 1+3a 2b 2)c 2+(a 1b 2+a 2b 1)c 1]√(3)=a 1b 1c 1+3a 2b 2c 1+3a 1b 2c2+3a 2b 1c 2+[a 1b 1c 2+3a 2b 2c 2+a 1b 2c 1+a 2b 1c 1]√(3)=[a 1(b 1c 1+3b 2c 2)+3a 2(b 1c 2+b 2c 1)]+[a 2(b 1c 1+3b 2c 2)+a 1(b 1c 2+b 2c 1)]√(3)=(a 1+a 2√3)[(b 1c 1+3b 2c 2)+(b 1c 2+b 2c 1)√(3)]=a [(b 1+b 2√3)(c 1+c 2√3)]=a (bc )3. Identity element. Let this element be e =e 1+e 2√. Thenea =(e 1+e 2√3)(a 1+a 2√3)=(e 1a 1+3e 2a 2)+(e 1a 2+e 2a 1)√(3)=(a 1+a 2√3).This implies that for every a 1 and a 2:e 1a 1+3e 2a 2=a 1e 1a 2+e 2a 1=a 2That implies e 1=1and e 2=0. Thus e =1.4. Inverse element. Consider a =a 1+a 2√3∈G and let its inverse be a ?1=x 1+x 2√3if it exists. Then we must havea ?1a =(x 1+x 2√3)(a 1+a 2√3)=(x 1a 1+3x 2a 2)+(x 1a 2+x 2a 1)√(3)=1=e This impliesx 1a 1+3x 2a 2=1x 1a 2+x 2a 1=0The solution isa ?1=a 1?a 2√3a 12?3a 22.Thus G forms a group.b) Is G Abelian?Yes: ab =(a 1+a 2√3)(b 1+b 2√3)=(a 1b 1+3a 2b 2)+(a 1b 2+a 2b 1)√(3)=ba because this expression is symmetric.#20 – Page 665 #9Determine the number of vertices and edges and find the in-degree and out-degree of each vertex for the shown directed multigraph:5 vertices 13 edgesdeg+(a) = 1, deg+(b) = 1, deg+(c) = 5, deg+(d) = 4, deg+(e) = 0deg?(a) = 6, deg?(b) = 5, deg?(c) = 2, deg?(d) = 2, deg?(2) = 0Suppose that a newcompany has five employees: Zamora, Agraharam, Smith, Chou, and Macintyre. Each employee will assume one of six responsiblities: planning, publicity, sales, marketing,development, and industry relations. Each employee is capable of doing one or more of these jobs: Zamora could do planning, sales, marketing, or industry relations; Agraharam could do planning or development; Smith could do publicity, sales, or industry relations; Chou could do planning, sales, or industry relations; and Macintyre could do planning, publicity, sales, or industry relations.a) Model the capabilities of these employees using a bipartite graph.b) Find an assignment of responsibilites such that each employee is assigned one responsibility.Note: the assignment is not unique. The only forced choices are (Z, ma) and (A, de). There is a variety of possibilities for the other 3.c) Is the matching of responsibilities you found in part (b) a complete matching? Is it a maximum matching?The matching (from {Z, A, S, C, M} to {ma, de, sa, pl, pu, ir}) is complete because every employee is matched with a job. It is a maximum because |M| = 5 = |{Z, A, S, C, M}|#22 – Page 676 #21 (+ additional questions)Consider the following grapha) Find the adjacency matrix A of the graph A =(1110100220111210)b) Find how many paths of length 3 there are from c to b A 3=A (1110100220111210)(1110100220111210)=(1110100220111210)(4123353054415125)=(12109414361318710121512124So there are 6 paths from c to b.#23 – Page 676 #38Determine whether the following two graphs are isomorphic. If so, construct an isomorphism.Notice the second graph can be deformed like this (by moving v 2 all the way down and rotating the other vertices by about a quarter of a turn):It has 2 circuits of length 4 whereas the graph on the left has only 1. That immediately implies that these graphs are not isomorphic.#24 – Page 692 #31-32Consider the following graphs#31#31a) List the cut vertices c c, db) List the cut edges none(c,d)c) What is the vertex connectivity κ(G)?11d) What is the edge connectivity λ(G)?21#25 – Page 704 #22Determine whether the directed graph shown has an Euler circuit. Construct an Euler circuit if one exists. If no Euler circuit exists, determine whether the directed graph has an Euler path. Construct an Euler path if one exists.The vertices' total degrees are all even except for vertices b and c. So it has no Euler circuit but there might be an Euler path, although this is not guaranteed because the graph is directed. However every vertex with an even total degree has equal in and out degrees. Beccause the out-degree of c is larger than its in-degree, then the starting point has to be c. In fact, we o find an Euler path:c → e → b → c → b → f → a → f → e → f →d →Find a shortest path (in mileage) between each of the following pairs of cities in the airline system shown in Figure 1.Note: You must show every steps of the algorithmB N M ACD S L-0------N 191/N-1090/N760/N722/N-2534/N2451/N B --1090/N760/N722/N-2534/N2451/N C --1090/N760/N-1630/C2534/N2451/N A --1090/N--1630/C2534/N2451/N D --1090/N---2534/N2451/N M ------2534/N2451/N LPath = N → L Distance = 2451b) Boston and San FranciscoB N M ACD S L0-------B -191/B--860/B---N --1281/N951N860/B-2725/N2642/N C --1281/N951N-1768/C2715/C2642/N A --1281/N--1768/C2715/C2642/N M -----1768/C2715/C2642/N D ------2715/C2602/D L ------2715/C-SPath = B → C → S Distance = 2715c) Miami and DenverB N M ACD S L--0-----M -1090/M-595/M----A -1090/M--1201/A---N 1281/N---1201/A-3624/N3541/N C 1281/N----2109/C3056/C3541/N B -----2109/C3056/C3541/N DPath = M → A → C → D Distance = 2109B N M ACD S L--0-----M-1090/M-595/M----A-1090/M--1201/A---N-----2109/C3056/C3541/N D------3056/C2943/D LPath = M → A → C → D → L Distance = 2943#27 – Page 726 #12Suppose that a connected planar graph has eight vertices, each of degree three. Into how many regions is the plane divided by a planar representation of this graph?We have V = 8. Each node has a degree equal to 3. The sum of all the degrees is therefore 24 and we know it is equal to twice the number of edges; thus E = 12. Recall Euler's formula: V – E + F = 2. So we have 8 – 12 + F = 2, which implies that F = 6.#28 – Page 732 #4Construct the dual graph for the map shown. Then find the number of colors needed to color the map so that no two adjacent regions have the same color.#29 – Page 733 #17Schedule the final exams for Math 115, Math 116, Math 185, Math 195, CS 101, CS 102, CS 273, and CS 473, using the fewest number of different time slots, if there are no students taking both Math 115and CS 473, both Math 116 and CS 473, both Math 195 and CS 101, both Math 195 and CS 102, both Math 115 and Math 116, both Math 115 and Math 185, and both Math 185 and Math 195, but there are students in every other pair of courses.The best way to obtain a graph for this is to draw a complete graph and then remove edges according to the description in the above paragraph.{MAT115, MAT116, CS473}{MAT185, MAT195}{CS101}{CS102}{CS273}The scheduling is not unique.#30 – Page 755 #4Consider the following rooted tree:c) Which vertices are leaves?c, f, j, k, l, m, n, p, q, r, sd) Which vertices are children of n?nonee) Which vertex is the parent of g?bf ) Which vertices are siblings of k?jg) Which vertices are ancestors of o?a, d, ih) Which vertices are descendants of d?h, i, n, o, p, q, r, s#31 – Page 756 #20How many leaves does a full 3-ary tree with 100 vertices have? L=(m?1)n+1n =(3?1)×100+13=2013=67MAT185MAT195CS473CS273CS101CS102#32 – Page 769 #2Build a binary search tree for the words oenology, phrenology, campanology, ornithology, ichthyology , limnology, alchemy , and astrology using alphabetical order.#33 – Page 770 #24Use Huffman coding to encode these symbols with given frequencies: A: 0.10, B: 0.25, C: 0.05, D: 0.15, E: 0.30, F: 0.07, G: 0.08. What is the average number of bits required to encode a symbol?0.050.070.080.100.150.250.30 C F G A D B E0.080.100.120.150.250.30 GADBE0.120.150.180.250.30 DB E0.180.250.270.270.300.43Eoenologyphrenologycampanology ichthyology alchemy astrology limnologyornithology0.430.571.00Codes:A = 110B = 10C = 0111D = 010E = 00F = 0110Consider the following rooted tree:In which order are the vertices visited using a preorder traversal?a, b, d, e, i, j, m, n, o, c, f, g, h, k, p, l #35 – Page 784 #23What is the value of the following prefix expression?a) ? 2 / 8 4 32 ?/ 8 4 3=? 2 2? 3=? 4 3=1GACFCFb) ↑ ? 3 3 4 2 55=↑ ? 3 38 54 2↑ ? 3 3=↑ ? 9 8 5=↑ 1 5=1c) + ? ↑ 3 2 ↑ 2 3 / 6 ? 4 2+ ? ↑ 3 2 ↑ 2 3 / 6 ? 4 2=+ ? ↑ 3 2 ↑ 2 3 / 6 2=+ ? ↑ 3 2 ↑ 2 3 3=+ ? ↑ 3 2 8 3=+ ? 9 8 3d) + 3 + 3 ↑ 3 + 3 3 3+ 3 + 3 ↑ 3↑ 3 6 3+ 3 3 3= + 3 + 3+ 3 729 3= + 3=?+ 3 732 3= 735 3=2205#36 – Page 795 #13Use depth-first search to produce a spanning tree for the following simple graph. Choose vertex 'a' as the root of this spanning tree and assume that the vertices are ordered alphabetically.a →b →c →d →e →f →g →h → Ig → j#37 – Page 802 #3Use Prim's algorithm to find a minimum spanning tree (and its total weight) for the following weighted graph:(ef)1(cf)3(eh)3(hi)2(gh)4(bc)4(bd)3(ad)2Total weight = 22#38 – Page 802 #8Use Kruskal’s algorithm to find a minimum spanning tree for the weighted graph in Exercise 4 (#37). (ef)1 (ad)2(hi)2(bd)3(cf)3(eh)3(bc)4(gh)4Total weight = 22The spanning tree is identical to that in Exercise 4 (#37).。
离散数学英文试题A
《离散数学》课程试题【A】卷阅卷须知:阅卷用红色墨水笔书写,得分用阿拉伯数字写在每小题题号前,用正分表示,不得分则在题号前写0;大题得分登录在对应的分数框内;统一命题的课程应集体阅卷,流水作业;阅卷后要进行复核,发现漏评、漏记或总分统计错误应及时更正;对评定分数或统分记录进行修改时,修改人必须签名。
特别提醒:学生必须遵守课程考核纪律,违规者将受到严肃处理。
PLEASE ANSWER IN CHINESE OR IN ENGLISH!!1. Fill the best answer in the blanks (3 points each,15 points in all)(1) If A, B, and C be sets, then (A–C) – (B–C) ___________ A–B.(2) A relation on a set A that is reflexive, symmetric, and transitive is called an (or a) ___________relation.(3) K n has ___________edges.(4) There are _______ __non-isomorphic rooted trees with four vertices.(5) Assume that P(x, y) means “x+ 2y= xy”, where x and y are integers. Then the truth value of thestatement ∀x∃y P(x, y) is _______ __.2. Choose the corresponding letter of the best answer that best completes the statements oranswers the questions among A, B, C, and D and fill the blanks (3 points each,15 pointsin all).(1) Suppose A = {1, 2, 3}. The following statement ( ) is not true. A .∅ ⊆(A )B .{∅} ⊆ (A )C .{2, 3} A AD .{{2}} ⊆(A )(2) Suppose that R and S are transitive relations on a set A . Then ( ) is transitive. A . S R ⋂ B .S R ⋃ C . S R - D .S R(3) There are ( ) strongly connected components of the following graph G .A. 1B. 2C. 3D. 4(4) There are ( ) nonisomorphic undirected trees with 5 vertices.A. 6B. 5.C. 4D. 3(5) Suppose P (x , y ) is a predicate and the universe for the variables x and y is {1,2,3}. Suppose P (1,3), P (2,1), P (2,2), P (2,3), P (3,1), P (3,2) are true, and P (x , y ) is false otherwise. The following statement ( ) is true.A. ∀y ∃x (P (x , y ) → P (y , x ))B. ¬∃x ∃y (P (x , y ) ∧ ¬P (y , x ))C. ∀x ∀y (x ≠ y → (P (x , y ) ∨ P (y , x ))D. ∀y ∃x (x ≤ y ∧ P (x , y ))3. Write “” for true, and “” for false in the blanks at end of each statement (3 pointseach ,15 points in all).(1) There is a set S such that its power set (S) has 12 elements. ( )(2) An irreflexive and transitive relation on a set A is antisymmetric. ( )(3) The largest value of n for which K n is planar is 6. ( )(4) Every full binary tree with 61 vertices has 31 leaves. ( )(5) Logical expressions ))(x)xB(∧∀are equivalent. ( )xA∀x∀and)(x∧((x)AxB4.For any function f: A B, define a new function g: (A) (B) as follows: for every S A, g(S) = {f(x)|x S}. Prove that g is surjective (or onto) if and only f is surjective(or onto). (10 points)5.Find the transitive closure t(R) of R on {a, b, c, d} and draw the graph of t(R) where R = {(a, a), (b, a), (b,c), (c, a), (c, c), (c, d), (d, a), (d, c)}. (10 points)6. Either give an example or prove that there is none: A graph with 7 vertices that has a Hamilton circuit but no Euler circuit. (10 points)7. Let G be an undirected tree with 3 vertices of degree 3, 1 vertex of degree 2, the other vertices of degree 1.(15 points)(1) How many vertices in G are there?(2) Draw two nonisomorphic undirected trees satisfying the above requirements.8. Show that p→ (q→ r) and p→ (q∧ r) are logically equivalent. (10 points)。
离散数学练习题(含答案)
离散数学练习题(含答案)题目1. 对于集合 $A={1,2,3,...,10}$ 和 $B={n|n是偶数,2<n<8}$,求 $A \cap B$ 的元素。
2. 存在三个可识别的状态A,B,C。
置换群 $S_3$ 作用在状态集上。
定义四个动作:$α: A → C, β: A → B, γ: C→ A, δ: B→ C$。
确定式子,描述 $\{α,β,γ,δ\}$ 的乘法表。
3. 证明 $\forall n \in \mathbb{N}$,合数的个数不小于$n$。
4. 给定一个无向带权图,图中每个节点编号分别是$1,2,...,n$,证明下列结论:a. 如果从节点$i$到$j$只有一条权值最小的路径,则这条路径的任意子路径都是最短路径。
b. 如果从节点$i$到$j$有两条或两条以上权值相等的路径,则从$i$到$j$的最短路径可能不唯一。
答案1. $A \cap B = \{2,4,6\}$。
2. 乘法表:3. 对于任意$n$,我们可以选择$n+1$个连续的自然数$k+1,k+2,...,k+n,k+n+1$中的$n$个数,其中$k \in \mathbb{Z}$。
这$n$个数构成的$n$个正整数均为合数,因为它们都至少有一个小于它自身的因子,所以不是质数。
所以合数的个数不小于任意$n$。
4.a. 根据题意,从$i$到$j$只有一条权值最小的路径,即这条最短路径已被确定。
如果从这条路径中任意取出一段子路径,假设这段子路径不是这个节点到$j$的最短路径,那么存在其他从$i$到$j$的路径比这段子路径更优,又因为这条路径是最短路径,所以这段子路径也一定不优于最短路径,矛盾。
所以从这条路径中任意取出的子路径都是最短路径。
b. 如果从节点$i$到$j$有多条权值相等的路径,则这些路径权值都是最短路径的权值。
因为所有最短路径的权值相等,所以这些路径的权值就是最短路径的权值。
所以从$i$到$j$的最短路径可能不唯一。
离散数学模拟题及部分答案(英文)
Discrete Mathematic TestEditor: Jin PengDate: 2008.5.6Contents:Discrete Mathematic Test (Unit 1) (3)Discrete Mathematic Test (Unit 2) (8)Discrete Mathematic Test (Unit 3) (13)Discrete Mathematic Test 1 (17)Discrete Mathematic Test 2 (22)Appendix1 Answer to Discrete Mathematic Test(Unit 1) (27)Appendix2 Answer to Discrete Mathematic Test 2 (31)Discrete Mathematic Test (Unit 1)Part I (T/F questions, 15 Scores)In this part, you will have 15 statements. Make your own judgment, and thenput T (True) or F (False) after each statement.1. Let A, B, and C be sets such that A∪B=A∪C, then B=C. ( )2. Let A and B be subsets of a set U, and A B, then A△B=A Band A∩B’=. ( )3. Let p a nd q and r be three statements. If ~pÚ~q ≡ ~pÚ~r, then q and r have the samevalue. ( )4. Let A, B be sets such that both AÍB and AÎB is possible. ( )5. Let p and q be two statements, then (p®~q) ®((~pÚ~q)(p®~q)) is a tautology.( )6.Let A, B be sets, P(A) is the power set of A, then P(A B)=P(A)P(B). ( )7. Let A, B, and C be sets, then if AÎB,BÍC,then AÍC. ( )8. Let A, B be sets, if A={Æ}, B=P(P(A)), then {Æ}ÎB and{Æ}ÍB. ( )9. Let x be real number, then xÎ{x}{{x}} and {x}Í{x}{{x}}. ( )10. Let A, B, and C be sets, then A (B∪C) = (A B) ∪(A C). ( )11. If A={x}∪x, then xÎA and xÍA. ( )12. (x)(P(x)∧Q(x))and (x)P(x) ∧(x)Q(x) are equivalent. ( )13. Let A and B be sets, then A×(B C)=(A×B) (A×C). ( )14. The argument formula (pÚq)® (r s), (sÚt)®w╞ p®w is valid. ( )15. (x)(P(x) ®Q(x))and (x)P(x) ® (x)Q(x) are equivalent. ( )Part II (1 Foundations: Sets Logic, and Algorithms , 85 Scores)1. (8 points)What sets so each of the Venn diagrams in following Figure represent?2. (8 points)Let U={1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}. Let A={1,5,6,9,10,15} and B={5,6,8,9,12,13}. Determine the following:Find a. SA b. SA’ c. SB d. SA∩B .3. (8 points) A class of 45 students has 3 minors for options, respectively A, B and C. A is the set of students taking algebra, B is the set of students who play basketball, C is the set of students taking the computer programming course. Among the 45 students, 12 choose subject A, 8 choose B and another 6 choose C. Additionally, 9 students choose all of the three subjects.What is the at least number of students do not taking the algebra course and the computer programming course and playing basketball?4. (8 points)Find a formula A that uses the variables p and q such that A is true only when exactly one of p and q is true.5. (8 points)Prove the validity of the logical consequences.Anne plays golf or Anne plays basketball. Therefore, Anne plays golf.6. (9 points)Prove the validity of the logical consequences.If the budget is not cut then prices remain stable if and only if taxes will be raised. If the budget is not cut, then taxes will be raised. If price remain stable, then taxes will not be raised. Therefore, taxes will not be raised.7. (8 points) (1) What is the universal quantification of the sentence: x2 +x is an even integer, where x is an even integer? Is the universal quantification a true statement?(2) What is the existential quantification of the sentence: x is a prime integer, where x is an odd integer? Is the existential quantification a true statement?8. (12 points)Symbolize the following sentences by using predicates, quantifiers, and logical connectives.(1) Any nature number has only one successor number.(2) For all x,y N, x+y=x if and only if y=0.(3) Not all nature number x N, it exist a nature number y N, such that x≤y.9. (8 points)Show that x(~F(x)∨A(x)),x(A(x) →B(x)),x F(x)|= x B(x)10. (8 points)In the bubble sort algorithm, if successive elements L[j] and L[j+1] are such that L[j]>L[j+1], then they are interchanged, that is, s. Therefore, the bubble sort algorithm may require elements to be s. Show how bubble sort sorts the elements 7 5 6 3 1 4 2 in increasing order. Draw figures.Discrete Mathematic Test (Unit 2)Part I (T/F questions, 15 Scores)In this part, you will have 15 statements. Make your own judgment, and then put T (True)or F (False) after each statement.1.Let A and B be sets such that any subsets of A B is a relation from A to B. ( )2. Let R={(1,1),(1,2),,(3,3) ,(3,1) ,(1,3)} be relations on the set A={1,2,3}then R is transitive. ( )3. Let R={(1,1),(2,2),(2,3),(3,3)} be relations on the set A={1,2,3}then R is symmetric.( )4. Let R be a symmetric relation. then Rn is symmetric for all positive integers n. ( )5. Let R and S are reflexive relations on a set A then maybe not reflexive.( )6. Let R={(a,a),(b,b),(c,c) ,(a,b) ,(b,c)} be relations on the set A={a,b,c}then R is equivalence relation. ( )7. If R is equivalence relation,then the transitive closure of R is R. ( )8. Let R be relations on a set A,then R maybe symmetric and antisymmetic. ( )9. If and are partition of a given set A,then ∪ is also a partition of A.( )10.Let R and S are equivalence relations on a set A, Let ψ be the set of all equivalenceclass of R,and ϖ be the set of all equivalence class of S, if R≠S, then ψ∩ϖ =Φ. ( )11. Let (S,) be a poset such that S is a finite nonempty set,then S has ninimal element,and the elements is unique. ( )12. Let R and S are relations on a set A,then MR∩S MR∧MS. ( )13. If a relation R is symmetric .then there is loop at every vertex of its directed graph.( )14. A directed graph of a partial order relation R cannot contain a closed directed pathother than loops. ( )15. The poset ,where P(S) is the power set of a set S is not a chain. ( )Part II (1 Foundations: Sets Logic, and Algorithms , 85 Scores)1. (8 points) Let R be the relation {(1, 2), (1, 3), (2, 3), (2, 4), (3, 1)}, and let S be relation{(2, 1), (3, 1), (3, 2), (4, 2)}. Find S R.and R3.2. (8 points)Determine whether the relations represented by the following zero-one matrices are partial orders.3. (8 points)Determine the number of different equivalence relations on a set with three elements by listing them.4. (8 points)Let R ={ (a , b)∈A| a divides b }, where A={1,2,3,4}. Find the matrix MR of R. Then determine whether R is reflexive, symmetric, or transitive.5. (8 points)Determine whether the relation R on the set of all people is reflexive, symmetric, antisymmetric, and/or transitive, where (a, b) R if and only ifa) a is taller than b.b) a and b were born on the same day.c) a has the same first name as b.6. (8 points) Define a equivalence relations on the set of students in your discrete mathematics class .Determine the equivalence classes for these equivalence relations.7. (10 points) Let R be the relation on the set of ordered pairs of positive integers such that if and only if . Show that R is an equivalence relation.8. (8 points) Answer the following questions for the partial order represented by the following Hasse diagram.9. (9 points) Let R be the relation on the set A={a,b,c,d} such that the matrix of R isfind(1) reflexive closure of R.(2) symmetric closure of R.(3) transitive closure of R.10. (10 points)(1)Show that there is exactly one greatest element of a poset, if such an element exists.(2) Show that the least upper bound of a set in poset is unique if it exists.Discrete Mathematic Test (Unit 3)Part I (T/F questions, 15 Scores)In this part, you will have 15 statements. Make your own judgment, and then put T (True)or F (False) after each statement.1. There exist a simple graph with four edges and degree sequence 1,2,3,4. ( )2. There are at least two people whith exactly the same number of friends in any gatheringof n>1 people.. ( )3. The number of edges in a complete graph with n vertices is n(n-1). ( )4. The complement of graph G is not possible a subgraph of G. ( )5. Tthat any cycle-free graph contains a vertex of degree 0 or 1.( )6. The graph G, either G or its complement G’, is a connected graph. ( )7. Any graph G and its complement G’ can not be isomorphic ( )8. An Eulerian is a Hamiltonian graph,but a Hamiltonian graph is not An Eulerian . ( )9. If every member of a party of six people knows at least three people ,prove that theycan sit around a table in such a way that each of them knows both his neighbors. ( )10. A circuit either is a cycle or can be reduced to a cycle. ( )11. A graph G with n vertices .G is connected if and only if G is a tree. ( )12. A connected graph is a circuit if the degree of each vertex is 2. ( )13.A circuit either is a cycle or can be reduced to a cycle. ( )14.For any simple connected planar gragh G that X (G) 6. ( )15. .The sum of the odd degrees of all vertices of a graph is even. ( )Part II (1 Foundations: Sets Logic, and Algorithms , 85 Scores)1. (10 points) Does there exist a simple graph with degree sequence 1,2,3,5? Justify youanswer.2. (10 points) Suppose there are 90 small towns in a country. From each town there is a direct bus route to a least 50 towns. Is it possible to go from one town to ant other town by bus possibly changing from one bus and then taking another bus to another town?3. 10 points) Find the number of distinct paths of length 2 in graphs K5.4. (5 points Draw all different graphs with two vertices and two edges.5. (10 points) Determine where the graphs in Figure 1 have Euler trails.If the graph has an Euler trail, exhibit one.6.(10 points) Use a K-map to find the minimized sum-of-product Boolean expressions of the expressions.xyzw+xyzw’+xyx’w’+xy’zw’+x’yzw+x’yzw’+x’y’z’w’+x’y’z’w7. (10 points) Insert 5, 10, and 20, in this order, in the binary search tree of following Figure. Draw the binary search tree after each insertion.8.(8 points) Does there exist a simple connected planar graph with 35 vertices and 100 edges?9. (10 points) Let G be a simple connected graph with n vertices. Suppose the degree of each vertex is at lease n 1. Does it imply the existence of a Hamiltonian cycle in G?Discrete Mathematic Test 1Part I (T/F questions)Directions: in this part, you will have 15 statements. Make your own judgment, and thenput T (True) or F (False) after each statement.1. Let A and B be nonempty sets .Then A⊆B if and only if A-B=∅. ( )2. Let A and B be nonempty sets. If B≠Φ,then A-B⊆ A. ( )3. “Is Hangzhou a beautiful city?” This sentence is a statement. ( )4. Let P and Q and R be three statements.if P∧Q≡P∧R,then Q and R have the same value.( )5. Let P and Q be two statements.then (~p∨~q)→(p→~q) is not a tautology.( )6. (x)(P(x)∧Q(x))and (x)P(x) ∧(x)Q(x) are equivalent. ( )7. Let A and B be sets.any subset of A×B is a relation. ( )8.Let A={ 1,2,3}and R=={<1, 1>, <2, 2>, <1, 3>, <3, 1>, <2, 3>},so R is an equivalenceRelation on A. ( )9.Let R be a relation on set A.then R is an equivalence Relation on A if and only ifR︒⊆R. ( )R10. R is an equivalence Relation on A.R- equivalence class is not a partition of A .( )11.If a mathematical system has an identity,so the cayley table has no equalLines. ( )12. Let A be a nonempty set.then Φ is identity of (ρ(A),∩). ( )13.The sum of the odd degrees of all vertices of a graph is even. ( )14. Any graph G and its comp lement G’can not be isomorphic. ( )15. A graph G with n vertices .G is connected if and only if G is a tree. ( )Part Ⅱ ( set questions)Directions: in this part,you need to provide solutions for question 16~17 based on thetheory of Knowledge Set .16.Let A,B,and C be sets.Prove A∩(B-C)=(A∩B)-(A∩C).17. A class of 40 students has 3 minors for options, respectively A, B and C. Among the 40 students, 15 choose subject A, 10 choose B and another 6 choose C. Additionally, 5 students choose all of the three subjects. Our question is at least how many students do not choose any subject.Part Ⅲ ( LOGIC questions)Directions: in this part, you need to provide solutions for question 17~19 based on the theory of knowledge logic .18.Show that ~(P∧~Q),~Q∨R ,~R |= ~P19、show that ∀x(F(x) →~A(x)),∀x(A(x)∨B(x),∃x ~B(x) |= ∃x ~F(x)Part Ⅳ ( Relations and Posets questions)Directions: in this part,you need to provide solutions for question 20-22 based on the theory of knowledge relations and posets.20.Let A={1,2,3,4},R={(1,2),(2,3),(3,1) }, L={(1,4),(2,2),(3,3),(4,3)},find the transitiv closures of the relations LR︒.21.Let {A1, A2, A3………An}be a partition of a given set X.Difine a relation R on S asfollows:For all a,b∈X,(a,b) ∈R if and only if there exists A such that a,b∈A.Prove R is an equivalence relation on X.22.Conseder the poset(S,≤),where S={k|k%96=0}and the relation ≤ is the divisibility relation.1)Find all minimal and maximal elements.2)Find all lower bounds of{6, 12, 16}.3)Find all upper bounds of{6, 12, 16}.4)Find the glb and lub of {6, 12, 16}.Part Ⅴ ( Mathematical system)Directions: in this part,you need to provide solutions for question 23 based on thetheory of knowledge mathematical system.23.Show that (G, *) is a monoids,where G={(a,b)︱a,b∈R,b≠0} and(a,b)*(c,d)=(bc+a,bd).Part Ⅵ ( Graph and tree)Directions: in this part,you need to provide solutions for question 24 based on the theory of knowledge graph.24.Discrete Mathematic Test 2Part I (T/F questions)Make your own judgment, and then put T (True) or F (False) after each following statement:1). Let A and B be nonempty sets .Then A⊆B if and only if A-B=∅. ( )2). Let A and B be nonempty sets. If B≠∅,then A-B ⊆ A. ( )3). “Is Hangzhou a beautiful city?” This sentence is a statement. ( )4). Let P and Q and R be three statements. If P∧Q ≡ P∧R, then Q and R havethe same value. ( )5). Let P and Q be two statements. then (~p∨~q)→ (p→~q) is not a tautology.( )6). Let A and B be sets. Any subset of A × B is a relation. ( )7).Let A= { 1,2,3,4} and R= {(1, 1), (2, 2), (3, 3), (3, 1), (1, 3), (3, 2), (2, 3)},so R is an equivalence relation on A. ( ) 8).Let R be a relation on set A. Then R is an equivalence Relation on A if and only ifR︒⊆R. ( )R9). R is an equivalence Relation on A.R- equivalence class is not a partition of A.( )10).The sum of the odd degrees of all vertices of a graph is even. ( )11). Any graph G and its complement G’ can not be isomorphic. ( )12). A graph G with n vertices .G is connected if and only if G is a tree. ( )13). A circuit either is a cycle or can be reduced to a cycle. ( )14). A connected graph is a circuit if the degree of each vertex is 2. ( )15). For any simple connected planar gragh G that X (G)≤ 6. ( )Part Ⅱ1.Let A, B, and C be sets. Prove A∩ (B - C) = (A∩B)-(A∩C).2.Show that ~(P∧~Q),~Q∨R ,~R |= ~P.3.Show that ∀x(F(x) →~A(x)),∀x(A(x)∨B(x),∃x ~B(x) |= ∃x ~F(x).4.Let A={1,2,3,4}, R={(1,2),(2,3),(3,1) }, L={(1,4),(2,2),(3,3),(4,3)}, find the transitive closure of the relations LR .5.Let {A1, A2, A3………An} be a partition of a given set X. Define a relation R on Sas follows:For all a, b∈X, (a,b) ∈R if and only if there exists Ai such that a, b∈Ai. Prove R isan equivalence relation on X.6.Consider the poset (S,≤), where S={k|k%96=0}and the relation ≤ is the divisibility relation:2) Find all lower bounds of {6, 12, 16};3) Find all upper bounds of {6, 12, 16};4) Find the glb and lub of {6, 12, 16}.7.Use a K-map to find the minimized sum-of-product Boolean expressions of the expressions.xyzw+xyzw’+xyx’w’+xy’zw’+x’yzw+x’yzw’+x’y’z’w’+x’y’z’w8. Insert 5, 10, and 20, in this order, in the binary search tree of following Figure. Draw the binary search tree after each insertion.9.Does there exist a simple connected planar graph with 35 vertices and 100 edges?10. Let G be a simple connected graph with n vertices. Suppose the degree of each vertex is at lease n 1. Does it imply the existence of a Hamiltonian cycle in G?Appendix1 Answer to Discrete Mathematic Test(Unit 1) PartI(T/F questions 15 Points):1) F 2) T 3) F 4) T 5) T 6) F 7) F 8) T 9) T 10) F 11) T 12) T13) T 14) T 15) FPart II1.Solution (8 Points):(i) Y-X = X’ ⋂Y(ii) (X ⋂Z) - Y2.Solution (8 Points):S A= 1001S A’= 1110S B= 1100S A⋂B= 00003.Solution (8 Points):It is given |A|=12, |B|=18, |C|=16, ⎢A⋂B⋂C ⎢=9,∵⎢A⋂B ⎢+ ⎢ A ⋂C ⎢+ ⎢ B ⋂C ⎢≥3 ⎢A⋂B⋂C ⎢ ,∴⎢A⋃B⋃C ⎢= ⎢A ⎢+ ⎢B ⎢+ ⎢C ⎢-⎢A⋂B ⎢-⎢ A ⋂C ⎢-⎢ B ⋂C ⎢+| A⋂B⋂C |≤⎢A ⎢+ ⎢B ⎢+ ⎢C ⎢-2 ⎢A⋂B⋂C ⎢=12+18+16-2⨯9=28∵45 -⎢A⋃B⋃C ⎢=17.Therefore, the at least number of students do not taking the algebra course and the computer programming course and playing basketball is 17.4.Solution (8 Points):Truth table:P g AT T FT F TA ≡~ ( p↔q)≡ ( p ∧~q) ∨ (~p ∧ q)≡ ( p∨q) ∧ (~p ∨~q)5.Solution (8 Points):Let p: Anne plays golf.q: Anne plays basketball.p ∨ g |= pproof:(p∨q)→p≡~ (p∨q) ∨ p≡(~p∧~q) ∨p≡T∧ (~q∨p)≡p∨~qis not tautology.Therefore, the given argument is invalid.6.Solution (8 Points):Let p: The budget is cut.q: Prices remain stable.r: Taxes will be raised.Hence, in symbolic notation, the given argument takes the form~ p → (q ↔ r), ~ p → r, q →~ r |= ~ r.Proof:B1: ~ p → (q ↔ r) HypothesisB2: q →~ r HypothesisB3: ~ p → r HypothesisB4: ~ p → (q ↔ r) → (p ∨ (q → r))∧((r → q) →~ p) TautologyB5: (p∨ (q→r))∧((r →q)→~p) from B1, B4 and by modus ponensB6: (r →q)→~p from B5 and by conjunctive additionB7: (r →q)→ r from B3, B6 and by Hypothesis SyllogismB8: ((r →q)→ r) →~ r→ q TautologyB9: ~ r→ q from B7, B8 and by modus ponensB10: ~ r from B2, B9 and by Hypothesis Syllogism Conclusion: The taxes will not be raised.7.Solution (8 Points):(1)Let p(x): x is an even integer.q(x): x⨯x is an even integer.r(x,y): x+y is an even integer∀x∀y (p(x)∧q(y))→ r(x,y)) is a true statement(2) Let p(x): x is an prime integer.q(x): x is an odd integer.(∃x) (p(x)∧q(y)) where x=38.Solution (8 Points):(1) Let p(x): x is a nature number.q(x, y): y is only one successor number of x.r(x, y): x+y is an even integer∀x∃y (p(x) → p(y) ∧q(x , y))(2) Let p(x): x is a nature numberq(x,y): x+y=x∀x∀y (p(x)∧q(y)) ∧q(x, y) ↔q(0,y)(3) ~∀x∃y (p(x) ∧p(y) →q(x, y)9.Solution (9 Points):Proof:B1: ∀x (~F(x)∨A(x)) HypothesisB2: ∀x (A(x) →B(x)) HypothesisB3: ∃x F(x) HypothesisB4: F(c) from B3 by the rule of inference ESB5: ~F(c) ∨A(c) from B1 by the rule of inference USB6: A(c) →B(c) from B2 by the rule of inference USB7: A(c) B7 from B4,B5 by Hypothesis Syllogism10. Solution (10 Points):5 3 1 4 26 75 36 1 4 2 75 76 3 1 4 2 5 67 3 1 4 2 5 6 3 7 1 4 2 5 6 3 1 7 4 2 5 6 3 1 4 7 25 6 3 1 4 2 7 5 3 6 1 4 2 7 5 3 1 6 4 2 7 5 3 1 4 6 2 75 36 1 4 2 77 5 6 3 1 4 2swapAppendix2 Answer to Discrete Mathematic Test 2PartI(T/F questions 15 Marks):1) T 2) T 3) F 4) F 5) T 6) F 7) F 8) F 9) F 10) T 11) F 12) T13) F 14) T 15) TPart II1.Solution (8 Marks):A⋂(B-C)= A⋂B⋂C’=(A⋂B⋂C’)⋃F=(A⋂B⋂C’)⋃(A⋂B⋂A’)=(A⋂B)⋂(A’⋃C’)=(A⋂B)⋂(A⋂C)’=(A⋂B) - (A⋂C)Or(A⋂B) - (A⋂C) = (A⋂B)⋂(A⋂C)’ =A⋂(B⋂(A’⋃C’) )=(A⋂B⋂A’) ⋃(A⋂B⋂C’)= F ⋃(A⋂B⋂C’)= A⋂B⋂C’= A⋂(B⋂C’)= A⋂(B-C)Therefore A⋂(B-C)= (A⋂B) - (A⋂C)2.Solution (8 Marks):B1 ~(P∧~Q) HB2 ~Q∨R HB3 ~R HB4 ~Q B2,B3 by DSB5 ~P∨Q TautologyB6 ~P B4,B5 by DS∴|= ~P∀) (P(x) →Q(x))3.Solution: a) (xb) (x∃) (R(x) Λ~Q(x))c) (x∃) (R(x) Λ~P(x))Hence,(c) is vailid argument for Hypothesis of (a) and (b).∀) (P(x) →Q(x)) HypothesisProof: B1: (xB2: (x∃) (R(x) Λ~Q(x)) HypothesisB3: R(c) Λ~Q(c) from B2 by ESB4: P(c) → Q(c) from B2 by USB5: ~Q(c) from B3 byB6: ~ P(c)B7: R(c)B8: R(c) Λ~ P(c)B9: (x∃) (R(x) Λ~P(x))4. Solution (8 Marks):R︒L = {(1,2),(2,3),(3,4)}(R︒L)n = {(1,2),(2,3),(3,4),(1,3),(2,4),(1,4)}5.Solution: Let R be a Relation on set A, where A={1,2,3,4}Different Partition as follows:π1 = {{1}, {2}, {3}, {4}}π2 = {{1, 2}, {3, 4}}π3 = {{1, 2}, {3}, {4}}π4 = {{1}, {2}, {3, 4}}π5 = {{1, 3}, {2, 4}}π6 = {{1, 3}, {2}, {4}}π7 = {{1}, {3}, {2, 4}}π8 = {{1, 4}, {2, 3}}π9 = {{1, 4}, {2}, {3}}π10= {{1}, {4}, {2, 3}}π11= {{1, 2, 3}, {4}}π12 = {{1, 2, 4}, {3}}π13 = {{1, 3, 4}, {2}}π14 = {{2, 3, 4}, {1}}π15 = {{1, 2, 3, 4}}One-to-one equivalence Relation as follows:R1= {(1, 1), (2, 2), (3, 3), (4, 4)}R2= {(1, 1), (2, 2), (3, 3), (4, 4), (1, 2), (2, 1), (3, 4), (4, 3)} R3= {(1, 1), (2, 2), (3, 3), (4, 4), (1, 2), (2, 1)}……6.Solution (8 Marks):S={1,2,3,4,6,8,12,16,24,32,48,96}1)minimal element is 1;maximal element is 96;2) all lower bounds of {6,12,16} are 1,2. 3)all upper bounds of {6,12,16} are 48,96;4) glb of{6,12,16} is 2; lub of{6,12,16} is 48.7.Solution (8 Marks):9616 24 12 213 84 632481 111 1 11 1xyx’y x’y ’xy ’zw zw’ z’w z’w’xyzw+ xyzw’+xyz’w’+xy’zw’+x’yzw+x’yzw’+x’y’z’w’+x’y’z’w=(xyzw+xyzw’+x’yzw+x’yzw’)+(xyz’w’+xyzw’)+(xy’zw’+xyzw’) +(x’y’z’w’+x’y’z’w) =yz+ xyw’ + xzw’ + x’y’z’8.Solution (9 Marks):20 48 58 80827565 510 Insert 20102011 111111xy x’y x’y ’ xy ’zw z’w z’w’zw’OR: 20 48 5880827565 510 Insert 101020 48 588082 7565 5 10 First: Insert 59.Solution (10 Marks):10.Solution: the different graphs with six vertices and three edgesas follows :a)b)c)d)e)f)V6V2V1V3V4V5V6V2V1V3V4V5V6V1V2V3V4V5e 1e2e3V1V2V3V4V5V6e1e2e3V1V2V3V4V5VV2V1e1e2e3e1e2e3e1e2e3e1e2e3g)h)i)j)k)l)V2V1V3V4V5V6e1e2e3e2e3V2V1V3V4V5V6e1e1e2e32V1V3V4V5V6e1e3e2V2V1V3V4V5V6e1e2e3V2V1V3V4V5V6e1e2e3V2V1V3V4V5V6M k6 = ⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎦⎤⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎣⎡011111101111110111111011111101111110M (k6)2= ⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎦⎤⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎣⎡0111111011111101111110111111011111100 ⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎦⎤⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎣⎡011111101111110111111011111101111110= ⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎦⎤⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎣⎡544444454444445444444544444454444445Consequently, the number of distinct paths of length 2 in graph K6 is 4*(5+4+3+2+1)=60.。
离散数学期末考试试卷a答案及评分细则
………密………封………线………以………内………答………题………无………效……电子科技大学英才学院2022 -2022学年第 1学期期 末 考试 A 卷离散数学 课程考试题 A 卷 〔 120分钟〕 考试形式:闭卷 考试日期 2022 年 月 日课程成绩构成:平时 分, 期中 分, 实验 分, 期末 100 分I.Multiple Choice (15%, 1.5 points each)〔A 〕 1. (p ∧q)→(p ∨q) is logically equivalent toa) T b) p ∨q c) F d) p ∧q〔A 〕 2. If P(A) is the power set of A, and A = ∅, what is |P(P(P(A)))|?a) 4 b) 24 c) 28 d) 216〔C 〕 3. Which of these statements is NOT a proposition?a) Today is Monday. ` b) 1+1=2.c) Am I right? d) Go and play with me.〔C 〕 4. Which of these propositions is not logically equivalent to the other three?a) (p → q) ∧ (r → q) b) (p ∨ r) → qc) (p ∧r) → q d) The contrapositive of ¬q → (¬p ^ ¬r)〔B 〕 5. Suppose | A | = 3 and | B | = 8. The number of 1-1 functions f : A → B isa) 24 b) P (8,3). c) 38 d) 83〔B 〕 6. Let R be a relation on the positive integers where xRy if x is a factor of y . Whichof the following lists of properties best describes the relation R ? a) symmetric, transitiveb) antisymmetric, transitive, reflexive c) antisymmetric, symmetric, reflexive d) symmetric, transitive, reflexive〔C 〕 7. Which of the following are partitions of },,,,,,,{h g f e d c b a U =?a)},,,,,{},,,{},{h g f e d c c b a a . b) },,,,,{},,{},{h g f e d c c b a c) }{},,{},,{},,,{h f e c b g d a . d) },,,,{},,{},,{h g f e d c b b a〔C 〕 8. The function f(x)=x 2log(x 3+78) is big-O of which of the following functions?a) x 2 b) x(logx)3 c) x 2logx d) xlogx〔A 〕 9.If 1010110111101101R ⎡⎤⎢⎥⎢⎥=⎢⎥⎢⎥⎣⎦M , then R is: a) reflexive b) symmetric c) antisymmetric d) transitive.〔B 〕 10. Which of the followings is a function from Z to R ?………密………封………线………以………内………答………题………无………效……a) )1()(-±=n n f . ` b) 1)(2+=x x f . c) x x f =)( d) 21)(2-=n n fII. True or False (10%, 1 point each) 〔T 〕 1. If 1 < 0, then 5 = 6. 〔F 〕 2. (p ∧ q) ∨ r ≡ p ∧ (q ∨ r)〔F 〕 3. If A , B , and C are sets, then (A -C )-(B -C )=A -B . 〔T 〕 4. Suppose A = {a ,b ,c }, then {{a }} ⊆ P (A ).〔F 〕 5.()h x =is defined as a function with domain R and codomain R.〔T 〕 6. Suppose g : A → B and f : B → C , where f g is 1-1 and f is 1-1. g must be 1-1? 〔T 〕 7. If p and q are primes (> 2), then p + q is composite .〔F 〕 8.If the relation R is defined on the set Z where aRb means that ab > 0, then R is an equivalence relation on Z .〔T 〕 9. (A - B ) ⋃ (A - C ) = A - (B ⋂ C ).〔T 〕 10. The set{∅,{a },{∅},{a ,∅}} is the power set of some set III. Fill in the Blanks (20%, 2 points each)1. Let p and q be the propositions “I am a criminal 〞 and “I rob banks 〞. Express in simpleEnglish the proposition “if p then q 〞: If I am a criminal them I rob banks. 2. P (x ,y ) means “x + 2y = xy 〞, where x and y are integers. The truth value of ∃x ∀yP (x ,y )is False .3. T he negation of the statement “No tests are easy.〞 is some tests are easy.4. If 11{|}i A x x R x i i =∈∧-≤≤ then 1i i A +∞=is ∅.5. Suppose A = {x , y }. Then ()P A is {∅, {x}, {y},{x,y}}.6. Suppose g : A →A and f :A →A where A ={1,2,3,4},g = {(1, 4), (2,1), (3,1), (4,2)} andf ={(1,3),(2,2),(3,4),(4,2)}.Then fg ={(1,2),(2,3),(3,3),(4,2)}.7. The sum of 2 + 4 + 8 + 16 + 32 + ... + 210 is 211 - 2 .8. The expression of gcd(45, 12) as a linear combination of 12 and 45 is 12 ⋅ 4 + 45 ⋅ (1). 9.There are 5! permutations of the seven letters A,B ,C ,D ,E ,F have A immediately to the left of E .10. The two's complement of -13 is 1 0011 . IV. Answer the Questions (32%, 4points each):1. Determine whether the following argument is valid:………密………封………线………以………内………答………题………无………效……p→rq→rq∨⌝r________∴⌝pAns: Not valid: p true, q true, r true2.Suppose you wish to prove a theor em of the form “if p then q〞.(a) If you give a direct proof, what do you assume and what do you prove?(b) If you give an indirect proof, what do you assume and what do you prove?(c) If you give a proof by contradiction, what do you assume and what do you prove? Ans: (a) Assume p, prove q.(b) Assume ⌝q, prove ⌝p.(c) Assume p∧⌝q, show that this leads to a contradiction.3.Prove that A B A B⋂=⋃by giving a proof using logical equivalence.Ans:()()()() A B x x A Bx x A Bx x A Bx x A x Bx x A x Bx x A x Bx x A x Bx x A B A B ⋂={|∈⋂}={|∉⋂}={|⌝∈⋂}={|⌝∈∧∈}={|⌝∈∨⌝∈}={|∉∨∉}={|∈∨∈}={|∈⋃}=⋃4.Suppose f:R→R where f(x) =⎣x/2⎦.(a) If S={x| 1 ≤x≤ 6}, find f(S).(b) If T={3,4,5}, find f-1(T). Ans: (a) {0,1,2,3}(b) [6,12).e the definition of big-oh to prove that5264473n nn+--is O(n3).………密………封………线………以………内………答………题………无………效……Ans: 5555322226446410573763n n n n n n n n n n +-+≤==--, if n ≥ 2. 6. Solve the linear congruence 5x ≡ 3 (mod 11).Ans: 5 + 11k .7. Use the Principle of Mathematical Induction to prove that 1311392732n n+-++++...+= for alln ≥ 0.Ans: P (0):13112-= , which is true since 1 = 1. P (k ) → P (k + 1):111211313123311333222k k k k k k ++++++--+⋅-++...+=+==.8.Encrypt the message NEED HELP by translating the letters into numbers, applying the encryption function f(p ) = (3p + 7) mod 26, and then translating the numbers back into letters.Ans: Encrypted form: UTTQ CTOA.V. (6%) Without using the truth table, show that the following are tautologiesa) [⌝p ∧(p ∨q)]→q b) [p ∧(p →q)]→qAns:a) ⌝p ∧(p ∨q)≡(⌝p ∧p)∨(⌝p ∧ q)≡flase[⌝p ∧(p ∨q)]→q ≡ false →q ≡⌝false ∨q ≡true ∨q ≡true (3points)b)[p ∧(p →q)]→q ≡(⌝[p ∧(⌝p ∨q)])∨q ≡(⌝p ∨(p ∧⌝q))∨q ≡((⌝p ∨p)∧(⌝p ∨⌝q))∨q ≡⌝p ∨⌝q ∨q ≡true (3points)VI. (6%) Devise an algorithm which will find the minimum of n integers. What is the worst case time………密………封………线………以………内………答………题………无………效……complexity of this algorithm?a) procedure min(a1, a2, …, an: integers)(4points)v := a1 {largest element so far}for i := 2 to n {go thru rest of elems}if ai < v then v := ai {found smaller?}{at this poi nt v’s value is the same as the smallest integer in the list}return vb) the worst case time complexity of this algorithm is O(n). (2points)VII.(5%) Give the definition of a transitive relation, and Prove or disprove that the union of two transitive relations is transitive.Ans: A relation R on a set A is called transitive if only if (a,b)∈R and (b,c)∈R ,then (a,c) ∈R ,for a,b,c ∈A. (2points)The union of two transitive relations may be not transitive. A counter-example:A={1,2,3}, R1= {<1,1>, <2,3>}, R2={<1,2><3,3> }R1∪R2={<1.1>, <2,3><1,2><3,3>}, which is not transitive. (3points)VIII.(6%) Give an argument using rules of inference to show that the conclusion follows from the hypotheses. List all the steps in your argument.Hypotheses: All computer scientists like Star Trek. Sarah does not like Star Trek. Therefore, Sarah is not a computer scientist.Solution:Hypotheses: ∀x(ComputerScientist(x) →Likes(x, StarTrek))¬Likes(Sarah, StarTrek)Conclusion: ¬ComputerScientist(Sarah)Step 1: ∀x(ComputerScientist(x) →Likes(x, StarTrek)) (Hypothesis)Step 2: ComputerScientist(Sarah) →Likes(Sarah, StarTrek) (Univ. Inst. Step 1)Step 3: ¬Likes(Sarah, StarTrek) (Hypothesis)Step 4: ¬ComputerScientist(Sarah) (Modus Toll. St. 2+3)The argument is sound.Grading rubric: -3 points for making wrong assumptions.-2 points for not being able to complete the proof.-1 to -3 points for illegal usage of inference rules.。
英文离散数学试题及答案
英文离散数学试题及答案一、选择题(每题2分,共20分)1. 在集合论中,空集的符号表示为:A. ∅B. ∅∅C. ØD. ∅(∅)2. 布尔代数中,逻辑与(AND)操作的符号是:A. ∧B. ∨C. ¬D. →3. 如果一个命题P是真命题,那么¬P是:A. 假命题B. 真命题C. 既非真也非假D. 无法确定4. 在图论中,一个图的度是指:A. 顶点的数量B. 边的数量C. 每个顶点连接的边数D. 图中所有顶点的度数之和5. 以下哪个是有限自动机的组成部分:A. 状态B. 初始状态C. 转移函数D. 所有上述选项6. 以下哪个不是关系的性质:A. 反射性B. 对称性C. 传递性D. 唯一性7. 一个命题逻辑公式的真值表通常有多少行:A. 2B. 3C. 与变量的数量相同D. 与命题的数量相同8. 以下哪个是等价关系的属性:A. 传递性B. 非传递性C. 非对称性D. 非自反性9. 一个命题逻辑公式的否定等价于:A. 原公式的真值表中所有真值取反B. 原公式的逻辑或C. 原公式的逻辑与D. 原公式的逻辑异或10. 在组合数学中,排列与组合的区别在于:A. 排列考虑顺序B. 组合不考虑顺序C. 排列不考虑顺序D. 所有上述选项答案:1. A2. A3. A4. C5. D6. D7. C8. A9. A10. A, B二、简答题(每题5分,共30分)1. 简述集合的并集和交集的定义。
2. 解释什么是逻辑蕴涵,并给出一个例子。
3. 描述图的有向性和无向性的区别。
4. 阐述关系数据库中主键和外键的作用。
5. 什么是递归函数,并给出一个简单的例子。
6. 简述命题逻辑和谓词逻辑的区别。
三、计算题(每题10分,共30分)1. 给定集合A = {1, 2, 3}和B = {2, 3, 4},求A∪B和A∩B。
2. 证明以下逻辑等价性:(P ∧ Q) → R ≡ P → (Q → R)。
机械工业出版社离散数学英文版部分答案8
Homework88.1:P527Ex4: a) anitisymmetric, transitive b )reflexive; symmetric; transitivec)reflexive; symmetric; transitive d )reflexive; symmetricEx30: {(1,1),(1,2),(2,1),(2,2)}8.2:P536Ex6: We see that the “Professor ” filed by itself is not a key, since there is more than one 5-tuple containing the same professor. We can make the identification of the tuple unique by including the course number as well, or by including the time as well.Ex12: (9191,2,80,4)8.3:P542Ex2 b) 1001010000101000⎡⎤⎢⎥⎢⎥⎢⎥⎢⎥⎣⎦ d) 0000000111010000⎡⎤⎢⎥⎢⎥⎢⎥⎢⎥⎣⎦ Ex12: we take the transpose of the matrix, since we want the (i,j)th entry of the matrix for R -1 to be 1 if and only if the (j,i)th entry of R is 1.8.4:P553Ex2: When we add all the pairs (x,x) to the given relation we have all of Z ⨯Z; in other words, we have the relation that always holds.Ex10: The symmetric closure was found in Example 2 to be the “is not equal to ” relation. If we now make this relation reflexive as well, we will have the relation that always holds.Ex19 b) The matrix for R 3 is the Boolean product of the first matrix displayed above with theanswer to part (a), namely 31111010001101111111010101R M ⎡⎤⎢⎥⎢⎥⎢⎥=⎢⎥⎢⎥⎢⎥⎣⎦.8.5:P562Ex2 a) This is an equivalence relation. b) This is an equivalence relation.c) This is not an equivalence relation. d) This is not an equivalence relation.e )This is not an equivalence relation.Ex12: This follows from Exercise 9, where f is the function that takes a bit string of length n>=3 to its last n-3 bits.Ex42: a) partition b) not partition c) partition d) not partition8.6:P578Ex2 a) not partial ordering b) partial ordering c) not partial ordering d) not partial ordering e) not partial orderingEx8: a) not partial ordering b) partial ordering c) not partial orderingEx16 a) (1,1), (1,2),(1,3),(1,4),(2,1) and (2,2)。
《离散数学》试卷A及答案
《离散数学》试卷(A)适用专业: 考试日期:试卷类型:闭卷 考试时间:120分钟 试卷总分:100分一、单项选择题(本大题共8小题,每小题3分,共24分)1、下述哪一个不是命题?( ) A 、离散数学是计算机系的一门必修课 B 、不存在最大偶数。
C 、若我有空,我就看书。
D 、请勿随地叶痰!2、设A={a,b,c},B={1,2,3},以下哪一个关系是从A 到B 的双射函数?( ) A 、f={<a,2>,<b,2>,<c,1>} B 、f={<a,3>,<b,1>,<c,2>} C 、f={<a,1>,<b,2>,<c,3>,<a,3>} D 、f={<a,1>,<b,2>,<a,3>}3.设<G, 。
>是群,且|G|>1,则下列命题不成立的是( )A.G 中有幺元B. G 中有零元C.G 中任一元素有逆元D. G 中除幺元外无其它幂等元 4、设A={}c b a ,,,则下列是集合A 的划分的是( ) A.{}{}{}c c b ,, B. {}{}{}c a b a ,,, C.{}{}c b a ,, D.{}{}{}c b a ,, 5.设集合A={a,{b}},下面四个命题为真的是A.a 包含于AB.φ∈AC.{b}包含于AD.φ包含于A 6、下列是命题公式p ∧(q ∨⌝r)的成真指派的是( ) A.110,111,100 B.110,101,011 C 所有指派 D.无 7、与一阶公式P(x)→VxQ(x)等值的公式是A.P(y)→VyQ(y)B.P(y)→VxQ(y)C.P(x)→VyQ(y)D.P(z)→VyQ(y)8、设A 和B 都是命题,则A →B 的真值为假当且仅当( ) A 、A 为0 ,B 为1 B 、A 为0 ,B 为0 C 、A 为1 ,B 为1 D 、A 为1 ,B 为0二、填空题(本大题共7小题,每空3分,共21分)1..设A={a,b,c},F 是A 上的二元关系,F={<a,c>,<b,a>,<c,b>},则其自反闭包为r(F)= 。
离散数学答案英文版
P.161.14.f) If I did not buy a lottery ticket this week, then I did not win the million dollar jackpot on Friday.g) I did not buy a lottery ticket this week, and I did not win the million dollar jackpot on Friday.h ) Either I did not buy a lottery ticket this week, or else I did buy one and won the million dollar jackpot on Friday.10.a) r ∧┐q b) p ∧ q∧ r c)r → pd) p ∧┐q ∧ r e) (p ∧q) → r f) r↔ ( q ∨ p)20.a) If I am to remember to send you the address, then you will have to send me ane-mail message.(This has been slightly reworded so that the tenses make more sense.)b) If you were born in the United States, then you are a citizen of this country.c) If you keep your textbook, then it will be a useful reference in your future courses.(The word "then" is understood in English, even if omitted.)d) If their goaltender plays well, then the Red Wings will win the Stanley Cup.e) If you get the job, then you had the best credentials.f) If there is a storm, then the beach erodes.g) If you log on to the server, then you have a valid password.h) If you don’t begin your climb too late, then you will reach the summit.33.c)P.261.28.a) Kwame will not take a job in industry and he will not go to graduate school.b) Yoshiko doesn’t know Java or she doesn’t know calculus.c) James is not young or he is not strong.d) Rita will not move to Oregon and she will not move to Washington.10.a)c)12.a) Assume the hypothesis is true. Then p is false. Since p∨q is true, we conclude that q must be true.Here is a more "algebraic" solution:[┐p∧(p ∨q)]→q <=> ┐[┐p∧(p ∨q)]∨q <=> ┐┐p∨┐(p∨q)∨q <=> p∨┐(p∨q)∨q <=> (p ∨q)∨┐(p∨q) <=> Tc) Assume the hypothesis is true. Then p is true, and since the second part of the hypothesis is ture, we conclude that q is also true, as desired.51.((p ↓ p) ↓ q )↓((p ↓ p) ↓ q )7.The graph is planar.20.The graph is not homeomorphic to K3,3, since by rerouting the edge between a and h we seethat it is planar.22.Replace each vertex of degree two and its incident edges by a single edge. Then the result isK3,3 : the parts are {a,e,i} and {c,g,k}. Therefore this graph is homeomorphic to K3,3.23.The graph is planar.25. The graph is not planar.9.83. 3F E8. 310.417. time slot 1: Math 115, Math 185; time slot 2: Math 116, CS 473;time slot 3: Math 195, CS 101; time slot 4: CS 102time slot 5: CS 273P.461.33. a) true b) false c) false d) false5. a) There is a student who spends more than 5 hours every weekday in class.b) Every student spends more than 5 hours every weekday in class.c) There is a student who does not spend more than 5 hours every weekday in class.d) No student spends more than 5 hours every weekday in class.9. a) x(P(x)∧Q(x)) b) x(P(x)∧﹁Q(x))c) x(P(x)∨Q(x)) d) x﹁(P(x)∨Q(x))16. a) true b) false c) true d) false24. Let C(x) be the propositional function “x is in your class.”a)x P(x) and x(C(x)→P(x)), where P(x) is “x has a cellular phone.”b) x F(x) and x(C(x)∧F(x)), where F(x) is “x has seen a foreign movie.”c)x﹁S(x) and x(C(x)∧﹁S(x)), where S(x) is “x can swim.”d)x E(x) and x(C(x)→E(x)), where E(x) is “x can solve quad ratic equations.”e)x﹁R(x) and x(C(x)∧﹁R(x)), where R(x) is “x wants to be rich.”62.a) x (P(x)→﹁S(x)) b)x(R(x)→S(x))c) x (Q(x)→P(x))d)x(Q(x)→﹁R(x))e) Yes. If x is one of my poultry, then he is a duck (by part(c)), hence not willing to waltz (part (a)). Since officers are always willing to waltz (part (b)), x is not an officer.1.412.d)x┐C(x, Bob)h)x y (I(x) ∧((x≠y) →┐ I(y)))k)x y( I(x) ∧┐C(x, y))n)x y z ((x≠y) ∧┐ (C(x, z) ∧ C(y, z)))14.a) x H(x), where H(x) is “x can speak Hindi”and the universe of the discourse consists of all students in this class.b) x y P(x, y), where P(x, y) is “x plays y.” and the universe of the discourse for x consists of all students in this class, and the universe of the discourse for y consists of all sports.c) x A(x) ∧┐H(x) , where A(x) is “x has visited Alaska.” , H(x) is “x has visited Hawaii” and the universe of the discourse for x consists of all students in this class.d) x y L(x, y), where L(x, y) is “x has learned programming language y” and the universe of the discourse for x consists of all students in this class, and the universe of the discourse for y consists of all programming languages.e) x z y (Q(y,z) →P(x, y)), where P(x, y) is“x has taken course y.”, Q(y, z) is “course y is offered by department z.”, and the universe of the discourse for x consists of all students in this class, the universe of the discourse for y consists of all courses in this school, and the universe of the discourse for z consists of all departments in this school.f)x y z ( (x≠y) ∧P(x, y)∧ ((x≠y≠z) →┐P(x, z))), where P(x, y) is “x and y grew up in the same town.” and the universe of the discourse for x, y, z consists of all students in this class.g) x y z C(x, y) ∧G(y, z), where C(x, y) is “x has chatted with y”, G(y, z) is “y is in chat group z”, the universe of the discourse for x, y consists of all students in this class, and the universe of the discourse for z consists of all chat group in this class.a) There is an additive identity for the real numbers.d) The product of two nonzero numbers is nonzero for the real numbers.38.b) There are no students in this class who have never seen a computer.d) There are no students in this class who have taken been in at least one room of every building on campus.1.5(1)(┐r∧(q→p))→(p→(q∨r)) <=> ┐(┐r∧(┐q∨p))∨(┐p∨(q∨r)) <=>(q∧┐p)∨(┐p∨q∨r)<=> (┐p∨q∨r∨q)∧(┐p∨q∨r∨┐p) <=> (┐p∨q∨r) <=> ∏3 <=> ∑0,1,2,4,5,6,7 (2) P.726. Let r be the proposition "It rains", let f be the proposition "It is foggy", let s be the proposition "The sailing race will be held", let l be the proposition "The lifesaving demonstration will go on", and let t be the proposition "The trophy will be awarded". We are given premises (┐r∨┐f)→(s∧l), s→t, and ┐t. We want to conclude r. We set up the proof in two columns, with reasons. Note that it is valid to replace subexpressions by other expressions logically equivalent to them.Step Reason1. ┐t Hypothesis2. s→t Hypothesis3. ┐s Modus tollens using Steps 1 and 24. (┐r∨┐f)→(s∧l) Hypothesis5. (┐(s∧l))→┐(┐r∨┐f) Contrapositive of step 46. (┐s∨┐l)→(r∧f) De Morgan's law and double negative7. ┐s∨┐l Addition, using Step 38. r∧f Modus ponens using Step 6 and 79. r Simplification using Step 8First, using the conclusion of Exercise 11, we should show that the argument form with premises (p ∧t) → (r ∨s), q→ (u ∧t), u→p, ┐s, q, and conclusion r is valid. Then, we use rules of inference from Table 1.Step Reason1. q Premise2. q→ (u ∧t)P remise3. u ∧t Modus ponens using Steps 1 and 24. u Simplification using Step 35. u→p Premise6. p Modus ponens using Steps 3 and 47. t Simplification using Step 38. p ∧t Conjunction using Steps 6 and 79. (p ∧t) → (r ∨s) Premise10. r ∨s Modus ponens using Steps 8 and 911. ┐s Premise12. r Disjunctive syllogism using Steps 10 and 11 14.b)Let R(x) be “x is one of the five roommates,” D(x) be “x has taken a course in discrete mathematics,” and A(x) be “x can take a course in algorithms.” The premises are x (R(x) → D(x)), x (D(x) → A(x)) and R(Melissa). Using the first premise and Universal Instantiation, R(Melissa) → D(Melissa) follows. Using the third premise and Modus Ponens, D(Melissa) follows. Using the second premise and Universal Instantiation, A(Melissa) follows. So do the other roommates.d) Let C(x) be “x is in the class,”F(x) be “x has been to France,” and L(x) be “x has visited Louvre.” The premises are x(C(x) ∧F(x)) and x (F(x) → L(x)). From the first premise and Existential Instantiation imply that C(y) ∧F(y) for a particularperson y. Using Simplification, F(y) follows. Using the second premise and Universal Instantiation F(y) → L(y) follows. Using Modus Ponens, L(y) follows. Using Existential Generalization, x(C(x) ∧L(x)) follows.24. The errors occur in steps (3), (5) and (7).For steps (3) and (5), we cannot assume, as is being done here, that the c that makes P(x) true is the same as the c that makes Q(x) true at the same time. For step (7), it is not a conjunction and there is no such disjunction rule.29.Step Reason1. x ┐P(x) Premise2. ┐P(c) Existential instantiation from (1)3. x (P(x) ∨Q(x)) Premise4. P(c) ∨Q(c) Universal instantiation from (3)5. Q(c) Disjunctive syllogism from (2) and (4)6. x (┐Q(x) ∨S(x)) Premise7. ┐Q (c) ∨S(c) Universal instantiation from (6)8. S(c) Disjunctive syllogism from (5) and (7)9. x (R(x) →┐S(x)) Premise10. R(c) →┐S(c) Universal instantiation from (9)11. ┐R(c) Modus tollens from (8) and (10)12. x ┐R(x) Existential generalization from (11)P.861.637.Suppose that P1→P4→P2→P5→P3→P1. To prove that one of these propositions implies any of the others, just use hypothetical syllogism repeatedly.P.1031.713.a) This statement asserts the existence of x with a certain property. If we let y=x, then we see that P(x) is true. If y is anything other than x, then P(x) is not true. Thus, x is the unique element that makes P true.b) The first clause here says that there is an element that makes P true. The second clause says that whenever two elements both make P true, they are in fact the same element. Together these say that P is satisfied by exactly one element.c) This statement asserts the existence of an x that makes P true and has the further property that whenever we find an element that makes P true, that element is x. In other words, x is the unique element that makes P true.P.1202.19.T T F T T F16. Since the empty set is a subset of every set, we just need to take a set B that contains Φ as an element. Thus we can let A = Φ and B = {Φ} as the simplest example.20 .The union of the sets in the power set of a set X must be exactly X. In other words, we can recover X from its power set, uniquely. Therefore the answer is yes.22.a) The power set of every set includes at least the empty set, so the power set cannot be empty. Thus Φ is not the power set of any set.b) This is the power set of {a}c) This set has three elements. Since 3 is not a power of 2, this set cannot be the power set of any set.d) This is the power set of {a,b}.28.a) {(a,x,0), (a,x,1), (a,y,0), (a,y,1), (b,x,0), (b,x,1), (b,y,0), (b,y,1), (c,x,0), (c,x,1), (c,y,0), (c,y,1)}c) {(0,a,x), (0,a,y), (0,b,x), (0,b,y), (0,c,x), (0,c,y), (1,a,x), (1,a,y), (1,b,x), (1,b,y), (1,c,x), (1,c,y)}P.1302.214. Since A = (A - B)∪(A∩B), we conclude that A = {1,5,7,8}∪{3,6,9} ={1,3,5,6,7,8,9}. Similarly B = (B - A)∪(A ∩ B) = {2,10}∪{3,6,9} = {2,3,6,9,10}.24. First suppose x is in the left-hand side. Then x must be in A but in neither B nor C. Thus x∈A - C, but x B - C, so x is in the right-hand side. Next suppose that x is in the right-hand side. Thus x must be in A - C and not in B - C. The first of these implies that x∈A and x C. But now it must also be the case that x B, since otherwise we would have x∈B - C. Thus we have shown that x is in A but in neither B nor C, which implies that x is in the left-hand side.40. This is an identity; each side consists of those things that are in an odd number of the sets A,B,and C.P147.2.335a) This really has two parts. First suppose that b is in f(S∪T). Thus b=f(a) for somea∈S∪T. Either a ∈S, in which case b∈f(S), or a∈T, in which case b∈f(T). Thus in either case b∈ f(S) ∪f(T). This shows that f(S∪T) ⊆f(S) ∪f(T), Conversely, suppose b∈f(S) ∪f(T). Then either b∈f(S) or b∈f(T). This means either that b=f(a) for some a∈S or that b=f(a) for some a ∈T. In either case, b=f(a) for some a∈S∪T, so b∈f(S∪T). This shows that f(S) ∪f(T) ⊆f(S∪T), and our proof is complete. b)Suppose b∈f(S∩T). Then b=f(a) for some a∈S∩T. This implies that a∈S anda∈T , so we have b∈f(S) and b∈f(T). Therefore b∈f(S)∩f(T), as desired.52In some sense this question is its own answer—the number of integers between a and b, inclusive, is the number of integers between a and b, inclusive. Presumably we seek an express involving a, b, and the floor and/or ceiling function to answer this question. If we round a up and round b down to integers, then we will be looking at the smallest and largest integers just inside the range of the integers we want to count, respectively. These values are of course ⎡⎤a and ⎣⎦b, respectively. Then the answer isb-+1 (just think of counting all the integers between these two values, ⎣⎦⎡⎤aincluding both ends—if a row of fenceposts one foot apart extends for k feet, then there are k +1 fenceposts). Note that this even works when, for example, a=0.3 and b=0.7 .P1622.434.a) This is countable. The integers in the set are ±1,±2,±4,±5,±7,andso on. We can listthese numbers in the order 1, -1 , 2, -2, 4, -4,…, thereby establishing the desired correspondence. In other words, the correspondence is given by 1↔1,2↔-1,3↔2,4↔-2,5↔4,and so on.b) This is similar to part(a);we can simply list the elements of the set in order ofincreasing absolute value, listing each positive term before its correspondingnegative:5,-5,10,-10,15,-15,20,-20,30,-30,40,-40,45,-45,50,-50,……c) This is countable but a little tricky. We can arrange the numbers in a 2-dimensionaltable as follows:1..1 0.11 0.111 0.1111 0.11111 ……1.1 1 1.1 1.11 1.111 1.1111 ……1.1111 11.1 11.11 11.111 11.1111 ……1111.111 111.1 111.11 111.111 111.1111 ……………………………………d) This set is not countable. We can prove it by the same diagonalization argument aswas used to prove that the set of all reals is uncountable in Example 21.All we need to do is choose d i=1 when d ii=9 and choose d i=9 when d ii=1 or d ii is blank(if the decimal expansion is finite)46.We know from Example 21 that the set of real numbers between 0 and 1 is uncountable. Let us associate to each real number in this range(including 0 but excluding 1) a function from the set of positive integers to the set {0,1,2,3,4,5,6,7,8,9} as follows: If x is a real number whose decimal representation is 0.d1d2d3…(with ambiguity resolved by forbidding the decimal to end with an infinite string of9's),then we associate to x the function whose rule is given by f(n)=d n. clearly this is a one-to-one function from the set of real numbers between 0 and 1 and a subset of the set of all functions from the set of positive integers the set {0,1,2,3,4,5,6,7,8,9}.Two different real numbers must have different decimal representations, so the corresponding functions are different.(A few functions are left out, because of forbidding representations such as 0.239999…)Since the set of real numbers between 0 and 1 is uncountable, the subset of functions we have associated with them must be uncountable. But the set of all such functions has at least this cardinality, so it, too, must be uncountable.P1913.21. The choices of C and k are not unique.a) Yes C = 1, k = 10 b) Yes C = 4, k = 7 c) Nod) Yes C = 5, k = 1 e) Yes C = 1, k = 0 f) Yes C = 1, k = 29. x2+4x+17 ≤ 3x3 for all x>17, so x2+4x+17 is O(x3), with witnesses C = 3, k=17. However, if x3 were O(x2+4x+17), then x3≤C(x2+4x+17) ≤ 3Cx2for some C, for all sufficiently large x, which implies that x≤ 3C, for all sufficiently large x, which is impossible.P2093.419.a) no b) no c) yes d) no31.a) GR QRW SDVV JRb) QB ABG CNFF TBc) QX UXM AHJJ ZXP2183.513.a) Yes b) No c) Yes d) Yes17a) 2 b) 4 c) 12P2804.122.A little computation convinces us that the answer is that n2 ≤ n! for n= 0, 1, and all n≥ 4. (clearly the inequality doesn’t hold for n=2 or n=3) We will prove by mathematical induction that the inequality holds for all n≥ 4. The base case is clear, since 16 ≤ 24. Now suppose that n2 ≤ n! for a given n≥ 4. We m ust show that (n+1)2≤ (n+1)!. Expanding the left-hand side, applying the inductive hypothesis, and then invoking some valid bounds shows this:n2 + 2n+ 1 ≤ n! + 2n + 1≤ n! + 2n + 1 = n! + 3n≤ n! + n·n≤ n! + n·n!≤ (n+1)n! = (n+1)!P2934.231.Assume that the well-ordering property holds. Suppose that P(1) is true and that the conditional statement [P(1)∧P(2) ∧···∧P(n)] →P(n+1) is true for every positive integer n. Let S be the set of positive integers n for which P(n) is false. We will show S=Ø. Assume that S≠Ø, then by the well-ordering property there is a least integer m in S. We know that m cannot be 1 because P(1) is true. Because n=m is the least integer such that P(n) is false, P(1), P(2),…,P(m-1) are true, and m-1 ≥1. Because [P(1)∧P(2) ∧···∧P(m-1)] →P(m) is true, it follows that P(m) must also be true, which is a contradiction. Hence, S= Ø.P3084.310.The base case is that S m(0)=m. The recursive part is that S m(n+1) is the successor of S m(n)(i.e., S m(n)+1)12.The base case n=1 is clear, since f12=f1f2=1. Assume the inductive hypothesis. Thenf12+f22+…+f n2+f n+12 = f n+12+f n f n+1= f n+1(f n+1+f n)= f n+1f n+2, as desired.31.If x is a set or variable representing set, then x is well-formed formula. if x and y are all well-formed formulas, then x, (x∪y), (x∩y) and (x-y) are all well-formed formulas.50.Let P(n) be “A(1, n) = 2n .”BASIC STEP: P(1) is true, because P(1) = A(1, 1) = 2 = 21.INDCUTIVE STEP: Assume that P(m) is true, that is A(1, m) = 2m and m≥1. Then P(m+1) = A(1, m+1) = A(0, A(1, m))= A(0, 2m)=2·2m=2m+1.So A(1, n) = 2n whenever n≥159.b) Not well defined. F(2) is not defined since F(0) isn’t.Also, F(2) is ambiguous.d) Not well defined. The definition is ambiguous about n=1.P3445.13.a) 104b) 10512.We use the sum rule, adding the number of bit strings of each length up to 6. If we include the empty string, then we get 20 + 21 + 22 + 23 + 24 + 25 + 26= 27–1=12720.a) Every seventh number is divisible by 7. Therefore there are 999 / 7=142such numbers. Note that we use the floor function, because the k th multiple of 7 does not occur until the number 7k has been reached.b) For solving this part and the next four parts, we need to use the principle of inclusion-exclusion. Just as in part(a), there are 999/11=90 numbers in our range divisible by 11, and there are 999/77=12 numbers in our range divisible by both 7 and 11 (the multiples of 77 are the numbers we seek). If we take these 12 numbers are away from the 142 numbers divisible by 7, we see that there are 130 numbers in our range divisible by 7 but not by 11.c) as explained in part(b), the answer is 12.d) By the principle of inclusion-exclusion, the answer, using the data from part (b), is 142+90-12=220.e) If we subtract from the answer to part(d) the number of numbers divisible by neither of them; so the answer is 220-12=208.f) If we subtract the answer to part(d) from the total number of positive integers less than 1000, we will have the number of numbers divisible by exactly one of them; so the answer is 999-220=779.g) If we assume that numbers are written without leading 0s, then we should break the problem down into three cases-one-digit numbers, two-digit numbers. Clearly there are 9 one-digit numbers, and each of them has distinct digits. There are 90 two-digit numbers (10 through 99), and all but 9 of them have distinct digits. An alternativeway to compute this is to note that the first digit must be 1 through 9 (9 choices) and the second digit must be something different from the first digit (9 choices out of the 10 possible digits), so by the product rule, we get 9*9=81 choices in all. This approach also tells us that there are 9*9*8=648 three-digit numbers with distinct digits (again, work from left to right-in the ones place, one 8 digits are left to choose from). 80 the final answer is 9+81+648=738.h) It turns out to be easier to count the odd numbers with distinct digits and subtract from our answer to part(g), so let us proceed that way. There are 5 odd one-digit numbers. For two-digit numbers, first choose the one digit (5 choices), then choose the tens digits (8 choices), since neither the ones digit value not 0 is available); therefore there are 40 such two-digit numbers. (Note that this is not exactly half of 81.) For the three-digit numbers, first choose the ones digit (5 choices), then the hundreds digit (8 choices), then the tens digit (8 choices), giving us 320 in all. So there are 5+40+320=365 odd numbers with distinct digits. Thus the final answer is 738-365=373.35.a) 若n=1, 为2;若n=2, 为2; 若n>=3, 为0b) 对于n>1, 为22 n;若n=1, 为1;c) 2(n-1) (注:n可映射到0,1两种可能)44.First we count the number of bit strings of length 10 that contain five consecutive 0’s. We will base the count on where the string of five or more consecutive 0’s starts. If it starts in the first bit, then the first five bits are all 0’s, but there is free choice for the last five bits; therefore there are 25 = 32 such strings. If it starts in the second bit, then the first bit must be a 1, the next five bits are all 0’s, but there is free choice for the last four bits; therefore there are 24 = 16 such strings. If it starts in the third bit, then the second bit must be a 1 but the first bit and the last three bits are arbitrary; therefore there are 24= 16 such strings. Similarly, there are 16 such strings that have the consecutive 0’s starting in each of positions four, five ,and six. This gives us a total of 32+5×16=112 strings that contain five consecutive 0’s. Symmetrically, there are 112 strings that contain five consecutive 1’s. Clearly there are exactly two strings that contain both (0000011111,1111100000). Therefore by the inclusion-exclusion principle, the answer is 2*(112)-2=222.52.We draw the tree, with its root at the top. We show a branch for each of the possibilities 0 and 1, for each bit in order, except that we do not allow three consecutive 0’s. Since there are 13 leaves, the answer is 13.second bitthird bitfourth bitP3535.26.There are only d possible remainders when an integer is divided by d, namely 0, 1, …, d-1. By the pigeonhole principle, if we have d+1 remainders, then at least two must be the same.10.The midpoint of the segment whose endpoints are (a,b) and (c,d) is ( ( a + c ) / 2, ( b + d ) / 2). We are concerned only with integer values of the original coordinates. Clearly the coordinates of these fractions will be integers as well if and only if a and c have the same parity (both odd or both even) and b and d have the same parity. Thus what matters in this problem is the parities of coordinates. There are four possible pairs of parities: (odd,odd), (odd, even), (even, even) and (even,odd). Since we are given five points, the pigeonhole principle guarantees that at least two of them will have the same pair of parties. The midpoint of the segment joining these two points will therefore have integer coordinates.38.a) T b) Tc) T1 ≤a1< a2 < …< a75≤ 125 , and 26 ≤a1 + 25 < a2 + 25 < …< a75 + 25 ≤ 150.Now either of these 150 numbers are precisely all the number from 1 to 150, or else by the pigeonhole principle we get, as in Exercise 37, a i = a j + 25 for some i and j and we are done. In the former case, however, since each of the number a i + 25 is greater than or equal to 26, the numbers 1, 2, … , 25 must all appear among the a i’s. But since the a i’s are increasing, the only way this can happen is if a1=1, a2 =2 , …, a25=25. Thus there were exactly 25 matches in the first25 hours.d) TWe need a different approach for this part, an approach, incidentally, that works for many numbers besides 30 in this setting. Let a1, a2 , …a75 be as before, and note that 1 ≤a1< a2 < …< a75≤ 125. By the pigeonhole principle two of the numbers among a1, a2 , …a 31 are congruent modulo 30. If they differ by 30, then we have our solution. Otherwise they differ by 60 or more, so a 31 ≥ 61. Similarly, among a 31through a 61 ,either we find a solution, or two numbers must differ by 60 or more; therefore we assume that a 61 ≥ 121. But this means that a 66 ≥ 126, a contradiction.注:38题d 因为30大于25,不能用解决a,b,c的方法解决,所以适用一种新的方法(这种方法对前面3问同样适用的)。
离散数学模拟题及部分答案(英文)
Discrete Mathematic TestEditor: Jin PengDate: 2008.5.6Discrete Mathematic Test (Unit 1) (2)Discrete Mathematic Test (Unit 2) (8)Discrete Mathematic Test (Unit 3) (13)Discrete Mathematic Test 1 (17)Discrete Mathematic Test 2 (22)Appendix1 Answer to Discrete Mathematic Test(Unit 1) (26)Appendix2 Answer to Discrete Mathematic Test 2 (31)Discrete Mathematic Test (Unit 1)In this part, you will have 15 statements. Make your own judgment, and then put T (True) or F (False) after each statement.1. Let A, B, and C be sets such that A∪B=A∪C, then B=C. ( )2. Let A and B be subsets of a set U, and A B, then A△B=A Band A∩B’=. ( ) 3. Let p a nd q and r be three statements. If ~pÚ~q ≡ ~pÚ~r, then q and r have the same value. ( )4. Let A, B be sets such that both AÍB and AÎB is possible. ( )5. Let p and q be two statements, then (p®~q) ®((~pÚ~q)(p®~q)) is a tautology.( ) 6.Let A, B be sets, P(A) is the power set of A, then P(A B)=P(A)P(B). ( )7. Let A, B, and C be sets, then if AÎB,BÍC,then AÍC. ( )8. Let A, B be sets, if A={Æ}, B=P(P(A)), then {Æ}ÎB and{Æ}ÍB. ( )9. Let x be real number, then xÎ{x}{{x}} and {x}Í{x}{{x}}. ( )10. Let A, B, and C be sets, then A(B∪C) = (A B) ∪(A C). ( )11. If A={x}∪x, then xÎA and xÍA. ( )12. (x)(P(x)∧Q(x))and (x)P(x) ∧(x)Q(x) are equivalent. ( )13. Let A and B be sets, then A×(B C)=(A×B) (A×C). ( )14. The argument formula (pÚq)® (r s), (sÚt)®w╞ p®w is valid. ( )15. (x)(P(x) ®Q(x))and (x)P(x) ® (x)Q(x) are equivalent. ( )Part II (1 Foundations: Sets Logic, and Algorithms , 85 Scores)1. (8 points)What sets so each of the Venn diagrams in following Figure represent?2. (8 points)Let U={1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}. Let A={1,5,6,9,10,15} and B={5,6,8,9,12,13}. Determine the following:Find a. SA b. SA’ c. SB d. SA∩B .3. (8 points) A class of 45 students has 3 minors for options, respectively A, B and C. A is the set of students taking algebra, B is the set of students who play basketball, C is the set of students taking the computer programming course. Among the 45 students, 12 choose subject A, 8 choose B and another 6 choose C. Additionally, 9 students choose all of the three subjects.What is the at least number of students do not taking the algebra course and the computer programming course and playing basketball?4. (8 points)Find a formula A that uses the variables p and q such that A is true only when exactly one of p and q is true.5. (8 points)Prove the validity of the logical consequences.Anne plays golf or Anne plays basketball. Therefore, Anne plays golf.6. (9 points)Prove the validity of the logical consequences.If the budget is not cut then prices remain stable if and only if taxes will be raised. If the budget is not cut, then taxes will be raised. If price remain stable, then taxes will not be raised. Therefore, taxes will not be raised.7. (8 points) (1) What is the universal quantification of the sentence: x2 +x is an even integer, where x is an even integer? Is the universal quantification a true statement?(2) What is the existential quantification of the sentence: x is a prime integer, where x is an odd integer? Is the existential quantification a true statement?8. (12 points)Symbolize the following sentences by using predicates, quantifiers, and logical connectives.(1) Any nature number has only one successor number.(2) For all x,y N, x+y=x if and only if y=0.(3) Not all nature number x N, it exist a nature number y N, such that x≤y.9. (8 points)Show that x(~F(x)∨A(x)),x(A(x) →B(x)),x F(x)|= x B(x)10. (8 points)In the bubble sort algorithm, if successive elements L[j] and L[j+1] are such that L[j]>L[j+1], then they are interchanged, that is, swapped. Therefore, the bubble sort algorithm may require elements to be swapped. Show how bubble sort sorts the elements 7 5 6 3 1 4 2 in increasing order. Draw figures.Discrete Mathematic Test (Unit 2)Part I (T/F questions, 15 Scores)In this part, you will have 15 statements. Make your own judgment, and then put T (True) or F (False) after each statement.1.Let A and B be sets such that any subsets of A B is a relation from A to B. ( )2. Let R={(1,1),(1,2),,(3,3) ,(3,1) ,(1,3)} be relations on the set A={1,2,3}then R is transitive. ( )3. Let R={(1,1),(2,2),(2,3),(3,3)} be relations on the set A={1,2,3}then R is symmetric.( ) 4. Let R be a symmetric relation. then Rn is symmetric for all positive integers n.( ) 5. Let R and S are reflexive relations on a set A then maybe not reflexive.( ) 6. Let R={(a,a),(b,b),(c,c) ,(a,b) ,(b,c)} be relations on the set A={a,b,c}then R is equivalence relation. ( )7. If R is equivalence relation,then the transitive closure of R is R. ( )8. Let R be relations on a set A,then R maybe symmetric and antisymmetic. ( )9. If and are partition of a given set A,then ∪ is also a partition of A.( )10.Let R and S are equivalence relations on a set A, Let ψ be the set of all equivalence class of R,and ϖ be the set of all equivalence class of S, if R≠S, then ψ∩ϖ =Φ. ( ) 11. Let (S,) be a poset such that S is a finite nonempty set,then S has ninimal element,and the elements is unique. ( )12. Let R and S are relations on a set A,then MR∩S MR∧MS. ( )13. If a relation R is symmetric .then there is loop at every vertex of its directed graph.( ) 14. A directed graph of a partial order relation R cannot contain a closed directed path other than loops. ( ) 15. The poset ,where P(S) is the power set of a set S is not a chain. ( )Part II (1 Foundations: Sets Logic, and Algorithms , 85 Scores)1. (8 points) Let R be the relation {(1, 2), (1, 3), (2, 3), (2, 4), (3, 1)}, and let S be relation {(2, 1), (3, 1), (3, 2), (4, 2)}. Find S R.and R3.2. (8 points)Determine whether the relations represented by the following zero-one matrices are partial orders.3. (8 points)Determine the number of different equivalence relations on a set with three elements by listing them.4. (8 points)Let R ={ (a , b)∈A| a divides b }, where A={1,2,3,4}. Find the matrix MR of R. Then determine whether R is reflexive, symmetric, or transitive.5. (8 points)Determine whether the relation R on the set of all people is reflexive, symmetric, antisymmetric, and/or transitive, where (a, b) R if and only ifa) a is taller than b.b) a and b were born on the same day.c) a has the same first name as b.6. (8 points) Define a equivalence relations on the set of students in your discrete mathematics class .Determine the equivalence classes for these equivalence relations.7. (10 points) Let R be the relation on the set of ordered pairs of positive integers such that if and only if . Show that R is an equivalence relation.8. (8 points) Answer the following questions for the partial order represented by the following Hasse diagram.9. (9 points) Let R be the relation on the set A={a,b,c,d} such that the matrix of R isfind(1) reflexive closure of R.(2) symmetric closure of R.(3) transitive closure of R.10. (10 points)(1)Show that there is exactly one greatest element of a poset, if such an element exists.(2) Show that the least upper bound of a set in poset is unique if it exists.Discrete Mathematic Test (Unit 3)Part I (T/F questions, 15 Scores)In this part, you will have 15 statements. Make your own judgment, and then put T (True) or F (False) after each statement.1. There exist a simple graph with four edges and degree sequence 1,2,3,4. ( )2. There are at least two people whith exactly the same number of friends in any gathering of n>1 people.. ( )3. The number of edges in a complete graph with n vertices is n(n-1). ( )4. The complement of graph G is not possible a subgraph of G. ( )5. Tthat any cycle-free graph contains a vertex of degree 0 or 1.( )6. The graph G, either G or its complement G’, is a connected graph. ( )7. Any graph G and its complement G’ can not be isomorphic ( )8. An Eulerian is a Hamiltonian graph,but a Hamiltonian graph is not An Eulerian .( ) 9. If every member of a party of six people knows at least three people ,prove that they can sit around a table in such a way that each of them knows both his neighbors. ( )10. A circuit either is a cycle or can be reduced to a cycle. ( )11. A graph G with n vertices .G is connected if and only if G is a tree. ( )12. A connected graph is a circuit if the degree of each vertex is 2. ( )13.A circuit either is a cycle or can be reduced to a cycle. ( )14.For any simple connected planar gragh G that X (G) 6. ( )15. .The sum of the odd degrees of all vertices of a graph is even. ( )Part II (1 Foundations: Sets Logic, and Algorithms , 85 Scores)1. (10 points) Does there exist a simple graph with degree sequence 1,2,3,5? Justify you answer.2. (10 points) Suppose there are 90 small towns in a country. From each town there is a direct bus route to a least 50 towns. Is it possible to go from one town to ant other town by bus possibly changing from one bus and then taking another bus to another town?3. 10 points) Find the number of distinct paths of length 2 in graphs K5.4. (5 points Draw all different graphs with two vertices and two edges.5. (10 points) Determine where the graphs in Figure 1 have Euler trails.If the graph has an Euler trail, exhibit one.6.(10 points) Use a K-map to find the minimized sum-of-product Boolean expressions of the expressions.xyzw+xyzw’+xyx’w’+xy’zw’+x’yzw+x’yzw’+x’y’z’w’+x’y’z’w7. (10 points) Insert 5, 10, and 20, in this order, in the binary search tree of following Figure. Draw the binary search tree after each insertion.8.(8 points) Does there exist a simple connected planar graph with 35 vertices and 100 edges?9. (10 points) Let G be a simple connected graph with n vertices. Suppose the degree of each vertex is at lease n 1. Does it imply the existence of a Hamiltonian cycle in G?Discrete Mathematic Test 1Part I (T/F questions)Directions: in this part, you will have 15 statements. Make your own judgment, and then put T (True) or F (False) after each statement.1. Let A and B be nonempty sets .Then A⊆B if and only if A-B=∅. ( )2. Let A and B be nonempty sets. If B≠Φ,then A-B⊆ A. ( )3. “Is Hangzhou a beautiful city?” This sentence is a statement. ( )4. Let P and Q and R be three statements.if P∧Q≡P∧R,then Q and R have the same value.( ) 5. Let P and Q be two statements.then (~p∨~q)→(p→~q) is not a tautology.( )6. (x)(P(x)∧Q(x))and (x)P(x) ∧(x)Q(x) are equivalent. ( )7. Let A and B be sets.any subset of A×B is a relation. ( )8.Let A={ 1,2,3}and R=={<1, 1>, <2, 2>, <1, 3>, <3, 1>, <2, 3>},so R is an equivalence Relation on A. ( ) 9.Let R be a relation on set A.then R is an equivalence Relation on A if and only ifR︒⊆R. ( ) R10. R is an equivalence Relation on A.R- equivalence class is not a partition of A .( )11.If a mathematical system has an identity,so the cayley table has no equalLines. ( ) 12. Let A be a nonempty set.then Φis identity of (ρ(A),∩). ( ) 13.The sum of the odd degrees of all vertices of a graph is even. ( )14. Any graph G and its complement G’can not be isomorphic.( )15. A graph G with n vertices .G is connected if and only if G is a tree. ( )Part Ⅱ ( set questions)Directions: in this part,you need to provide solutions for question 16~17 based on the theory of Knowledge Set .16.Let A,B,and C be sets.Prove A∩(B-C)=(A∩B)-(A∩C).17. A class of 40 students has 3 minors for options, respectively A, B and C. Among the 40 students, 15 choose subject A, 10 choose B and another 6 choose C. Additionally, 5 students choose all of the three subjects. Our question is at least how many students do not choose any subject.Part Ⅲ ( LOGIC questions)Directions: in this part, you need to provide solutions for question 17~19 based on the theory of knowledge logic .18.Show that ~(P∧~Q),~Q∨R ,~R |= ~P19、show that ∀x(F(x) →~A(x)),∀x(A(x)∨B(x),∃x ~B(x) |= ∃x ~F(x)Part Ⅳ ( Relations and Posets questions)Directions: in this part,you need to provide solutions for question 20-22 based on the theory of knowledge relations and posets.20.Let A={1,2,3,4},R={(1,2),(2,3),(3,1) }, L={(1,4),(2,2),(3,3),(4,3)},find the transitiv closures of the relations LR .21.Let {A1, A2, A3………An}be a partition of a given set X.Difine a relation R on S asfollows:For all a,b∈X,(a,b) ∈R if and only if there exists Ai such that a,b∈Ai.Prove R is an equivalence relation on X.22.Conseder the poset(S,≤),where S={k|k%96=0}and the relation ≤ is the divisibility relation.1)Find all minimal and maximal elements.2)Find all lower bounds of{6, 12, 16}.3)Find all upper bounds of{6, 12, 16}.4)Find the glb and lub of {6, 12, 16}.Part Ⅴ ( Mathematical system)Directions: in this part,you need to provide solutions for question 23 based on thetheory of knowledge mathematical system.23.Show that (G, *) is a monoids,where G={(a,b)︱a,b∈R,b≠0} and(a,b)*(c,d)=(bc+a,bd).Part Ⅵ ( Graph and tree)Directions: in this part,you need to provide solutions for question 24 based on the theory of knowledge graph.24.Discrete Mathematic Test 2Part I (T/F questions)Make your own judgment, and then put T (True) or F (False) after each following statement:1). Let A and B be nonempty sets .Then A⊆B if and only if A-B=∅. ( ) 2). Let A and B be nonempty sets. If B≠∅,then A-B ⊆ A. ( ) 3). “Is Hangzhou a beautiful city?” This sentence is a stateme nt. ( ) 4). Let P and Q and R be three statements. If P∧Q ≡ P∧R, then Q and R have the same value. ( ) 5). Let P and Q be two statements. then (~p∨~q)→ (p→~q) is not a tautology.( ) 6). Let A and B be sets. Any subset of A × B is a relation. ( ) 7).Let A= { 1,2,3,4} and R= {(1, 1), (2, 2), (3, 3), (3, 1), (1, 3), (3, 2), (2, 3)}, so R is an equivalence relation on A. ( ) 8).Let R be a relation on set A. Then R is an equivalence Relation on A if and only ifR︒⊆R. ( ) R9). R is an equivalence Relation on A.R- equivalence class is not a partition of A.( ) 10).The sum of the odd degrees of all vertices of a graph is even. ( ) 11). Any graph G and its complement G’ can not be isomorphic. ( ) 12). A graph G with n vertices .G is connected if and only if G is a tree. ( ) 13). A circuit either is a cycle or can be reduced to a cycle. ( ) 14). A connected graph is a circuit if the degree of each vertex is 2. ( ) 15). For any simple connected planar gragh G that X (G)≤ 6. ( )Part Ⅱ1.Let A, B, and C be sets. Prove A∩ (B - C) = (A∩B)-(A∩C).2.Show that ~(P∧~Q),~Q∨R ,~R |= ~P.3.Show that ∀x(F(x) →~A(x)),∀x(A(x)∨B(x),∃x ~B(x) |= ∃x ~F(x). 4.Let A={1,2,3,4}, R={(1,2),(2,3),(3,1) }, L={(1,4),(2,2),(3,3),(4,3)}, find the transitiveclosure of the relations LR .5.Let {A1, A2, A3………An} be a partition of a given set X. Define a relation R on Sas follows:For all a, b∈X, (a,b) ∈R if and only if there exists Ai such that a, b∈Ai. Prove Ris an equivalence relation on X.6.Consider the poset (S,≤), where S={k|k%96=0}and the relation ≤ is the divisibility relation:1) Find all minimal and maximal elements;2) Find all lower bounds of {6, 12, 16};3) Find all upper bounds of {6, 12, 16};4) Find the glb and lub of {6, 12, 16}.7.Use a K-map to find the minimized sum-of-product Boolean expressions of the expressions.xyzw+xyzw’+xyx’w’+xy’zw’+x’yzw+x’yzw’+x’y’z’w’+x’y’z’w8. Insert 5, 10, and 20, in this order, in the binary search tree of following Figure. Draw the binary search tree after each insertion.9.Does there exist a simple connected planar graph with 35 vertices and 100 edges?10. Let G be a simple connected graph with n vertices. Suppose the degree of each vertex is at lease n 1. Does it imply the existence of a Hamiltonian cycle in G?Appendix1 Answer to Discrete Mathematic Test(Unit 1) PartI(T/F questions 15 Points):1) F 2) T 3) F 4) T 5) T 6) F 7) F 8) T 9) T 10) F 11) T 12) T13) T 14) T 15) FPart II1.Solution (8 Points):(i) Y-X = X’ ⋂Y(ii) (X ⋂Z) - Y2.Solution (8 Points):S A= 0001S A’= 1110S B= 1100S A⋂B= 00003.Solution (8 Points):It is given |A|=12, |B|=18, |C|=16, ⎢A⋂B⋂C ⎢=9,∵⎢A⋂B ⎢+ ⎢ A ⋂C ⎢+ ⎢ B ⋂C ⎢≥3 ⎢A⋂B⋂C ⎢ ,∴⎢A⋃B⋃C ⎢= ⎢A ⎢+ ⎢B ⎢+ ⎢C ⎢-⎢A⋂B ⎢-⎢ A ⋂C ⎢-⎢ B ⋂C ⎢+| A⋂B⋂C |≤⎢A ⎢+ ⎢B ⎢+ ⎢C ⎢-2 ⎢A⋂B⋂C ⎢=12+18+16-2⨯9=28∵45 -⎢A⋃B⋃C ⎢=17.Therefore, the at least number of students do not taking the algebra course and the computer programming course and playing basketball is 17.4.Solution (8 Points):Truth table:A ≡~ ( p↔q)≡ ( p ∧~q) ∨ (~p ∧ q)≡ ( p∨q) ∧ (~p ∨~q)5.Solution (8 Points):Let p: Anne plays golf.q: Anne plays basketball.p ∨ g |= pproof:(p∨q)→p≡~ (p∨q) ∨ p≡(~p∧~q) ∨p≡T∧ (~q∨p)≡p∨~qis not tautology.Therefore, the given argument is invalid.6.Solution (8 Points):Let p: The budget is cut.q: Prices remain stable.r: Taxes will be raised.Hence, in symbolic notation, the given argument takes the form~ p → (q ↔ r), ~ p → r, q →~ r |= ~ r.Proof:B1: ~ p → (q ↔ r) HypothesisB2: q →~ r HypothesisB3: ~ p → r HypothesisB4: ~ p → (q ↔ r) → (p ∨ (q → r))∧((r → q) →~ p) TautologyB5: (p∨ (q→r))∧((r →q)→~p) from B1, B4 and by modus ponensB6: (r →q)→~p from B5 and by conjunctive additionB7: (r →q)→ r from B3, B6 and by Hypothesis SyllogismB8: ((r →q)→ r) →~ r→ q TautologyB9: ~ r→ q from B7, B8 and by modus ponensB10: ~ r from B2, B9 and by Hypothesis Syllogism Conclusion: The taxes will not be raised.7.Solution (8 Points):(1)Let p(x): x is an even integer.q(x): x⨯x is an even integer.r(x,y): x+y is an even integer∀x∀y (p(x)∧q(y))→ r(x,y)) is a true statement(2) Let p(x): x is an prime integer.q(x): x is an odd integer.(∃x) (p(x)∧q(y)) where x=38.Solution (8 Points):(1) Let p(x): x is a nature number.q(x, y): y is only one successor number of x.r(x, y): x+y is an even integer∀x∃y (p(x) → p(y) ∧q(x , y))(2) Let p(x): x is a nature numberq(x,y): x+y=x∀x∀y (p(x)∧q(y)) ∧q(x, y) ↔q(0,y)(3) ~∀x∃y (p(x) ∧p(y) →q(x, y)9.Solution (9 Points):Proof:B1: ∀x (~F(x)∨A(x)) HypothesisB2: ∀x (A(x) →B(x)) HypothesisB3: ∃x F(x) HypothesisB4: F(c) from B3 by the rule of inference ESB5: ~F(c) ∨A(c) from B1 by the rule of inference USB6: A(c) →B(c) from B2 by the rule of inference USB7: A(c) B7 from B4,B5 by Hypothesis Syllogism 10.Solution (10 Points):Appendix2 Answer to Discrete Mathematic Test 2PartI(T/F questions 15 Marks):1) T 2) T 3) F 4) F 5) T 6) F 7) F 8) F 9) F 10) T 11) F 12) T13) F 14) T 15) TPart II1.Solution (8 Marks):A⋂(B-C)= A⋂B⋂C’=(A⋂B⋂C’)⋃F=(A⋂B⋂C’)⋃(A⋂B⋂A’)=(A⋂B)⋂(A’⋃C’)=(A⋂B)⋂(A⋂C)’=(A⋂B) - (A⋂C)Or(A⋂B) - (A⋂C) = (A⋂B)⋂(A⋂C)’ =A⋂(B⋂(A’⋃C’) )=(A⋂B⋂A’) ⋃(A⋂B⋂C’)= F ⋃(A⋂B⋂C’)= A⋂B⋂C’= A⋂(B⋂C’)= A⋂(B-C)Therefore A⋂(B-C)= (A⋂B) - (A⋂C)2.Solution (8 Marks):B1 ~(P∧~Q) HB2 ~Q∨R HB3 ~R HB4 ~Q B2,B3 by DSB5 ~P∨Q TautologyB6 ~P B4,B5 by DS∴|= ~P∀) (P(x) →Q(x))3.Solution: a) (xb) (x∃) (R(x) Λ~Q(x))c) (x∃) (R(x) Λ~P(x))Hence,(c) is vailid argument for Hypothesis of (a) and (b).∀) (P(x) →Q(x)) HypothesisProof: B1: (xB2: (x∃) (R(x) Λ~Q(x)) HypothesisB3: R(c) Λ~Q(c) from B2 by ESB4: P(c) →Q(c) from B2 by USB5: ~Q(c) from B3 byB6: ~ P(c)B7: R(c)B8: R(c) Λ~ P(c)B9: (x∃) (R(x) Λ~P(x))4. Solution (8 Marks):R︒L = {(1,2),(2,3),(3,4)}(R︒L)n = {(1,2),(2,3),(3,4),(1,3),(2,4),(1,4)}5.Solution: Let R be a Relation on set A, where A={1,2,3,4}Different Partition as follows:π1 = {{1}, {2}, {3}, {4}}π2 = {{1, 2}, {3, 4}}π3 = {{1, 2}, {3}, {4}}π4 = {{1}, {2}, {3, 4}}π5 = {{1, 3}, {2, 4}}π6 = {{1, 3}, {2}, {4}}π7 = {{1}, {3}, {2, 4}}π8 = {{1, 4}, {2, 3}}π9 = {{1, 4}, {2}, {3}}π10= {{1}, {4}, {2, 3}}π11= {{1, 2, 3}, {4}}π12 = {{1, 2, 4}, {3}}π13 = {{1, 3, 4}, {2}}π14 = {{2, 3, 4}, {1}}π15 = {{1, 2, 3, 4}}One-to-one equivalence Relation as follows:R1= {(1, 1), (2, 2), (3, 3), (4, 4)}R2= {(1, 1), (2, 2), (3, 3), (4, 4), (1, 2), (2, 1), (3, 4), (4, 3)}R3= {(1, 1), (2, 2), (3, 3), (4, 4), (1, 2), (2, 1)}……6.Solution (8 Marks):S={1,2,3,4,6,8,12,16,24,32,48,96}1)minimal element is 1;maximal element is 96;2) all lower bounds of {6,12,16} are 1,2. 3) all upper bounds of {6,12,16} are 48,96;4) glb of{6,12,16} is 2; lub of{6,12,16} is 48.7.Solution (8 Marks):16 28 4 32xyx’y x’y ’xy ’zw zw’ z’w z’w’xyzw+ xyzw’+xyz’w’+xy’zw’+x’yzw+x’yzw’+x’y’z’w’+x’y’z’w=(xyzw+xyzw’+x’yzw+x’yzw’)+(xyz’w’+xyzw’)+(xy’zw’+xyzw’) +(x’y’z’w’+x’y’z’w) =yz+ xyw’ + xzw’ + x’y’z’8.Solution (9 Marks):5Insert 20xy x’y x’y ’ xy ’zw z’w z’w’zw’OR: 8259.Solution (10 Marks):10.Solution: the different graphs with six vertices and three edgesas follows :a)b)c)d)e)f)g)2V3 V62V34V5V62V3V4V3V6123V4VV3V21e3e3e2e3h)i) j)k) l)e1V2134V623532213V6e23213V6e3213V45V6M k6 = ⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎦⎤⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎣⎡011111101111110111111011111101111110M (k6)2= ⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎦⎤⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎣⎡0111111011111101111110111111011111100⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎦⎤⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎣⎡011111101111110111111011111101111110= ⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎦⎤⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎣⎡544444454444445444444544444454444445Consequently, the number of distinct paths of length 2 in graph K6 is 4*(5+4+3+2+1)=60.。
离散数学期末考试试题(有几套带答案)
离散数学试题(A 卷及答案)一、证明题(10分)1)(⌝P ∧(⌝Q ∧R))∨(Q ∧R)∨(P ∧R)⇔R证明: 左端⇔(⌝P ∧⌝Q ∧R)∨((Q ∨P)∧R)⇔((⌝P ∧⌝Q)∧R))∨((Q ∨P)∧R)⇔(⌝(P ∨Q)∧R)∨((Q ∨P)∧R)⇔(⌝(P ∨Q)∨(Q ∨P))∧R ⇔(⌝(P ∨Q)∨(P ∨Q))∧R ⇔T ∧R(置换)⇔R2)∃x(A(x)→B(x))⇔ ∀xA(x)→∃xB(x)证明 :∃x(A(x)→B(x))⇔∃x(⌝A(x)∨B(x))⇔∃x ⌝A(x)∨∃xB(x)⇔⌝∀xA(x)∨∃xB(x)⇔∀xA(x)→∃xB(x) 二、求命题公式(P ∨(Q ∧R))→(P ∧Q ∧R)的主析取范式和主合取范式(10分)证明:(P ∨(Q ∧R))→(P ∧Q ∧R)⇔⌝(P ∨(Q ∧R))∨(P ∧Q ∧R))⇔(⌝P ∧(⌝Q ∨⌝R))∨(P ∧Q ∧R) ⇔(⌝P ∧⌝Q)∨(⌝P ∧⌝R))∨(P ∧Q ∧R)⇔(⌝P ∧⌝Q ∧R)∨(⌝P ∧⌝Q ∧⌝R)∨(⌝P ∧Q ∧⌝R))∨(⌝P ∧⌝Q ∧⌝R))∨(P ∧Q ∧R) ⇔m0∨m1∨m2∨m7 ⇔M3∨M4∨M5∨M6三、推理证明题(10分)1) C ∨D, (C ∨D)→ ⌝E, ⌝E →(A ∧⌝B), (A ∧⌝B)→(R ∨S)⇒R ∨S证明:(1) (C ∨D)→⌝E(2) ⌝E →(A ∧⌝B)(3) (C ∨D)→(A ∧⌝B) (4) (A ∧⌝B)→(R ∨S) (5) (C ∨D)→(R ∨S)(6) C ∨D(7) R ∨S2) ∀x(P(x)→Q(y)∧R(x)),∃xP(x)⇒Q(y)∧∃x(P(x)∧R(x))证明(1)∃xP(x) (2)P(a)(3)∀x(P(x)→Q(y)∧R(x)) (4)P(a)→Q(y)∧R(a) (5)Q(y)∧R(a) (6)Q(y) (7)R(a) (8)P(a) (9)P(a)∧R(a) (10)∃x(P(x)∧R(x)) (11)Q(y)∧∃x(P(x)∧R(x))四、设m 是一个取定的正整数,证明:在任取m +1个整数中,至少有两个整数,它们的差是m 的整数倍证明 设1a ,2a ,…,1+m a 为任取的m +1个整数,用m 去除它们所得余数只能是0,1,…,m -1,由抽屉原理可知,1a ,2a ,…,1+m a 这m +1个整数中至少存在两个数s a 和t a ,它们被m 除所得余数相同,因此s a 和t a 的差是m 的整数倍。
双语离散数学期末考试_2012年春季_试卷A
电子科技大学2011 -2012学年第 2学期期 末 考试 A 卷课程名称: 离散数学 考试形式: 闭卷 考试日期: 2012 年 6 月 日 考试时长:120分钟 课程成绩构成:平时 10 %, 期中 20 %, 实验 0 %, 期末 70 % 本试卷试题由____ _部分构成,共_____页。
I.Multiple Choice (15%)1. (⌝p ∧q)→(p ∨q) is logically equivalent toa) T b) p ∨q c) F d) ⌝ p ∧q ( ) 2. If P(A) is the power set of A, and A = , what is |P(P(P(A)))|?a) 4 b) 24 c) 28 d) 216( ) 3. Which of these statements is NOT a proposition?a) Tomorrow will be Friday. b) 2+3=4.c) There is a dog. d) Go and play with me.( )4. The notation K n denotes the complete graph on n vertices. K n is the simple graph thatcontains exactly one edge between each pair of distinct vertices. How many edges comprise a K 20?a) 190 b) 40 c) 95 d) 380( )5. Suppose | A | = 5 and | B | = 9. The number of 1-1 functions f : A → B isa) 45 b) P (9,5). c) 59 d) 95( )6. Let R be a relation on the positive integers where xRy if x divides y . Whichof the following lists of properties best describes the relation R ?a) reflexive, symmetric, transitive b) reflexive, antisymmetric, transitive c) reflexive, symmetric, antisymmetric d) symmetric, transitive ( )7. Which of the following are partitions of }8,7,6,5,4,3,2,1{=U ?a) }8,7,6,5,4,3{},3,2,1{},1{ b) }8,7,6,5,4,3{},3,2{},1{c) }8,6,5{},3,2{},7,4,1{ d) }8,7,6,5,4{},3,2{},2,1{( ) 8. The function f(x)=3x 2log(x 3+21) is big-O of which of the following functions? a) x 3 b) x 2(logx)3 c) x 2logx d) xlogx ( ) 9.In the graph that follows, give an explanation for why there is no path from a back to a that passes through each edge exactly once.a) There are vertices of odd degree, namely {B,D}. b) There are vertices of even degree, namely {A,C}. c) There are vertices of even degree, namely {B,D}. d) There are vertices of odd degree, namely {A,C}.( ) 10. Which of the followings is a function from Z to R ?a) )1()(-±=n n f . ` b) 1)(2+=x x f . c) x x f =)( d) 11)(2-=n n fII. True or False (10%)( ) 1. If 3 < 2, then 7 = 6. ( ) 2. p ∧ (q ∨ r)≡ (p ∧ q) ∨ r( ) 3. If A , B , and C are sets, then (A -C )-(B -C )=A -B . ( ) 4. Suppose A = {a ,b ,c }, then {{a }} ⊆ P (A ).( ) 5. ()100h x x =+is defined as a function with domain R and codomain R.( ) 6. Suppose g : A → B and f : B → C , where f g is 1-1 and f is 1-1. g must be 1-1? ( ) 7. If p and q are primes (> 2), then p + q is composite .( ) 8.If the relation R is defined on the set Z where aRb means that ab > 0, then R is an equivalence relation on Z .( ) 9. Every Hamilton circuit for W n has length n .( ) 10. There exists a simple graph with 8 vertices, whose degrees are 0, 1, 2, 3, 4, 5, 6, 7.III. Fill in the Blanks (20%)1. Let p and q be the propositions “I am a criminal” and “I rob banks”. Express in simple English the propositi on “if p then q”: .2. P (x ,y ) means “x + 2y = xy ”, where x and y are integers. The truth value of ∃x ∀yP (x ,y ) is .3. T he negation of the statement “No tests are easy.” is .4. If 11{|}i A x x R x i i =∈∧-≤≤ then 1i i A +∞=is .5. Suppose A = {x , y }. Then ()P A is .6. Suppose g : A →A and f :A →A where A ={1,2,3,4},g = {(1, 4), (2,1), (3,1), (4,2)} andf ={(1,3),(2,2),(3,4),(4,2)}.Then fg = . 7.The sum of 2 + 4 + 8 + 16 + 32 + ... + 210 is .8. The expression of gcd(45, 12) as a linear combination of 12 and 45 is .9.There are permutations of the seven letters A,B ,C ,D ,E ,F have A immediately to the left of E .10. If G is a planar connected graph with 18 vertices, each of degree 3, then G has _ __regions. IV. Answer the Questions (32%):1. Determine whether the following argument is valid: p → r q → r q ∨ ⌝r ________∴ ⌝p2. S uppose you wish to prove a theorem of the form “if p then q ”. (a) If you give a direct proof, what do you assume and what do you prove? (b) If you give an indirect proof, what do you assume and what do you prove? (c) If you give a proof by contradiction, what do you assume and what do you prove?3. Prove that A B A B ⋂=⋃ by giving a proof using logical equivalence.4.Suppose f:R→R where f(x) =⎣x/2⎦.(a) If S={x| 1 ≤x≤ 6}, find f(S).(b) If T={3,4,5}, find f-1(T).e the definition of big-oh to prove that5264473n nn+--is O(n3).6.Solve the linear congruence 5x≡ 3 (mod 11).e the Principle of Mathematical Induction to prove that131 1392732nn+-++++...+=for alln≥ 0.8.Draw the directed graph for the relation defined by the matrix1111 0111 0011 0001⎡⎤⎢⎥⎢⎥⎢⎥⎢⎥⎣⎦.V. (6%) Without using the truth table, show that the following are tautologiesa) [⌝p ∧(p ∨q)]→q b) [p ∧(p →q)]→qVI. (6%) Devise an algorithm which will find the minimum of n integers. What is the worst casetime complexity of this algorithm?VII. (5%) Give the definition of a transitive relation, and Prove or disprove that the union oftwo transitive relations is transitive.VIII.(6%) The pseudo-code of Prim’s algorithm is given as following:Procedure Prim(G: connected weighted undirected graph with n vertices)T := a minimum-weight edgefor i := 1 to n 2begine := an edge of minimum weight incident to a vertex in T and notforming a simple circuit in T if added to TT := T with e addedPrint eend {T is a minimum spanning tree of G}(a)Find a minimum spanning tree using Prim’s algorithm given above. For every iterative in for-loop, list theresult for “Print e” statement.(b)Compute the total weight of the spanning tree.。
机械工业出版社离散数学英文版部分答案 (2)
Ex8 a): If you have the flu, then you miss the final exam.Ex 8 c): if you miss the final exam, then you do not pass the course.Ex 8 e): it is either the case that if you have the flu then you do not pass the course or the case that if you miss the final exam then you do not pass the course.Ex12: T F T FEx28:Ex36: a) x=2 c) x=2 e) x=2Ex48: a) r∧¬p b) (r∧p)→q c) ¬r→¬q d) (¬p∧r)→qEx52: This system is consistent. We use L, Q, N, and B to stand for the basic operations here, “ the file system is locked”, “New messages will be queued”, “the system is functioning normally”, and “New messages will be sent to the message buffer”, respectively. Then the given specifications are ¬L→Q, ¬L↔N, ¬Q→B, ¬L→B, ¬B. If we want consistency, then we had better have B=F, L=T, Q=T, N=F.Ex64: a) John did; b) Carlos did.1.2: P28Ex8 a) Kwame will not take a job in industry and will not go to graduate school.c) James is not young, or he is not strong.Ex10:Ex26: ¬p→(q→r) ≡p∨(q→r) ≡p∨(¬q∨r)≡¬q∨(p∨r)≡q→(p∨r)Ex40: p ∧ q ∧¬r1.3: P47Ex8 a) If an animal is a rabbit, then that animal hops. (Alternatively, every rabbit hops)c) There exists an animal such that if it is a rabbit, then it hops.Ex12 a) True c) False e)False g)FalseEx20 a) P(-5)∨P(-3)∨P(-1)∨P(1)∨ P(3)∨ P(5)c) P(-5)∧P(-3)∧P(-1)∧P(3)∧P(5)e) (¬P(1)∨¬P(3)∨¬P(5))∧P(-1)∧P(-3)∧P(-5))Ex28 Let R(x)=”x is in the correct place”, E(x)=”x is in excellent condition”, T(x)=”x is a tool”a) ∃ x ¬R(x) c) ∀x (R(x) ∧E(x))e)∃ x (T(x) ∧¬R(x)∧E(x))Ex44: For example, we can take P(x) to mean that x is an even number and Q(x) to mean that x is a multiple of 3, and we can find they are not logically equivalent.1.4: P58Ex4 a) Some student in your class has taken some computer science course.c) Every student in your class has taken at least one computer science course.e) Every computer science course has been taken by at least one student in your class.Ex10 a) ∀x F(x,Fred) c) ∀x ∃ y F(x,y) e)∀ y ∃ x F(x,y)g) ∃ y1∃ y2 (F(Nancy,y1)∧ F(Nancy,y2) ∧y1<> y2∧∀ y (F(Nancy,y)→ y=y1∨ y=y2)))i) ¬∃ x F(x,x)Ex26: a) F c) F e)T g)T i) FEx40: a) e.g. x=2 b) e.g. x=-200 c) e.g. x=y=01.5: P73Ex12: Applying exercise 11, we want to show that the conclusion r follows from the five premises (p ∧t)→(r ∨ s), q→(u ∧ t), u→p, ¬s and q.From q and q→(u ∧ t), we get u and t; from u and u→p, we get p; from p and t and (p ∧t)→ (r ∨ s), we get r ∨ s; from r ∨ s and ¬s, we finally get r.Ex18: We know that some s exists that makes S(s,Max) true, but we can’t conclude that Max is one such s. therefore this first step is invalid.Ex28: We want to show that the conditional statement ¬R(a)→P(a) is true for all a in the domain. The desired conclusion then follows by universal generalization. From ∀ x (P(x)∨ Q(x)), we have P(a) ∨Q(a) by universal instantiation. From ∀x ((¬P(x) ∧Q(x)) →R(x)) , we get ¬P(a)∧Q(a)→R(a). from ¬R(a) and ¬P(a)∧Q(a)→R(a), we get P(a)∨¬Q(a). from P(a)∨ Q(a) and P(a)∨¬Q(a), we obtain P(a). Applying exercise 11, we get ¬R(a)→P(a).1.6: P85Ex8: Let n=m2, where m>=1. The smallest perfect square greater than n is (m+1)2, and we have (m+1)2= m2+2m+1=n+2m+1>n+2+1>n+2. Therefore n+2 can’t be a perfect square.Ex18:a) We must prove the contraposition: if n is odd, then 3n+2 is odd. Assume that n is odd. Then we can write n=2k+1 for some integer k. Then 3n+2=2(3k+2)+1. Thus 3n+2 is odd.b) Suppose that 3n+2 is even and that n is odd. Since 3n+2 is even, so is 3n. since n is odd, so is 3n-n=2n. But this is obviously not true. Therefore our assumption was wrong.1.7: P102Ex4: There are three main cases, depending on which of the three numbers (a, b and c) is smallest. Ex10: Of these three numbers, at least two must be both negative or both nonnegative. The product of two with the same sign (It is conceivable that some of them are zero, but we view zero as positive for the purpose of this problem) is nonnegative.Ex12: To disprove such a statement it suffices to provide one counterexample. Take a=2 and b=1/2. Then a b=21/2 is not rational.。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
西南大学课程考核
命题教师:教研室或系负责人:主管院长:年月日
第1 页共4页
《离散数学》课程试题
【A 】卷
第2页 共6页
2. Choose the corresponding letter of the best answer that best completes the statements or answers the questions among A, B, C, and D and fill the blanks (3 points each ,15 points in all).
(1) Suppose A = {1, 2, 3}. The following statement ( ) is not true. A .∅ ⊆ ℘(A ) B .{∅} ⊆ ℘(A ) C .{2, 3}∈ A ⨯ A D .{{2}} ⊆ ℘(A )
(2) Suppose that R and S are transitive relations on a set A . Then ( ) is transitive. A . S R ⋂ B .S R ⋃ C . S R - D .S R
(3) There are ( ) strongly connected components of the following graph G .
A. 1
B. 2
C. 3
D. 4
(4) There are ( D ) nonisomorphic undirected trees with 5 vertices.
A. 6
B. 5.
C. 4 非同构的无向树
D. 3
(5) Suppose P (x , y ) is a predicate and the universe for the variables x and y is {1,2,3}. Suppose P (1,3), P (2,1), P (2,2), P (2,3), P (3,1), P (3,2) are true, and P (x , y ) is false otherwise. The following statement ( ) is true.
A. ∀y ∃x (P (x , y ) → P (y , x ))
B. ¬∃x ∃y (P (x , y ) ∧ ¬P (y , x ))
C. ∀x ∀y (x ≠ y → (P (x , y ) ∨ P (y , x ))
D. ∀y ∃x (x ≤ y ∧ P (x , y ))
西 南 大 学 课 程 考 核 (试题 【A 】卷)
第3页 共6页
——————————————密
————————————封
————————————线
——————————————
3. Write “√” for true, and “⨯” for false in the blanks at end of each statement (3 points each ,15 points in all).
(1) There is a set S such that its power set ℘(S ) has 12 elements. ( ) (2) An irreflexive and transitive relation on a set A is antisymmetric. ( ) (3) The largest value of n for which K n is planar is 6. ( ) (4) Every full binary tree with 61 vertices has 31 leaves. ( ) (5) Logical expressions ))()((x B x A x ∧∀and )()(x xB x xA ∀∧∀are equivalent. ( )
4. For any function f : A → B , define a new function g : ℘(A ) → ℘(B ) as follows: for every S ⊆
A , g (S ) = {f (x )|x ∈ S }. Prove that g is surjective (or onto) if and only f is surjective(or onto). (10 points )
《离散数学》课程试题【A】卷
5.Find the transitive closure t(R) of R on {a, b, c, d} and draw the graph of t(R) where R = {(a, a), (b, a), (b,
c), (c, a), (c, c), (c, d), (d, a), (d, c)}. (10 points)
6. Either give an example or prove that there is none: A graph with 7 vertices that has a Hamilton circuit but no Euler circuit. (10 points)
第4页共6页
西 南 大 学 课 程 考 核 (试题 【A 】卷)
第5页 共6页
——————————————密
————————————封
————————————线
——————————————
7. Let G be an undirected tree with 3 vertices of degree 3, 1 vertex of degree 2, the other vertices of degree 1. (15 points )
(1) How many vertices in G are there?
(2) Draw two nonisomorphic undirected trees satisfying the above requirements.
《离散数学》课程试题【A】卷
8. Show that p→ (q→ r) and p→ (q∧ r) are logically equivalent. (10 points)
第6页共6页。