i would like help on those problems in discrete math please, Place the following
ID: 2969737 • Letter: I
Question
i would like help on those problems in discrete math please,
Place the following run-times in order from smallest order to largest: 2log(n) 2 2n nlog(2) 187n2 + 25000000n + 170000000 2n3 Do a summation analysys of the following algorithm and determine its order Theta (?) Name an algorithm in each of the following categories: O(log(n)) O(1) O(2n) O(nlog(n)) O(n2) Which of the following sorts works fastest in the YouTube movie "Sorting out Sorting?" (Beware: This movie will take 30 minutes. It is so enthralling you may want to watch it more than once!) Label each sorting algorithm below as to whether you believe it to be O(n2) or O(nlog(n)). Linear Insertion Bubble Sort Straight Selection Binary Insertion Shakersort Shellsort Heapsort Quicksort Tree selectionExplanation / Answer
2)
2 < 2log(n) < n.log(2) < 187n^2 + 25000000n + 170000000 < 2n^3 < 2^n
3)
two for lloops -> algorithm is of theta(n*n)
-> complexity = theta(n^2)
4)
O(log(n)) -> binary search
O(1) -> access array index
O(2^n) -> solving traveling salesman problem (TSP) usinh exhaustive search
O(n.log(n)) -> quick sort
O(n^2) -> bubble sort
5)
linear insertion -> O(n^2)
bubble sort -> O(n^2)
straight selection -> O(n^2)
binary insertion -> O(n^2)
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.