CS 3303-01 Data Structures - AY2022-T5
Dashboard My courses CS 3303-01 - AY2022-T5 4 August - 10 August Learning Guide Unit 8
Learning Guide Unit 8
Learning Guide Unit 8
Overview
Unit 8: Searching and indexing techniques and algorithms Topics:
Searching unsorted and sorted arrays Hashing Linear indexing ISAM B-Trees
Learning Objectives:
Understand the terminology of searching and indexing algorithms o Jump Search o Dictionary search or interpolation search o Quadratic Binary Search Understand the characteristics of Self Organizing Lists Being able to recognize and describe a Zipf distribution Understanding and be able to implement hashing algorithms and related concepts including: o Open Hashing Closed Hashing Bucket Hashing Linear Probing
o Collision resolution methods
. Understand indexes and how to create an index including the following concepts: o Entry sequenced file Primary and Secondary keys oLinear Index and inverted lists oISAM (Indexed sequential access method) oTree based indexing including: 2-3 trees B-trees B+-trees
Introduction
In unit 8, we explore searching and indexing algorithms. As is pointed out in the Shaffer (p. 317) text, "searching is surely the most frequently performed of all computing tasks." Searching algorithms are designed to find a record or records in a collection of records. The collection of records can be an array, table, or file. In unit 1 we learned that a sequence is an ordered collection of items and that the identifier of these items can have duplicate values. The search algorithms discussed in chapter 9 of the text are typically appropriate for a sequence as they can accommodate lists which have duplicate values. Techniques such as hashing (presented in chapter 9), and indexing using b- trees cannot be used with a sequence as they must h ave an algorithm that can resolve to the specific key value which cannot be duplicated. We need to consider both exact-match and range queries as we consider different strategies for searching. An exact match query is a search designed to find a specific item or one that has an exact match to the search value. The range query on the other hand is designed to return multiple items or all of the items that fall within a range of key values. Key value ranges can be defined in a variety of ways including specific value based ranges and through the use of wildcards. Throughout this unit we will be exploring the data structures and algorithms that are used to search for and find information. Our text will explore x different types of strategies for finding a specific item or group of items that is contained within an array, table, or file. These strategies include Searches, Self Organizing Lists, Hashing, Linear Indexing, and Tree Based Indexing Searches
A search is pretty much what it sounds like which is some process of scanning through a list of items until the item searched for is found. The problem with such a sequential approach is that as the number of items (N) in the list increas es so does th