0% found this document useful (0 votes)
13 views3 pages

Tut 1&2

tut aad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views3 pages

Tut 1&2

tut aad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

DATE: NAME:

ROLL NO:
DEPARTMENT OF INFORMATION TECHNOLOGY
EVEN SEMESTER FEBRUARY 2024-JUNE 2024
ITT304 ALGORITHM ANALYSIS AND DESIGN
TUTORIAL SHEET #1

TOPIC: asymptotic notations used in the performance analysis of algorithms

1. Order the following functions by growth rate: N, √ N, N1.5 , N2 , N log N, N log log N, N
log2 N, N log(N2 ), 2/N, 2N , 2 N/2 , 37, N2 log N, N3 . Indicate which functions grow at the
same rate and show why this is the case.

2. Compare the growth of time complexity for the following set of functions

i) 2n and n2

ii) √log n and log log n

iii) n√n and n log n

3. Show that for any real constants a and b, where b > 0, (n + a) b = Θ(n b )
DATE: NAME:
ROLL NO:
4. Is 2 n+1 = O(2n) ? Is 22n = O(2n)?

5. Find the O – notation for the function f(n) = n2+2n+5.

6. Is 5n2+8n+12= O(n3)?

For each of the following pairs of functions, either f(n) is O(g(n)), f(n) is Ω(g(n)), or f(n) =
Θ(g(n)). Determine which relationship holds.

– f(n) = log n2; g(n) = log n + 5

– f(n) = n; g(n) = log n2

– f(n) = log log n; g(n) = log n

– f(n) = n; g(n) = log2 n

– f(n) = n log n + n; g(n) = log n

– f(n) = 10; g(n) = log 10

– f(n) = 2n; g(n) = 10n2

– f(n) = 2n; g(n) = 3n


DATE: NAME:
ROLL NO:
DEPARTMENT OF INFORMATION TECHNOLOGY
EVEN SEMESTER FEBRUARY 2024-JUNE 2024
ITT304 ALGORITHM ANALYSIS AND DESIGN
TUTORIAL SHEET #2

TOPIC: Recurrence equations


Solve the following recurrence equations.
1. T(n)=2T(n/2)+7

2. T(n) = 2T(n/2) + n2.

3. T(n) = T(n/3) + T(2n/3) + n.

4. T(n) = T(n/3) + T(2n/3) + O(n)

5. T(𝑛) = 2𝑇 (𝑛 − 1) + 1 𝑤𝑖𝑡ℎ T(1) = 1

6. T (𝑛) = 4𝑇 (⌊n/2 ⌋) + n

7. T(𝑛) = 𝑇 (𝑛 /2) + 𝑇 (𝑛 /4) + 𝑇 (𝑛 /8) +n

You might also like