tut1.pdf - SI 408 Data Structures Tutorial 1 1 Assume f g h N \u2192 R Show the following(a If f(n = \u0398(g(n then g(n = \u0398(f(n(b If f(n = O(g(n and g(n =
tut1.pdf - SI 408 Data Structures Tutorial 1 1 Assume f g h...
SI 408: Data StructuresTutorial 11. Assumef, g, h:N+→R. Show the following:(a) Iff(n) = Θ(g(n)), theng(n) = Θ(f(n)).(b) Iff(n) =O(g(n)) andg(n) =O(h(n)), thenf(n) =O(h(n)). Similarly forOreplacedby Ω or Θ.(c) Iff1, g1, f2, g2are functions such thatf1∈O(f2) andg1∈O(g2), then show thatf1+f2∈O(g1+g2) andf1·f2∈O(g1·g2).Show by example that the following can befalse:f1-f2∈O(g1-g2).2. Show that for any functionsf, g:N→R.Let the functionh:N→Rbe defined byh(n) = max{f(n), g(n)}. Show thath(n) = Θ(f(n)+g(n)). Also leth0(n) = min{f(n), g(n)}.Show that there are functions