CS234 Lecture Notes - Random-Access Machine, Ais People, Polynomial

75 views4 pages

Document Summary

It is a sequence of well-define steps for solving a given problem. For a problem p, we may have multiple algorithms. For every algorithm a, we may have multiple implementations. Influenced by processor, memory, os, complier, pl : you cannot test for all inputs. Complexity analysis (pencil and paper approach: examine the algorithm. Example: write an algorithm to find the sum of the first n numbers. Random access machine (ram) model: memory accesses take constant time, primitive operations take constant time, comparisons, arithmetic operations, assignment. Measuring time complexity: given the size of input n, sum the number of memory accesses, sum the number of primitive operations in the algorithm, derive a formula t(n) T(n) is approximately the number of steps in the algorithm in terms of the input size. Analysis types: worst case most common approach, simpler, crucial, best case almost always faster on certain inputs, average case difficult. T(n) is o(f(n)) t(n) is bounded from above by f(n)

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents