CPS 109 Lecture Notes - Lecture 9: Big O Notation, Loop Unrolling, Computational Problem

55 views6 pages

Document Summary

Consists of the domain of possible instances + their expected answers: domain determines what input the problem is defined for. Placeholder variables giving these some values provides 1 possible instance of the problem. Eg: primality problem: is the integer x a prime number? would have the 1 possible instance of. Decision problem: a problem whose answer is always true or false, all computational problems can be reduced to a series of decision problems. Interesting computational problems tends to have an infinite number of possible instances: or else it could be solved via a lookup table. Unambiguous and deterministic series of instructions: their execution is guaranteed to produce the correct answer, for a particular instance in finite time (which would depend on the particular instance, eg: brute force algorithm for primality. Checks all possible divisors of n, going up to the square root of 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