This preview shows pages 1–3. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: IE 170 Laboratory 5: Binary Search Trees Dr. T.K. Ralphs Due Feb 27, 2006 1 Laboratory Description and Procedures 1.1 Learning Objectives You should be able to do the following after completing this laboratory. 1. Understand binary search trees (BSTs) and the BST property. 2. Understand how to implement a binary search tree with a linked list. 3. Understand the importance of the depth of the tree on performance. 4. Understand how to analyze the performance of a BST. 1.2 Key Words You should be able to define the following key words after completing this laboratory. 1. Symbol table 2. Dictionary 3. Binary search tree 4. Tree depth 5. Balanced tree 1.3 Scenario You work for a large credit card company affiliated with hundreds of different banks that offer customized versions of its card. When a customer wants to use a card to make a purchase, the card number is entered into a small computer called a point of sale (POS) terminal. This computer in turn queries a database of card numbers to determine whether the sale should be approved or not. One of the main functions the credit card company performs for its bank affiliates is to maintain the POS terminals and service the queries as they arrive. This involves maintaining records for literally hundreds of thousands, possibly millions of credit cards. Each time there is a query from a POS terminal, the database must be searched for the corresponding record to determine if the sale should be approved or not. There are literally thousand of queries a minute and they must be answered very quickly. Furthermore, the database is very dynamic. New card numbers are added and old card numbers deleted minute by minute. Recently, the database has been failing to respond to queries at peak times and sales have been lost. Your job is to implement a new one capable of much better performance. 1 1.4 Design and Analysis In this lab, you will insert items into a binary search tree with a linked list as the underlying data structure. As we saw in Lecture 9, one of the main indicators of performance for binary searchstructure....
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