Algorithms
Constants, sums and growths, worked on paper
Algorithms
Every question here is answered with a pencil, because every one of them is a step you have to be able to take without a machine. The first two ask you to produce the two numbers an asymptotic claim consists of. The rest are the small pieces of arithmetic that turn up inside a real analysis.
Throughout, is the exact operation count of some procedure and is the shape you are comparing it against. Recall the definition: means there are fixed numbers and with for every .
Take . Give the smallest whole number for which holds at every .
Now hold instead. Give the smallest whole number for which holds at every .
Evaluate , the worst-case comparison count of insertion sort, as an expression in .
in terms of n
A doubling experiment gives a time ratio of 8 between each size and the one before it. Assuming the cost has the form , give .
Rank two growths. Give the smallest whole number from which holds at that value and at every larger one.
Using , estimate . Give your answer to two decimal places.