Warning: foreach() argument must be of type array|object, bool given in /var/www/html/web/app/themes/studypress-core-theme/template-parts/header/mobile-offcanvas.php on line 20

Give a big- \(O\) estimate for the function\(f\)in Exercise\(36\)if\(f\)is an increasing function.

Short Answer

Expert verified

It is concluded that\(f(n) = 3{n^{3/2}} - 2 \cdot {n^2}\)is\(O\left( {{n^2}} \right)\).

Step by step solution

Achieve better grades quicker with Premium

  • Unlimited AI interaction
  • Study offline
  • Say goodbye to ads
  • Export flashcards

Over 22 million students worldwide already upgrade their learning with Vaia!

01

Given information

\(\begin{array}{c}f(n) = 8f(n/4) + {n^2}\\f(1) = 1\end{array}\)

02

Define the Recursive formula

A recursive formula is a formula that defines any term of a sequence in terms of its preceding terms.

03

Use the Recursive formula to find\(f(n)\)

Let \({a_k} = f\left( {{4^k}} \right)\) and use \(n = {4^k}\)

\(\begin{array}{l}{a_k} = 8{a_{k - 1}} + {4^{2k}}\\{a_k} = 8{a_{k - 1}} + {16^k}\left( {{4^0}} \right)\\{a_o} = f(1)\\{a_o} = 1\end{array}\)

Let \({a_k} = r\) and \({a_{k - 1}} = 1\)

\(r = 8\)(Root Characteristic equation)

The solution of the recurrence relation is of the form \({a_n} = {\alpha _1}r_1^n + {\alpha _2}r_2^n\) when \({r_1}\)and\({r_2}\)the distinct roots of the characteristic equation.

\(a_k^{(h)} = \alpha \cdot {8^k}\)

\(F(k) = {16^k}\)

If \(F(n) = \left( {{b_t}{n^t} + {b_{t - 1}}{n^{t - 1}} + \ldots + {b_1}n + {b_0}} \right){s^n}\) and \(s\) is not \({\bf{a}}\)root of the characteristic equation, then \(\left( {{p_t}{n^t} + {p_{t - 1}}{n^{t - 1}} + \ldots + {p_1}n + {p_0}} \right){s^n}\) is the particular solution.

\(a_k^{(p)} = {p_0} \cdot {16^k}\)

The particular solution needs to satisfy the recurrence relation:

\(\begin{array}{l}{a_n} = 8{a_{k - 1}} + {16^k}\\{p_0}.{a_n} = 8{p_0} \cdot {16^{k - 1}} + {16^k}\end{array}\)

\(\begin{array}{l}8{p_0} = 16\\{p_0} = 2\end{array}\)

Thus, the particular solution then becomes:

\(\begin{array}{l}a_k^{(p)} = {p_0} \cdot {16^k}\\a_k^{(p)} = 2 \cdot {16^k}\end{array}\)

The solution of the non-homogeneous recurrence relation is the sum of the solution of the homogeneous recurrence relation and the particular solution.

\({a_k} = \alpha \cdot {8^k} - 2 \cdot {16^k}\)

04

Check the solution that satisfies the initial condition

The solution needs to satisfy the initial condition \({a_0} = 1\) :

\(3 = \alpha \)

Then use \({a_k} = f\left( {{4^k}} \right),n = {4^k}\) and \(k = {\log _4}n\) :

\(\begin{array}{l}f(n) = f\left( {{4^k}} \right)\\f(n) = 3 \cdot {8^k} - 2 \cdot {16^k}\\f(n) = 3{n^{3/2}} - 2 \cdot {n^2}\end{array}\)

Finally,\(f(n) = 3{n^{3/2}} - 2 \cdot {n^2}\) is\(O\left( {{n^2}} \right)\).

One App. One Place for Learning.

All the tools & learning materials you need for study success - in one app.

Get started for free

Most popular questions from this chapter

Give a big-\(O\) estimate for the function \(f\) in Exercise \(10\) if\(f\) is an increasing function.

Solve the recurrence relation an=an-12/an-2if a0=1and a1=2. [Hint: Take logarithms of both sides to obtain a recurrence relation for the sequencelogan,n=0,1,2,โ€ฆ]

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 M(j,w)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 ifwj>w, thenM(j,w)=M(j-1,w).
b) Show that if wjโ‰คw, thenM(j,w)=max(M(j-1,w),wj+Mj-1,w-wj).
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 valuesM(j,w) as they are found.
d) Explain how you can use the values M(j,w)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 f(n)when n=2k, where fsatisfies the recurrence relation f(n)=f(n/2)+1with f(1)=1.

See all solutions

Recommended explanations on Math Textbooks

View all explanations

What do you think about this solution?

We value your feedback to improve our textbook solutions.

Study anywhere. Anytime. Across all devices.

Sign-up for free