Question: [ 2 5 marks ] Multiple Choice Questions: f ( n ) = 3 n l o g n + 2 n 2 + 4

[25 marks]
Multiple Choice Questions:
f(n)=3nlogn+2n2+4logn2.f(n) is O(g(n)). Choose the most correct value for g(n).
a)n2
b)n
c) nlogn
d)logn2
f(n)=5n3+6n2-7n+8.f(n) is (g(n)). Choose the most correct value for g(n).
a)n3
b)8
c)1
d)5n3
f(n)=9n2+10n12-11logn+12.f(n) is (g(n)). Choose the most correct value for g(n).
a)n2
bn12
c) nlogn
d)1
Running times of some algorithms to perform a task are given below. Which one of the following algorithms will you choose when input size 'n' is very large?
a)O(n2)
b) nlogn)
c)O(2n)
d)O(n3)
Space complexity of some algorithms to perform a task are given below. Which one of the following algorithms will you choose when input size 'n' is very large?
a)O(logn)
b)O(nlogn)
c)O(2n)
d)O(n)
To calculate four way set disjointness the following code can be used def disjoint4(A, B, C, D):
for a in A :
for b in B :
for c in C :
for d in D :
if a==b=c==d :
return False
return True
What will be the running time of the algorithm?
a)O(logn4)
b)O(n4)
c)O(4n)
d)O(4+n)
Which one of the following is an example of geometric progression?
a)1,2,3,4dots
b)2,4,6,7dots
c)4,8,12,16dots
d)1,3,9,27dots
 [25 marks] Multiple Choice Questions: f(n)=3nlogn+2n2+4logn2.f(n) is O(g(n)). Choose the most

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!