This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: IE 170 Laboratory 2: Selection Algorithms Dr. T.K. Ralphs Due February 6, 2006 1 Laboratory Description and Procedures 1.1 Learning Objectives 1. Understand each of the key terms listed below. 2. Understand the use of recursion in algorithm design. 3. Understand the use of the pair data structure. 4. Understand why randomization can be an effective tool in algorithm design. 5. Understand the difficulties that can occur in analyzing an algorithm empirically. 1.2 Key Words 1. Randomized 2. Recursive 3. Selection 4. Partial sorting 1.3 Scenario Because of the large number of complaints that are received by the on-line retailer ripoff.com where you are employed, the management decides to establish a list of the complaints that have been made. The list contains the name of each customer who has registered a complaint, along with a numerical priority (known to insiders as the squeaky wheel index ) that is constantly updated. The priority is based on a combination of the amount of merchandise the customer has purchased in the past six months, the number of times they’ve called, how recently they’ve called, and a number of other factors. In order to make the list easy to update, it is kept in order by the customers’ last names. However, the customer service supervisor would like to be able to determine at the touch of a button who the top 10 complainers in the system are at any one time. Because the number of complaints is so large, it is not practical (or needed) to completely re-sort the list in order to determine this, so we would like to have an algorithm that could efficiently determine this information without resorting the entire list. Finding the i th item in a list of n items is called the selection problem . Generating a sorted list of the best i items in a list of n items is called the partial sorting problem . These problem are essentially equivalent since either one of them can be solved easily using an algorithm for the other one (see the exercises). 1 1.4 Designing and Analyzing the Algorithm In this lab, we will be comparing in more detail the results of the theoretical and empirical analysis of two algorithms. This time, however, we’ll measure the actual running time of the algorithms in question. Because the subroutines we have available for measurement of running times are not that precise and because it’s more convenient to work with small data sets, we will need to run...
View Full Document
This note was uploaded on 08/06/2008 for the course IE 170 taught by Professor Ralphs during the Spring '07 term at Lehigh University .
- Spring '07
- Systems Engineering