Professional Documents
Culture Documents
Assignment On Asymptotic Notation
Assignment On Asymptotic Notation
Use the informal definitons of O, Ꝋ and Ω to determine whether the following assertons
are true or false.
a. n(n+1)/2 ∈ O(n3) b. n(n+1)/2 ∈ O(n2) c. n(n+1)/2 ∈ Ꝋ (n3) d. n(n+1)/2 ∈ Ω (n)
2. List the following functons according to their order of growth from the lowest to the highest:
(n−2)! , 5lg(n+100)10 , 22n , 0.001n4+3n3+1 , ln2 n , 3 √n , 3n.
3. An image processing applicaton begins with two n×n matrices A and B. The first phase of
preprocessing the inputs takes O(n 2) steps for each of A and B. The second step involves a
convoluton of A and B to yield a new matrix C in tme O(n 3). This is followed by an edge
detecton phase that takes tmes O(n 2) for matrix C. What is the most accurate and concise
descripton of the complexity of the overall algorithm?
4. How many tmes is the comparison i >= n performed in the following program?
b. 40 b. 41 c. 42 d. 43