Chapter 8: Advanced Counting Techniques
Question Mode Multiple Choice Question Which expression uses the principle of inclusion-exclusion to specify the number of primes not exceeding 25?
3+(25 − 1) − (⌊25/2⌋ + ⌊25/3⌋) + ⌊25/5⌋) + (⌊25/(2.3)⌋ + ⌊25/(2.5)⌋ + ⌊25/(3.5)⌋) − ⌊25/(2.3.5)⌋
Question Mode Multiple Select Question Select all that apply Which of these algorithms has O(n log n) worst-case time complexity and not linear worst-case time complexity?
Finding closest pair among n points in the plane Merge sort
Multiple Choice Question Which recurrence relation describes the number of moves needed to solve the Tower of Hanoi puzzle with n disks?
Hn = 2Hn-1 + 1
Question Mode Multiple Choice Question Which recurrence relation describes the number of moves needed to solve the Tower of Hanoi puzzle with ndisks?
Hn = 2Hn-1 + 1
Multiple Select Question Select all that apply Which of these recurrence relations are linear homogeneous recurrence relations with constant coefficients?
an = 2an-1 an = an-5 + an-10 - an-15 - an-20
Multiple Choice Question Find the solution of an = 3an-1 + 2n, a0 = 2.
an = 4⋅3n - 2n+1
Question Mode Multiple Choice Question Find the solution of an = 3an-1 + 2n, a0 = 2.
an = 4⋅3n - 2n+1
Question Mode Fill in the Blank Question Suppose A, B, C, and D are sets so that |A| = 150, |B| = 200, |C| = 175, |D| = 100, |A ∩ B| = 60, |A ∩ C| = 75, |A ∩ D| = 40, |B ∩ C| = 50, |B ∩ D| = 30, |C ∩ D| = 40, |A ∩ B ∩ C| = 20, |A ∩ B ∩ D| = 15, |A ∩ C ∩ D| = 10, |B ∩ C ∩ D| = 5, and |A ∩ B ∩ C ∩ D| = 3. Then |C ∪ D| = (BLANK 1) , |B ∪ C ∪ D| = (BLANK 2), |A ∪ B ∪ C| = (BLANK 3), and A ∪ B ∪ C ∪ D| = (BLANK 4
1. 235 2. 360 3. 360 4. 377
Question Mode Fill in the Blank Question Suppose 787 students graduated from a university. Each student had one or more majors. If 76 students majored in computer science, 43 majored in mathematics, and 11 majored in both computer science and mathematics, then BLANK 1 students did not major in either computer science or mathematics. If 94 students majored in chemistry, 27 majored in physics, and 676 majored in neither chemistry nor physics, then BLANK 2 students majored in both chemistry and physics.
1. 679 2. 10
Question Mode Fill in the Blank Question The number of nonnegative integer solutions of x1 + x2 + x3 = 8, where x1 ≤ 3, x2 ≤ 5, and x3 ≤ 4, is
14
Question Mode Multiple Select Question Select all that apply Choose the permutations of 1, 2, 3, 4, 5, 6 that are derangements.
2, 1, 4, 3, 6, 5 6, 5, 4, 3, 2, 1 2, 3, 4, 5, 6, 1
Use generating functions to find the number of ways 13 identical cookies can be distributed among three children so that each child receives at least three and at most five cookies. This number is .
6
Question Mode Multiple Select Question Select all that apply Select those statements that describe the divide-and-conquer algorithm design paradigm.
A divide-and-conquer algorithm breaks a problem into one or more smaller sub-problems. A divide-and-conquer algorithm combines solutions to sub-problems to solve the original problem. A divide-and-conquer algorithm's computational complexity can be analyzed with the help of a recurrence relation.
Question Mode Multiple Select Question Select all that apply Select those statements that describe the divide-and-conquer algorithm design paradigm.
A divide-and-conquer algorithm combines solutions to sub-problems to solve the original problem. A divide-and-conquer algorithm breaks a problem into one or more smaller sub-problems. A divide-and-conquer algorithm's computational complexity can be analyzed with the help of a recurrence relation.
Question Mode Multiple Select Question Select all that apply Select those statements that describe the divide-and-conquer algorithm design paradigm.
A divide-and-conquer algorithm's computational complexity can be analyzed with the help of a recurrence relation. A divide-and-conquer algorithm combines solutions to sub-problems to solve the original problem. A divide-and-conquer algorithm breaks a problem into one or more smaller sub-problems.
Question Mode Multiple Choice Question Choose the general form of the solution of the linear homogeneous recurrence relation an = 4an-1 + 11an-2 - 30an-3, n ≥ 4.
an = α12^n + α2(-3)^n + α35^n
Question Mode Multiple Select Question Select all that apply For which of these recurrence relations for the increasing function f(n) can we conclude that the best big-Oestimate for f(n) is O(n log n)?
f(n) = 5f(n5) + 6n f(n) = 2f(n2) + 4n