



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
The solutions to the final exam of math 213 f1, focusing on combinatorics, probability, and graph theory. It includes problems on the number of reflexive relations, bijections, and one-to-one functions, as well as probabilities of specific events in binomial distributions. Additionally, there are problems on graphs, such as finding the degree sequence, the number of vertices, and the existence of hamilton circuits.
Typology: Exams
1 / 5
This page cannot be seen from the preview
Don't miss anything!




3
23 ). Do not use notations C(n, k) or P (n, k) in your answers. All of the questions have a simple answer and require virtually no hand computations. Write legibly and circle or box your answer.
(a) How many elements does the power set of { 1 , 2 ,... , 10 } have? 210
(b) What is the number of reflexive relations on the set A = { 1 , 2 ,... , 10 }? 210 ·^9 = 2^90 (c) What is the number of bijections from the set { 1 , 2 ,... , 10 } to the set { 1 , 2 ,... , 10 }? 10! (d) What is the number of one-to-one functions from the set { 1 , 2 , 3 } to the set { 1 , 2 ,... , 10 }? 10 · 9 · 8 = 10!/7! (e) What is the constant term (i.e., the coefficient of x^0 ) in the expansion of (2x^3 − (^1) x )^100. −
25
(f) Evaluate the sum x^100 + x^99 (1 − x)^1 + x^98 (1 − x)^2 + x^97 (1 − x)^3 + · · · + x^1 (1 − x)^99 + (1 − x)^100 for 0 < x < 1. x
(^101) −(1−x) 101 x−(1−x)
(a) The probability that at least 2 sixes come up. Solution: By the complement trick and the binomial distribution, this is
(b) The probability that exactly 4 sixes come up. Solution: This is a standard binomial probability (with n = 10, k = 4, and p = 1/6): ( 10 4
(c) The probability that the 4th six occurs at the last (i.e., 10-th) roll: Solution: The given event is equivalent to getting (i) a six in trial 10 (which as prob. 1/6) and (ii) exactly 3 sixes in trials 1–9 (which has probability
3
Multiplying these two probabilities gives the answer: ( 9 3
(d) The probability that a six comes up in rolls 1, 4, and 8, but in none of the other rolls. Solution: This corresponds to getting the specific success/failure sequence SFFSFFFSFF, which has probability (1/6)^3 (5/6)^7. (e) The probability that exactly two distinct numbers show up in the ten rolls. Solution: This is similar to a wordcounting example worked out in class. First pick the two numbers (
2
ways), then multiply by the number of 10-letter “words”
consisting of exactly these two numbers (2^10 − 2):
(f) The probability that exactly three 2’s, exactly three 4’s and exactly four 6’s show up in the ten rolls. Solution: The numerator in this probability is the number of 10-letter “words” consisting of three 2’s, three 4’s, and four 6’s. There are 10!/(3!3!4!) of these, and
dividing by 6^10 gives the probability
(a) Does there exist a graph with 9 vertices, with degree sequence 1, 1 , 2 , 2 , 3 , 3 , 4 , 4 , 5? Justify your answer! Solution: NO By the Handshake Theorem, the number of odd-degree vertices must be even. The given graph has an odd number of vertices with an odd degree. (b) If a planar graph has 12 vertices, all of the same degree d, and divides the plane into 20 regions, what is the degree d of the vertices? Justify your answer. Solution: By Euler’s formula, the graph has e = r + v − 2 = 20 + 12 − 2 = 30 edges. By the Handshake Theorem, 2e = vd = 12d, so d = 2e/12 = 2 · 30 /12 = 5. (c) Given a positive integer n, consider the graph Qn whose vertices are bit strings of length n, and such that two bitstrings are connected by an edge if and only if they differ in exactly one bit. Answer the following questions and give a brief justification/explanation (one sentence is enough). A. How many vertices does this graph have? Solution: 2 n^ (number of binary strings of length n) B. How many edges does this graph have? Solution: n · 2 n−^1. A vertex is connected to exactly n other vertices, namely those in which exactly one of the n bits of this of the bitstring representing this vertex is flipped. Hence the degree of the vertices is n. Since there are 2n^ vertices, by the Handshake Theorem, the number of edges is e = (1/2)2nn = n 2 n−^1. C. For which values of n does this graph have an Euler circuit? Solution: An Euler circuit exists if and only if all degrees are even. Since in the graph Qn all degrees are n, an Euler circuit exists if and only if n is even (d) Complete the following definition by filling in the blanks with the appropriate graph-theoretic term (consisting of exactly two words).
A Gray code is a ... ... in the graph Qn. Solution: A Gray code is a Hamilton circuit in Qn
For which values of n does there exist a Gray code? (Just state the answer. No justification required for this part.) Solution: For all n. (e) The K¨onigsberg bridge problem (see picture) can be modeled by a certain graph. Draw this graph (in the usual way, with dots as vertices and lines/curves as edges), and find its adjacency matrix. Solution: The regions A,B,C,D in the graph correspond to the vertices, and the bridges to the edges. The adjacency matrix, with rows and columns labeled A,B,C,D,
is
0 0 2 1 2 2 0 1 1 1 1 0
Solution: Example: The floor function f (x) = bxc. (c) An infinite set of real numbers in the interval [0, 1] that is countable. Solution: Example: The rational numbers in this interval..
(a) A partition of a set A is a collection of nonempty subsets Ai of A satisfying certain properties. State these properties. Solution: The properties defining a partition of S are: (i) Pairwise disjoint: Ai ∩ Aj = ∅ for all i 6 = j. (ii) Union is A: A 1 ∪ A 2 ∪ A 3 ∪ · · · = A. (b) The equivalence class of 213 in the congruence relation modulo 7 is a certain set. Write out this set explicitly (by listing its elements), using proper set-theoretic notation. You can use ellipses (... ), provided the pattern is completely clear. Solution: { 3 , 10 , 17 , 24 ,... , − 4 , − 11 , − 18 ,... } (c) Complete the following definition: A function f (x) is said to be of order O(g(x)) with witnesses C and k if ...
Solution: ... |f (x)| ≤ C|g(x)| for all x ≥ k
(a) What is the probability that, in a class of 40, there are at least two students with the same score sheets? Solution: A score sheet can be represented by a tuple (s 1 , s 2 , s 3 , s 4 , s 5 ), with si ∈ { 0 , 1 , 2 , 3 }. There are 4^5 = 2^10 = 1024 such tuples, so there are 1024 possible score sheets. The given problem is a birthday type problem with the 1024 possible score sheets corresponding to the 365 possible birthdays. The probability that all score sheets are distinct is (1024 · 1023... 995)/ 102440 , and the probability that at least two score sheets are identical is 1 minus the above, i.e.,
Remark: The numerical value of the above quantity is 0. 5377... ). Thus, in a class of 40 there is already a greater than 50-50 chance that two score sheets are identical. That only 40 students should be needed for this is surprising, but consistent with the birthday paradox. (b) What is the minimal number of students in a class needed in order to guarantee that there are two students with identical score sheets? Clearly explain/justify your reasoning, citing appropriate theorems if necessary.
Solution: This is pigeonhole problem. Letting the pigeonholes be the score sheets, and the pigeons the students, the pigeonhole principle guarantees that if the number of students is greater than the number of score sheets, then there will be at least two students with the same score sheet. By the first part, there are 1024 different score sheets, so the number of students needed is one more, namely 1025. (That this is indeed the minimal such number is clear, since if there are no more students than score sheets, each can obviously have a different score sheet.
∑n i=1 fi, where^ f^1 = 1, f^2 = 1, f^3 = 2, f^4 = 3, f^5 = 5, f^6 = 8, f^7 = 13,...^ are the Fibonacci numbers. Use induction to prove that Fn = fn+2 − 1 for all positive integers n. Your write-up of the induction proof must be mathematically rigorous and complete, be presented in logical order with all necessary steps and explanations where needed (e.g., say things like “by the definition of... “, “by the induction hypothesis”, or “by algebra” at the appropriate places). A list of disconnected formulas does not constitute a proof.
Solution: Let (∗) denote the formula Fn = fn+2 − 1 we seek to prove.. Base step: For n = 1, we have F 1 = 1 = 2 − 1 = f 3 − 1, so (∗) holds in this case. Inductive step: Assume (∗) holds for n = k, where k is a positive integer. Then
Fk+1 =
k∑+
i=
fi (by def. of Fk+1)
∑^ k
i=
fi + fk+1 (algebra)
= Fk + fk+1 (by def. of Fk) = fk+2 − 1 + fk+1 (by ind. hyp.) = fk+3 − 1 (by the recurrence for fn).
This proves that (∗) holds for n = k + 1, so the induction is complete. Conclusion: By the principle of induction, (∗) holds for all positive integers n.