Data-structures 1

Prove: O(n2)O(n3)Proof:Let f(n)O(n2)f(n)cn2Let n0=max(n0,1)f(n)cn2cn3f(n)O(n3)O(n2)O(n3)
Prove: n2log(n)+10nΩ(5n2)Let n32log(n)log(32)=5n2log(n)+10nn2log(n)5n2Alternativen2log(n)1n2log(n)+10n155n2=n2
Prove: f(n)Ω(g(n))Ω(f(n))Ω(g(n))Proof:Let f(n)Ω(g(n))nnf:f(n)cfg(n)Let h(n)Ω(f(n))nnh:h(n)chf(n)nmax(nh,nf):h(n)chf(n)chcfg(n)h(n)Ω(g(n))Ω(f(n))Ω(g(n))
Prove: 2n+15o(n2)Proof:Let c>0Let n0=max(1,17c)nn0:2n+1517nc17cncn0ncn22n+15o(n2)
Prove: 5nlog(n)ω(n)Proof:Let c>0Let n0=2c/5nn0:5nlog(n)5nlog(2c/5)=cn5nlog(n)ω(n)
limnf(n)g(n)=LL=0f(n)o(g(n))L0Rf(n)Θ(g(n))L=f(n)ω(g(n))Proof for L=0:ε>0:n0N0:nn0:f(n)g(n)<εg(n)>0f(n)<εg(n)f(n)εg(n)
Prove: log(n!)Θ(nlog(n))Proof:log(n!)log(nn)=nlog(n)n2log(n2)=12n(log(n)log(2))=12nlog(n)12nn4log(n)2log(n)21log(n2n/2)=12nlog(n)12n12nlog(n)14nlog(n)=12nlog(n)12nlog(n)log((n2)n/2)log(n!)nlog(n)log(n!)Θ(nlog(n))