Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(i) Consider the following algorithm. function recursive (n>=1:integer) :integer if n= 1 then return (1) else return (recursive (n/3) + recursive (2*n/3)) endif Let T(n)

image text in transcribed

(i) Consider the following algorithm. function recursive (n>=1:integer) :integer if n= 1 then return (1) else return (recursive (n/3) + recursive (2*n/3)) endif Let T(n) (n > 1) denote the time complexity of the algorithm. Write recursive equations for T(n). T(1)= T(n)= ,n22 (ii) Solve the following equations to obtain the exact value of T(n), n1. Assume n= 3k, k integer, a>0, b>0.. T(1)= a, T(n)=3*Tn/3)+b*n, n>2. (iii) Write down the complexity of T(n)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Visual Basic 4 Ole Database And Controls Superbible

Authors: Michael Hatmaker, C. Woody Butler, Ibrahim Malluf, Bill Potter

1st Edition

1571690077, 978-1571690074

More Books

Students also viewed these Databases questions