Basic Terms Flashcards
RAM Model
Random Access Machine Model
2 Assumptions of the RAM model
Steps are executed sequentially, each step is an operation that takes constant time
Constant running time
O(1) complexity independent of input size
logarithmic running time
O(log n)
linear running time
O(n)
log-linear running time
O(n log n)
polynomial running time
O(n^c) where c is a constant
exponential running time
O(c^n) where c is a constant raised to a power based on the input
6 classes of complexity in order of worst-case speed
constant, logarithmic, linear, log-linear, polynomial, exponential
What quality should you look for in a good hash function?
Uniform distribution of results, to minimize collisions. Must also be deterministic.