Algorithms
Randomized Algorithms
Monte Carlo Algorithm
Sometimes the best way to approach a problem is to allow it to chance. Monte Carlo uses probability models and couples it with weights to run the problem many times to determine the correct outcome within a certain margin of error. In this project, we will find an estimate of the value of pi given a series of random numbers, several iterations, and a circle.
Randomized Algorithms
Las Vegas Algorithm
Las Vegas is known for gambling. Sometimes “gambling” with the amount of time it takes for an algorithm to run is a great method to ensure that you get the right answer. In this project we will gamble with time and number of points generated to ensure that we find a point within a circle with a specific radius.
Divide and Conquer Algorithms
Quick Sort Algorithm
Desmond Tutu—a human rights activist in the 1990’s—once said “there is only one way to eat an elephant: a bite at a time”. Typically, large and daunting tasks can be broken up into smaller sections which can be solved in less time than solving one large task. Divide and conquer algorithms take this idea of breaking up a large task that would be difficult to solve and breaks them up into simple sub-problems that can be solved directly and then combined. Quick sort is a common algorithm that uses the divide and conquer ideology to sort a large array of values in a fast manner.
Recursive Algorithms
Tower of Hanoi
One of the most prominent algorithms programmers use in their daily lives is recursion. Many programmers consider it an elegant way to implement something that would normally take many nested loops. It can add clarity and help debug code as the loop is done all in one line. The Tower of Hanoi is a classic recursion problem that can be easily solved using recursion over iteration. This project is intended to show when recursion is useful and the time and space complexity of recursion versus iteration.