EL9343 Homework 1

$30.00

Category: You will Instantly receive a download link for .zip solution file upon Payment || To Order Original Work Click Custom Order?

Description

5/5 - (1 vote)

All problem/exercise numbers are for the third edition of CLRS text book
1. Prove the Transpose Symmetry property, i.e. f(n) = O(g(n)) if and only if g(n) = Ξ©(f(n))
2. Problem 3-1 in CLRS Text book.
3. Problem 3-2 in CLRS Text book.
4. You have 5 algorithms, A1 took 𝑂(𝑛) steps, A2 took Θ(𝑛 log 𝑛 ) steps, and A3 took Ξ©(𝑛) steps, A4 took
𝑂(𝑛 steps, A5 took steps. You had been given the exact running time of each algorithm, but 3
) π‘œ(𝑛
2
)
unfortunately you lost the record. In your messy desk you found the following formulas:
(a) 3π‘›π‘™π‘œπ‘”
2
𝑛 + π‘™π‘œπ‘”
2
π‘™π‘œπ‘”
2
𝑛
(b) 3(2
2π‘™π‘œπ‘”
2
𝑛
) + 5𝑛 + 1234567
(c)
2
π‘™π‘œπ‘”
4
𝑛
3 + 𝑛 + 9
(d) (π‘™π‘œπ‘”
2
𝑛)
2
+ 5
(e) 3𝑛!
(f) 2
3π‘™π‘œπ‘”
2
𝑛
(g) 2
2π‘™π‘œπ‘”
2
𝑛
For each algorithm write down all the possible formulas that could be associated with it.
5. For the following algorithm: Show what is printed by the following algorithm when called with
MAXIMUM(A, 1, 5) where A = [10, 8, 6, 4, 2]? Where the function PRINT simple prints its arguments in
some appropriate manner.