Question

2 (25 pts). Let an algorithm has complexity S(n)=S(n-1)+f(n), where for k=1,2,3,... f(k)=k+k/3. Answer these two questions: (

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Here given that - sini= sint) + find, 1 where for K=1, 2, 3, ... flk) = x2 + K/3. a). if SC2) = 1. for equation (1) sing-sentPage : Date: From equation (1), we can write, $(1) - S(0) - FL) $(2) - S(1) ? H2) $(3) - S02) - H3) 384) -503) 2 714) sen2 -(2). Here we found, sm) = {[ n(941) +-15]. tij for nal SCP) = { [2(141)2-15) - . Also a s10)+ f(1)2-54.1752 1543+1 --44 FlawsDate: / / = s(m) + f(m + 1) = m (m + 1)2 - 5 + (n + 1)2 + (m+1). = s[mt) = (m++) momt! +3(m+1) +37-5 3 l (+ 1) = ( 1 ) ( x +

Add a comment
Know the answer?
Add Answer to:
2 (25 pts). Let an algorithm has complexity S(n)=S(n-1)+f(n), where for k=1,2,3,... f(k)=k+k/3. Answer these two...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Let n > 1, and let S = {1, 2, 3}" (the cartesian product of {1,2,3}...

    Let n > 1, and let S = {1, 2, 3}" (the cartesian product of {1,2,3} n times). (a) What is Sl? Give a brief explanation. (b) For 0 <k <n, let T be the set of all elements of S with exactly k occurrences of 3's. Determine |Tx I, and prove it using a bijection. In your solution, you need to define a set Ax that involves subsets and/or cartesian products with known cardinalities. Then clearly define your bijection...

  • Let f(n) = 5n^2. Prove that f(n) = O(n^3). Let f(n) = 7n^2. Prove that f(n)...

    Let f(n) = 5n^2. Prove that f(n) = O(n^3). Let f(n) = 7n^2. Prove that f(n) = Ω(n). Let f(n) = 3n. Prove that f(n) =ꙍ (√n). Let f(n) = 3n+2. Prove that f(n) = Θ (n). Let k > 0 and c > 0 be any positive constants. Prove that (n + k)c = O(nc). Prove that lg(n!) = O(n lg n). Let g(n) = log10(n). Prove that g(n) = Θ(lg n). (hint: ???? ? = ???? ?)???? ?...

  • d. (4 pts) Fill in the asymptotic complexity (not the exact solution) of the work represented...

    d. (4 pts) Fill in the asymptotic complexity (not the exact solution) of the work represented by the following summations for an input of size n. Write complexities in simplest form. ) (1) Ź 2' = 01 — (3) Z(64) = 01_ (2) (Si +5) = 01 - (4) I"3n =01_ logn ) ) e. (5 points) Consider the recurrence T(n) = 4T(n/2) +n , T(2) = 8. and a proposed closed-form solution T(n) = n² + 2n Suppose we...

  • 3. (25 pts.) Let X1, X2, X3 be independent random variables such that Xi~ Poisson (A), i 1,2,3. Let N = X1 + X2+X3. (a)...

    3. (25 pts.) Let X1, X2, X3 be independent random variables such that Xi~ Poisson (A), i 1,2,3. Let N = X1 + X2+X3. (a) What is the distribution of N? (b) Find the conditional distribution of (X1, X2, X3) | N. (c) Now let N, X1, X2, X3, be random variables such that N~ Poisson(A), (X1, X2, X3) | N Trinomial(N; pi,p2.ps) where pi+p2+p3 = 1. Find the unconditional distribution of (X1, X2, X3). 3. (25 pts.) Let X1,...

  • (1) Let a (.. ,a-2, a-1,ao, a1, a2,...) be a sequence of real numbers so that f(n) an. (We may eq...

    (1) Let a (.. ,a-2, a-1,ao, a1, a2,...) be a sequence of real numbers so that f(n) an. (We may equivalently write a = (abez) Consider the homogeneous linear recurrence p(A)/(n) = (A2-A-1)/(n) = 0. (a) Show ak-2-ak-ak-1 for all k z. (b) When we let ao 0 and a 1 we arrive at our usual Fibonacci numbers, f However, given the result from (a) we many consider f-k where k0. Using the Principle of Strong Mathematical Induction slow j-,-(-1...

  • 1. Use mathematical induction to prove ZM-1), in Ik + 6 for integers n and k...

    1. Use mathematical induction to prove ZM-1), in Ik + 6 for integers n and k where 1 <k<n - 1. = 2. Show that I" - P(m + k,m) = P(m+n,m+1) (m + 1) F. (You may use any of the formulas (1) through (14”).)

  • Problem 1 148pts] (1) I 10pts! Let P(n) be the statement that l + 2 +...

    Problem 1 148pts] (1) I 10pts! Let P(n) be the statement that l + 2 + + n n(n + 1) / 2 , for every positive integer n. Answer the following (as part of a proof by (weak) mathematical induction): 1. [2pts] Define the statement P(1) 2. [2pts] Show that P(1 is True, completing the basis step. 3. [4pts] Show that if P(k) is True then P(k+1 is also True for k1, completing the induction step. [2pts] Explain why...

  • O: Naive algorithm coloring graphs: dild Engineering use the foll?2, is its complexity , vn) be...

    O: Naive algorithm coloring graphs: dild Engineering use the foll?2, is its complexity , vn) be colored with k colors? We pseudo-code. What (2 Pts) naïve algorithm in pseu Naive Algorithm: 1. Try all possible ways of assigning k colors to the n verticesTry to color V1, V2, Vn With the colors 1,2,,k. 2. If a valid coloring is found then answer is yes. Otherwise, answer is no. Complexity: O(2)

  • Prove using mathematical induction that for every positive integer n, = 1/i(i+1) = n/n+1. 2) Suppose...

    Prove using mathematical induction that for every positive integer n, = 1/i(i+1) = n/n+1. 2) Suppose r is a real number other than 1. Prove using mathematical induction that for every nonnegative integer n, = 1-r^n+1/1-r. 3) Prove using mathematical induction that for every nonnegative integer n, 1 + i+i! = (n+1)!. 4) Prove using mathematical induction that for every integer n>4, n!>2^n. 5) Prove using mathematical induction that for every positive integer n, 7 + 5 + 3 +.......

  • prove that A is non singular 5.(25 pts) For each positive integer n, let f()(+2)(1)(0,1. Let...

    prove that A is non singular 5.(25 pts) For each positive integer n, let f()(+2)(1)(0,1. Let f()-0, (1) Prove that (fn) converges to fpointwisely on (0, 1) (2) Does (n) converges to f uniformly on (0, 1]?

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT