SSE554-Capstone-Project

Graphs, Prime Numbers, and Complexity

Graphs

A graph is used in the project in the SimilarItemsGraph class to get the most similar items to a particular item. This graph is implemented as an undirected, weighted graph, as items can be more similar to one item than another, and the similarity symmetric. When an item is searched, the graph runs Dijkstra’s algorithm to get the 10 most similar items to the searched item. The graph is filled at launch by calculating the similarity between each pair of items and adding the edge if it is in the top 5% of edge weights among all possible edges. Citation is in the file.

Prime Numbers

A prime number is used in the project in the IdHashKey class to implement the Rabin-Karp rolling hash function for the custom hash function. The prime number is used to prevent overflow issues, as well as prevent collisions. The prime number should be large, so it was chosen as the largest prime number that is under 100 million.

Complexity