JAVA: Which of the following shows a list of Big-Oh running times in order from slowest to fastest?
|
O(1), O(N), O(N2), O(logN), O(2N) |
||
|
O(1), O(N), O(N3), O(2N), O(N!) |
||
|
O(logN), O(N!), O(N2), O(N3), O(2N) |
||
|
O(N!), O(2N), O(N2), O(N), O(logN) |
Order of grows from shortest to largest running time is constant - 1 logarithmic - log(N) linear - N quadratic - N^2 cubic - N^3 exponential - e^N factorial - n!
list of Big-Oh running times in order from slowest to fastest is O(1), O(N), O(N3), O(2N), O(N!)

Option 2
JAVA: Which of the following shows a list of Big-Oh running times in order from slowest...
Arrange the following Big-O notations from the least expensive to the most expensive (or slowest to fastest), in terms of time complexity. O(N!), O(logN), O(N3 ), O(1), O(NlogN), O(N2 ), O(2n ), O(√n), O(n√n), O(N2 logN)
Once you have determined big-O bounds for each expression, order
the expressions from the slowest growing (best algorithm, takes the
least amount of time to execute) to the fastest growing.
1. n3 (log2n +5) +log2n 20 2. 532n2 10n log2n - 20n 25 3. nlog2n 20 10log2n + + 35n 4. 10n2 1000 2n 33n log2n
a) Prove that running time T(n)=n3+30n+1 is O(n3) [1 mark] b) Prove that running time T(n)=(n+30)(n+5) is O(n2) [1 mark] c) Count the number of primitive operation of algorithm unique1 on page 174 of textbook, give a big-Oh of this algorithm and prove it. [2 mark] d) Order the following function by asymptotic growth rate [2 mark] a. 4nlogn+2n b. 210 c. 3n+100logn d. n2+10n e. n3 f. nlogn
What is the order of the following growth function expressed using Big-Oh notation: T(N)=7*N3 + N/2 + 2 * log N + 38 ? O(2N) O(N3) O(N/2) O(N3 + log N)
1 question) Arrange the following in the order of their growth rates, from least to greatest: (5 pts) n3 n2 nn lg n n! n lg n 2n n 2 question)Show that 3n3 + n2 is big-Oh of n3. You can use either the definition of big-Oh (formal) or the limit approach. Show your work! (5 pts.) 3 question)Show that 6n2 + 20n is big-Oh of n3, but not big-Omega of n3. You can use either the definition of big-Omega...
4. Big-Oh and Rune time Analysis: describe the worst case running time of the following pseudocode functions in Big-Oh notation in terms of the variable n. howing your work is not required (although showing work may allow some partial t in the case your answer is wrong-don't spend a lot of time showing your work.). You MUST choose your answer from the following (not given in any particular order), each of which could be re-used (could be the answer for...
Give the time complexities (Big-O notation) of the following running times expressed as a function of the input size N. a) N12+ 25N10+ 8 b) N + 3logN + 12n√n c) 12NlogN + 15N2 logN
Order the following functions by growth rate: N, squrerootN, N1.5, N2, NlogN, N log logN, Nlog2N, Nlog(N2), 2/N,2N, 2N/2, 37, N2 logN, N3. Indicate which functions grow at the same rate.
JAVA What is the running time required for repeatedly splitting a problem into two equally sized halves, assuming no additional work needs to be done? O(1) O(log10N) O(log2N) O(log2N) O(N) O(N log N) O(N2) O(N3) O(Nk) O(2N) O(N!)
Rank the following functions from slowest growing to fastest growing (i.e. fastest to slowest) 1 (constant) log2n (logarithmic) n (linear) n * log2 n (“n log n”) n2 (quadratic)