Tue Nov 01 2016
The Horse Race Project was a course project from CS 170 - Efficient Algorithms and Intractable Problems. I had to work in a group of four people, who were selected randomly from among the entire class.
In the project, we were given a set of numerous race horse teams. Every horse in a team would be a node with a certain value in a connected graph. Starting from a given horse, we would form a "team" of horses by following a path along some of the "horse" nodes until we hit a dead end. The rule was that we would sum up the value of each node/horse and multiply the sum by the number of nodes/horses in the team. Our goal was to, given a bunch of connected nodes, form a horse team that returned the greatest result (i.e. sum of values * number of horses). To test our code, we ran our algorithm on hundreds of files containing random horse team data, which required us to make our algorithm as efficient as possible (since otherwise we would get a time-out error).