Download Practice Exam 2 on Discrete Mathematics for Computer Science | CS 3653 and more Exams Computer Science in PDF only on Docsity! CS 3653: Discrete Mathematics Fall 2008 Test 2 Student Name: โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ 1. The examination contains 4 problems. You have 75 minutes for 60 points. 2. Show all important steps in your work. Your answers will be graded on its correctness and clarity. โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ 1. [12 points] (a) [6 points] Let โ and Z denote the set of all reals and the set of all integers, respectively. Consider the function f : โ โ Z defined by f(x) = โ2x โ 1โ. i. [3 points] Is f injective (one-to-one)? Prove your answer. ii. [3 points] Is f surjective (onto)? Prove your answer. 1 (b) [6 points] Let f : X โ Y be a function. Let A1 and A2 be subsets of X . Recall that f(A) = {f(a) | a โ A} for a subset A of X . i. [3 points] Prove that f(A1 โฉ A2) โ f(A1) โฉ f(A2). ii. [3 points] Prove that f(A1 โฉ A2) = f(A1) โฉ f(A2) if the function f is injective (one-to-one). 2 (c) [8 points] The harmonic numbers H(k), k = 1, 2, 3, . . ., are defined by H(k) = 1 + 1 2 + 1 3 + ยท ยท ยท + 1 k . For instance, H(4) = 1 + 1 2 + 1 3 + 1 4 = 25 12 . Apply the principle of mathematical induction or its variants to prove that for all natural numbers n, H(2n) โฅ 1 + n 2 . 5 3. [14 points] For the computational questions on combinatorics: provide brief explanations with your answers, but simplifications of your answers are not required. Note that โeither . . . or . . .โ is an inclusive-or. Determine the number of strings that can be formed by ordering the ten letters: A, B, C, D, E, F, G, H, I, and J, subject to each of the following conditions. (a) [2 points] Contains the substring ACE. (b) [3 points] Contains the letters A, C, and E together in any order. (c) [3 points] Contains either the substring ACE or the substring CEB. (d) [3 points] B appears before D (that is, B is somewhere to the left of D). (e) [3 points] Either B appears before D or D appears before H. 6 4. [14 points] Apply the pigeonhole principle to solve each of the following problems. (a) [3] There are 35,000 students at the university. Each of them takes four (distinct) courses. The university offers 999 different courses. When a student learned that the largest classroom holds only 135 students, the students realized that there is a problem. What is the problem? (b) [5] Prove that if five points are selected in the interior of a square with a side-length of 2, then at least two of these points are at a distance of at most โ 2. (c) [6] The circumference of a โroulette wheelโ is divided into 36 sectors to which the numbers 1, 2, . . . , 36 are assigned in some arbitrary manner. Show that there are three consecutive sectors such that the sum of their assigned numbers is at least 56. 7