Chapter 8: Q37E (page 536)
Give a big- \(O\) estimate for the function\(f\)in Exercise\(36\)if\(f\)is an increasing function.
Short Answer
It is concluded that\(f(n) = 3{n^{3/2}} - 2 \cdot {n^2}\)is\(O\left( {{n^2}} \right)\).
Chapter 8: Q37E (page 536)
Give a big- \(O\) estimate for the function\(f\)in Exercise\(36\)if\(f\)is an increasing function.
It is concluded that\(f(n) = 3{n^{3/2}} - 2 \cdot {n^2}\)is\(O\left( {{n^2}} \right)\).
All the tools & learning materials you need for study success - in one app.
Get started for freeGive a big-\(O\) estimate for the function \(f\) in Exercise \(10\) if\(f\) is an increasing function.
Solve the recurrence relation if and . [Hint: Take logarithms of both sides to obtain a recurrence relation for the sequence
In this exercise we construct a dynamic programming algorithm for solving the problem of finding a subset S of items chosen from a set of n items where item i has a weight , which is a positive integer, so that the total weight of the items in S is a maximum but does no exceed a fixed weight limit W. Let denote the maximum total weight of the items in a subset of the first j items such that this total weight does not exceed w. This problem is known as the knapsack problem.
a) Show that if, then
b) Show that if , then.
c) Use (a) and (b) to construct a dynamic programming algorithm for determining the maximum total weight of items so that this total weight does not exceed W. In your algorithm store the values as they are found.
d) Explain how you can use the values computed by the algorithm in part (c) to find a subset of items with maximum total weight not exceeding W.
Give a combinatorial interpretation of the coefficient of \({x^6}\) in the expansion\({\left( {1 + x + {x^2} + {x^3} + \cdots } \right)^n}\). Use this interpretation to find this number.
Find when , where satisfies the recurrence relation with .
What do you think about this solution?
We value your feedback to improve our textbook solutions.