Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

[ 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
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

Students also viewed these Databases questions

Question

b. What groups were most represented? Why do you think this is so?

Answered: 1 week ago