Lab Assignment 15: Auto Complete Analysis

Overview

This week you will perform asymptotic time complexity analysis and benchmark all of your implementations from previous weeks. The assignment this week is focused on summarizing what you have learned in the previous weeks and drawing conclusions on how the various data structures used in this project behave.

Details

O() Analysis

Create a PDF document and provide O() analysis for the exactMatch() and allMatches() methods defined in the AutoCompleter interface for all your implementations. Your analysis should include separate results for the Unordered and Ordered Lists backed by both an ArrayList and a LinkedList as well as your Binary Search Tree and Trie implementations. In your analysis, use n to represent the number of elements in the AutoCompleter and m to represent the number of elements in the array returned by allMatches(). Be sure to clearly explain your reasoning.

AutoCompleter interface

There is a new static method, getString(int length), that returns a String with length randomly selected lowercase letters in it. This method will be used to generate word lists to be used in your benchmarking activities.

Benchmarking Program

The Benchmarker program collects data to characterize the performance of add(), exactMatch(), and allMatches() methods defined in the AutoCompleter interface as a function of input size. Generate data and plot the results for each of your implementations in a separate graph (UnorderedList (ArrayList and LinkedList), OrderedList (ArrayList and LinkedList), Binary Search Tree, Trie). Be sure to collect enough data so that your graphs clearly show the growth rate of each algorithm. After each graph, explain how your code matches the growth rate you have plotted.

Reflection on Learning

In the final section of your report, address the following:

  1. What questions would you try to answer in order to improve your understanding of this project?
  2. Describe your greatest strength with respect to this course.
  3. Describe an area related to this course where you believe you could improve.
  4. Give an example of a software project you think would be valuable that you believe you could now implement.

Just For Fun

Ambitious students may wish to:

Acknowledgement

This laboratory assignment, developed by Dr. Chris Taylor.

See your professor's instructions for details on submission guidelines and due dates.