logo

Crowdly

Browser

Додати до Chrome

Consider a problem that can be solved using a recursive algorithm such as the fo...

✅ Перевірена відповідь на це питання доступна нижче. Наші рішення, перевірені спільнотою, допомагають краще зрозуміти матеріал.

Consider a problem that can be solved using a recursive algorithm such as the following:

procedure T ( n : size of problem ) defined as:

if n < 1 then exit

do work of amount f(n)

T(n/b)

T(n/b)

…….. repeat for a total of a times……..

T(n/b)

end procedure

 Algorithms such as above can be represented as a recurrence relation:

T(n) = aT(n/b) + f(n) where a >= 1, b > 1

n is the size of the problem

a is the number of sub problems in the recursion

n/b is the size of each sub problem

f(n) is the cost of the work done outside the recursive calls.

if f(n) = Ɵ(nc) where c < logb a (using Big O notation)

then:

T(n) = Ɵ(nlogb a)

If T(n) = 16T(n/2) + 10n2

Then T(n) = Ɵ(???)

0%
0%
0%
0%
0%
Більше питань подібних до цього

Хочете миттєвий доступ до всіх перевірених відповідей на aust.mrooms.net?

Отримайте необмежений доступ до відповідей на екзаменаційні питання - встановіть розширення Crowdly зараз!

Browser

Додати до Chrome