Algorithm
Jump to navigation
Jump to search
A set of precise steps used to solve a problem
- Does it do as advertised? (proving)
- How efficient is it? (counting)
Early Algorithms
Euclid:
- Division algorithms
- Euclidean GCD algorithm
Parts of a Good Algorithm
- Input set
- Output set
- "Well defined" steps (precise and clear)
- Correctness
- Generality (works for input values)
- Finite-ness (eventually stops)
- Effectiveness (each step in the algorithm works)
Classic Algorithms
- Greedy Algorithms
- optimize for each step
- Do the best thing to get closest to goal from this current point
- Halting Problem by Alan Turing
- Can an algorithm determine whether an input algorithm will terminate or loop indefinitely
- UNSOLVABLE!