[6 marks] Arrange the functions (1.5)n , n100, log n, n!, and n99 + n98 in a list so that each is a big-O of the next.
Ans: log n, (n99+n98), n100, (1.5)n , n!
There is a typing
mistake in your question, I oberved the function from given answer,
So please correct in commnet if my obervation is wrong. I will edit
my answer or try to help you in comment.
Question: Arrange the
functions (,
and
in a list so that each is
a big-O of the next.
Solution:
is an exponential function with base 1.5
is a polynomial function of degree 100
log n is a logarithmic function
is a factorial funtion
is polynomial function.
The increasing order of Big
O notation is as given below:
There is no constant function in our question. Now comes on
logarthmic funnction
log n
Next is polynomial function
( Degree 100 ) and
(Degree 99)
log n <
<
Exponential function
log n <
<
<
And the final one is Factorial function
So, big O notaion in increasing order is given by:
log n <
<
<
<
[6 marks] Arrange the functions (1.5)n , n100, log n, n!, and n99 + n98 in...
2. [6 marks] Are the following functions O(n)? Justify your answer. a) n log n b) f(n) = Vn (log n)
Arrange the following functions in a list so that each function is big-O of the next function. The function in the end of the list is given. f1(n)=n0.5, f2(n)=1000log(n), f3(n)=nlog(n), f4(n)=2n!, f5(n)=2n, f6(n)=3n, and f7(n)=n2. Please show work
***Please answer all the following (Computer science) Discrete math question completely.*** Q2. Growth of functions. In each of the following cases, either construct a function /(/n) that satisfies the specified constraints or state that no such function exists. (2pt each) b, (n)-Ω(n2) and/(n)-O (n + n') In the following two questions, arrange the functions in a list so that each function is a big-O of the next function. (2pt each) d. nlog n, V', log n, (log2n+log n+n), 12 n,...
76. Arrange the following functions in ascending or- der of growth rate: 4000 log n, 2n2 + 13n - 8, 1,036, 3n log n, 2" - n2, 2n! - n, n2 – 4n.
Solve ques no. 2 a, b, c, d . Algorithm 1 Sort a list al,..., an for i=1 to n-1 do for j=1 to n-i do if aj > aj+1 then interchange a; and a;+1 end if end for end for (b) Algorithm 1 describes a sorting algorithm called bubble sort for a list al,...,an of at least two numbers. Prove that the algorithm is complete, correct and terminates. (2) Complexity of Algorithms (Learning Target C2) (a) What is the...
Arrange the following functions in ascending order of asymptotic growth rate; that is if function g(n) immediately follows function f(n) in your list, then it should be the case that f(n) is O(g(n)): 2 Squareroot log n, 2^n, n^4/3, n(log n)^3, n log n, 2 2^n, 2^n^2. Justify your answer.
Looking at the big O of functions, If f1(N)=O(NlogN) and f2(N)=O(log N), then what is "big O" of f1 +f2?
For each pair of functions f(n) and g(n), indicate whether f(n) = O(g(n)), f(n) = Ω(g(n)), and/or f(n) = Θ(g(n)), and provide a brief explanation of your reasoning. (Your explanation can be the same for all three; for example, “the two functions differ by only a multiplicative constant” could justify why f(n) = n, g(n) = 2n are related by big-O, big-Omega, and big-Theta.) i. f(n) = n^2 log n, g(n) = 100n^2 ii. f(n) = 100, g(n) = log(log(log...
They NAME sc 162- lec. 18 (Big quiz 1. Arrange the following functions in order of increasing rate of growth. Also, identify any functions with the SAME rate of growth by putting then below the others. a) sn, 44log n, 10n log n, 500, 2n, 28, 3n b) n', n +2 nlog2 n, n! ne log, n, n n n'. 4", n, na, 2 2. Use the Big-o notation to estimate the time complexity for the following segments/methods. (Assume all...
[ 6 marks] Give examples of two pairs of functions f1-f and fz-f such that each pair is of the same order. That is, fi is a big-O (f2), fz is big-O(ft), and vice versa.