Professional Documents
Culture Documents
SUBJECT: Algorithms
2. Let f(n) = n and g(n) = n(1+sin n), where n is a positive integer. Which of the
following statements is/are correct?
I. f(n) = O(g(n))
II. f(n) = Ω(g(n))
(A) Only I
(B) Only II
(C) Both I and II
(D) Neither I nor II
SUBJECT: Algorithms
3.
SUBJECT: Algorithms
4. Let w(n) and A(n) denote respectively, the worst case and average case running
time of an algorithm executed on an input of size n. which of the following is
ALWAYS TRUE?
SUBJECT: Algorithms
5. Consider the following functions:
f(n) = 2^n
g(n) = n!
h(n) = n^logn
Which of the following statements about the asymptotic behaviour of f(n), g(n), and
h(n) is true?
SUBJECT: Algorithms
6. Arrange the following functions in increasing asymptotic order:
A. n1/3
B. en
C. n7/4
D. n log9n
E. 1.0000001n
(A) A, D, C, E, B
(B) D, A, C, E, B
(C) A, C, D, E, B
(D) A, C, D, B, E
SUBJECT: Algorithms
7. Let f(n), g(n) and h(n) be functions defined for positive inter such that
f(n) = O(g(n)), g(n) ≠ O(f(n)), g(n) = O(h(n)), and h(n) = O(g(n)).
SUBJECT: Algorithms
8. Consider the following three claims
1. (n + k)m = Θ(nm), where k and m are constants
2. 2n + 1 = O(2n)
3. 22n + 1 = O(2n)
(A) 1 and 2
(B) 1 and 3
(C) 2 and 3
(D) 1, 2, and 3
SUBJECT: Algorithms
9. Let f(n) = n2Logn and g(n) = n (logn)10 be two positive functions of n. Which of
the following statements is correct?
(A) f(n) = O(g(n)) and g(n) != O(f(n))
(B) f(n) != O(g(n)) and g(n) = O(f(n))
(C) f(n) = O(g(n)) but g(n) = O(f(n))
(D) f(n) != O(g(n)) but g(n) != O(f(n))
SUBJECT: Algorithms
Recurrence Relation:
SUBJECT: Algorithms
SUBJECT: Algorithms
SUBJECT: Algorithms
SUBJECT: Algorithms
Solving Recurrence Relation:
➢ Substitution Method
➢ Master’s Theorem
SUBJECT: Algorithms
SUBJECT: Algorithms
SUBJECT: Algorithms
SUBJECT: Algorithms
SUBJECT: Algorithms
SUBJECT: Algorithms
SUBJECT: Algorithms
SUBJECT: Algorithms
SUBJECT: Algorithms
Glimpse of Next Session:
➢ Solving Recurrence Relation
Using Substitution Method
SUBJECT: Algorithms
Any Queries????
SUBJECT: Algorithms