You are on page 1of 1

Data Structures and Algorithms

Assignment 1 Feb-Jun 2022


Total marks: 100
Question: 1 2 3 4 5 6 7 Total
Points: 10 10 10 10 10 10 40 100
Score:

1. (10 points) If f is O(g) and g is O(h), then f is O(h).

2. (10 points) Prove or disprove: f (n) is Ω(g(n)) if there exist constants c > 0 such that
f (n) ≥ c.g(n) ≥ 0 for infinitely many n.

3. (10 points) Solve using any method (definition or limit)

• 5n log n + 3n = O(n log n).


• 2n + 3n = O(3n ).

4. (10 points) Solve using the definitions

• 5n3 = ω(n2 ).
• 4n2 + 7n ̸= ω(n2 ).

5. (10 points) If Prove that (o(g(n))) ∩ (ω(g(n))) is the empty set.


f (n)
6. (10 points) If n→∞
lim = ∞ then f (n) is Ω(g(n)) but not O(g(n)).
g(n)
7. (40 points) Let f (n) and g(n) be asymptotically positive functions. Prove or disprove
each of the following conjectures:

1. f (n) = O(g(n)) implies g(n) = O(f (n)).


2. f (n) = O(g(n)) implies log f (n) = O(log g(n)), where log g(n) ≥ 1 and f (n) = 1
for all sufficiently large n.
3. f (n) = O(g(n)) implies g(n) = Ω(f (n)).
4. f (n) = θ(f (n/2)).

You might also like