Your browser doesn't support the features required by impress.js, so you are presented with a simplified version of this presentation.
For the best experience please use the latest Chrome, Safari or Firefox browser.
CIS 115
Algorithms
How do you shuffle cards?
Algorithm
A finite list of specific instructions for carrying out a procedure or solving a problem
Euclid
Image Source: Wikipedia
Euclid's Algorithm (GCD)
Example: GCD of 1071 & 462
Example: GCD of 1071 & 462
Sorting Algorithms
Insertion Sort
Image Source: Wikipedia
Bubble Sort
Image Source: Wikipedia
Big O Notation
Image Source: Wikipedia
Big O Notation
Bubble Sort - Worst Case?
Bubble Sort - Worst Case?
Bubble Sort - Worst Case?
Sorting Algorithms
Merge Sort
Image Source: Wikipedia
Merge Sort
Quicksort
Image Source: Wikipedia
Quicksort
Sorting Algorithms
What is a Heuristic?
Using experience based techniques to find a satisfactory solution to a problem (which may or may not be the absolute best solution)
Everyday Heuristics
Tradeoffs
Image Source: Wikipedia
Traveling Salesman Problem
Image Source: Wikipedia
Traveling Salesman Problem: Algorithms
Traveling Salesman Problem: Heuristic
Nearest Neighbor (Greedy Algorithm)
Traveling Salesman Problem: Heuristic
Nearest Neighbor (Greedy Algorithm) - O(d n)
Time can vary widely based on how the data is presented and sorted
Assignments
Blog 2: Algorithms
There are many important algorithms in Computing Science. In fact, we’re going to learn about many of them later in this class. For now, however, I’d like you to pick an algorithm from Wikipedia’s list of algorithms (https://en.wikipedia.org/wiki/List_of_algorithms) and write about it. Some things you can cover:
Scratch Sorting Algorithms
Due Tuesday 2/14 10:00 PM
Bubble Sort
Image Source: Wikipedia