Mathematical Approach to Measuring Running Times Flashcards
Is the cost of basic operations low or high
low
formula for total running time exact mathematical models
sum of cost x frequency of all operations
example of sum for a precise running time
T(N) = (number of iterationscost of that operation) + 9number of iterationscost of that operation)
eg. T(N) = (2cost of addition) + (8cost of subtraction)
calculations are simplified using another type of modeling. Waht is it called
cost modelling
disadvantages of precise mathematical calculations
running times change from computer to computer
tedious
need to know the exact cost of individual operations
three types of cost models
all operations take a constant cost of 1
focus on highest order terms only
only count some operations
combination
what to be careful of when only considering highest order terms in cost modelling
Make sure that the operations you are not counting add up to a
factor lower than the operations you do count
when you have simplified a cost model how do you indicate it has been simplified
tilde notation ~ before