Posts

Showing posts with the label Computer Science

Empirical Comparison of Two Algorithms for Minimum Distance Between Elements

Image
This report outlines the steps taken to analyse and compare two different algorithms for finding the minimum distance between two elements in an array. For each of the algorithms being analysed, a basic operation and problem size were chosen before rigorously testing each of them under identical conditions so as to obtain comparable results. The main concerns of these tests were to count the number of basic operations required to complete each algorithm, and compare their execution times several different array sizes. Several graphs were produced visualising the very clear difference between the two algorithms. 1. Description of the Algorithms Both of the algorithms are very similar in that they both require an array of numbers as input, iterate through the input array in some manner, and qualify each inspected element before returning an output. The input array values can be integers, floats, or doubles, it does not matter, as long as all elements within the input array are of