Question ------- 1. If you have reviewed the textbook already, please pick up one sorting algorithm

Aug 15th, 2016
Studypool Tutor
Computer Tutor Business and Technical Institute
Price: $15 USD

Tutor description

1. If you have reviewed the textbook already, please pick up one sorting algorithm with time complexity of O(n) and discuss its performance. Since the algorithm runs faster than all comparison sorting algorithms, why comparison sorting algorithms are still used in some applications? 2. Please briefly discuss the Quicksort algorithm shown in the textbook. What is the reason that it usually runs faster than other sorting algorithms with a time complexity of O(nlgn) (e.g., heap sort) in real world applications? 3. Please briefly describe properties of the B-tree structure shown in the textbook. Why is it designed this way? What are the implications on operations such as insertion and deletion due to these properties?In addition, can you give some examples on real-world applications in which B-trees (or variants) might be used? 4. In your own words, briefly discuss the TREE-DELETE algorithm used by binary search trees. Do you think there are alternative ways to implemen

Word Count: 9205
Showing Page: 1/24
Answer ---1Fix some machine model.This is done in Don Knuth's book series The Art of Computer Programming for anartificial typical computer invented by the author. In volume 3 you find exact average caseresults for many sorting algorithms, e.g. Quicksort: 11.667(n+1)ln(n)1.74n18.74 Mergesort: 12.5nln(n) Heapsort: 16nln(n)+0.01n Insertionsort: 2.25n2+7.75n3ln(n)[source]These results indicate that Quicksort is fastest. But, it is only proved on Knuth's artificialmachine, it does not necessarily imply anything for say your x86 PC. Note also that thealgorithms relate differently for small inputs:Answer ----2Runtime AnalysisOne of the most important aspects of an algorithm is how fast it is. It is often easy to come upwith an algorithm to solve a problem, but if the algorithm is too slow, its back to the drawingboard. Since the exact speed of an algorithm depends on where the algorithm is run, as wellas the exact details of its implementation, computer scientists typically talk about the runtimerelative to the size of the input. For example, if the input consists of N integers, an algorithmmight have a runtime proportional to N2, represented as O(N2). This means that if you wereto run an implementation of the algorithm on your computer with an input of size N, it wouldtake C*N2 seconds, where C is some constant that doesnt change with the size of the input.However, the execution time of many complex algorithms can

Review from student

Studypool Student
" Thanks for the help. "
Ask your homework questions. Receive quality answers!

Type your question here (or upload an image)

1829 tutors are online

Brown University





1271 Tutors

California Institute of Technology




2131 Tutors

Carnegie Mellon University




982 Tutors

Columbia University





1256 Tutors

Dartmouth University





2113 Tutors

Emory University





2279 Tutors

Harvard University





599 Tutors

Massachusetts Institute of Technology



2319 Tutors

New York University





1645 Tutors

Notre Dam University





1911 Tutors

Oklahoma University





2122 Tutors

Pennsylvania State University





932 Tutors

Princeton University





1211 Tutors

Stanford University





983 Tutors

University of California





1282 Tutors

Oxford University





123 Tutors

Yale University





2325 Tutors