MSE622 Search Algorithm Laboratory Activity
MSE622 Search Algorithm Laboratory Activity
Godofredo Avena
MSE 622
May 7, 2023
Laboratory Exercise - Search Algorithms
Objective: To implement and compare the performance of various search algorithms on different data sets.
Materials:
Computer with Python installed (https://www.python.org/downloads/)
Integrated development environment (IDE) for writing Python code (https://code.visualstudio.com/download)
Instructions:
Part 1: Implementing Search Algorithms
Note: You can refer to the earlier explanations and the code provided for each algorithm to help you with the
implementation.
Part 2: Generating Test Data
Create three different data sets for testing the search algorithms:
a. Small data set: Generate a sorted list of 100 integers.
b. Medium data set: Generate a sorted list of 1,000 integers.
c. Large data set: Generate a sorted list of 10,000 integers.
Choose a random target element from each data set to search for.
For each search algorithm, measure the time taken to find the target element in each data set. A
code has been given but you can change it to get a more efficient answer.
Record the execution times for each algorithm and data set combination.
Part 4: Analysis and Conclusion
Create a table or graph to visualize the performance of each search algorithm on the different data sets.
Deliverables: