Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Q 3 : Prove or disprove 5 n 2 + 4 0 n + 1 0 0 = 0 ( n 2 ) . n

Q3: Prove or disprove
5n2+40n+100=0(n2).
n31000=0(n2).
nk=a(2n)
i=1nlogi=(nlogn)
7n=(9n)
Q4: In each of the following situations, indicate whether f=O(g), or f=(g), or both f=Og.
f(n)=n-100 and g(n)=n-200.
f(n)=n12 and g(n)=n23.
f(n)=100n+logn and g(n)=n+(logn)2.
f(n)=10logn and g(n)=log(n2).
f(n)=n2logn and g(n)=n(logn)2.
f(n)=n12 and g(n)=4logn
f(n)=n2n and g(n)=3n.
f(n)=2n and g(n)=2n+1.
Q5: Find the complexity (Exact and approximate) for the basic operations of the following
algorithms:
sum=e; ;
for (k=1;kn;k**=2)
for (j=1;jn;++j)
suint+;
sum2=;
for (k=1;kn;k**=2)
for (n)j=0;ji;j++Fun3(n2)nm(n)(n-1,n+1,0)i=0;i3(n-1,n,0+1)i=1;in;i**=2(j=1;j
sum 2+t;
int Fun2(intn)
{
if(n)
return 1;
for (inti=0;i)
for (intj=0;ji;j++)
constopera tion;
}
return 1* Fun3(n2);
void Fun3(intn, int m, int 0)
f
if(n)
f
cout(n-1,n+1,0);
}
Fun 3(n-1,n,0+1);
For (inti=1;in;i**=2)
dosonet hing;
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Mining Concepts And Techniques

Authors: Jiawei Han, Micheline Kamber, Jian Pei

3rd Edition

0123814790, 9780123814791

More Books

Students also viewed these Databases questions