 
Summary: Written 5 Page 1
CS 2420 Fall 2010 Written Homework # 5
10 Points **Due at Classtime** Late assignments are NOT accepted
1. Merge the two binomial heaps below.
Objective of Sort Detective
The primary objective of this assignment is for you to apply your theoretical knowledge of sorting algorithms to
solve a problem. More specifically, you will be given a program which is designed to measure comparisons and
data movements for six sorting algorithms discussed in class. Unfortunately, the designer of the program did
not label the buttons properly. You must apply your understanding of the general properties of the algorithms
(and in some cases of the code used to implement them) to determine the proper labeling of the buttons.
The secondary objective of this lab is for you to gain experience writing a concise, but complete analysis of a
system.
Background
As you know from class, if you double the size of the data set that you give to a quadratic algorithm, it does
four times the work; by contrast, an )log( nn algorithm does a bit more than twice as much; and a linear
algorithm does only twice as much work. As you also know, the characteristics of the input data set can affect
the expected performance of many of our sorting algorithms. Before you begin the lab, you should review the
expected performance of the algorithms on various data sets.
The sorting algorithms under study include BubbleSort, HeapSort, InsertionSort, MergeSort, QuickSort,
SelectionSort, and ShellSort.
