Daaunit 5

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 23

Lower Bound Theory

• Lower Bound Theory

• Lower bound: an estimateof anumber of operations


needed to solve a given problem

• Tight Lower Bound:

• There exists an algorithm with the same efficiency as


• the lower bound
• Comparison Trees
• We now show that MergeSort is also optimal on average, since nlog n is
also a lower bound (again, up to a constant) for the average behavior of
comparison-based sorting. This latter result will be established using a
comparison tree argument.

• Given any comparison-based algorithm with input list L[0:n-1] = {x1, x2, ...,
xn}, (internal) nodes in the comparison tree T associated with the algorithm
correspond to comparisons performed by the algorithm between list
elements. For specificity, our convention will be that if the comparison is
made between xi and xj, and i < j, then we will label the corresponding
node xi:xj. If xi < xj, then a left child will be the node corresponding to the
next comparison made next by the algorithm, or this left child will be a leaf
node if the algorithm terminates. Similarly, if xi > xj (we can assume distinct
list elements for the purpose of establishing lower bounds), then the right
child will be the node corresponding to the next comparison made by the
algorithm, or will be a leaf node if the algorithm terminates.
Oracles and Advisory Arguments
Merging
State Space Method
NP Hard and NP Complete Problems
Deterministic Algorithms
• If the result of every operation is defined in an algorithm then it is
a deterministic algorithm.
Non deterministic Algorithms
• A nondeterministic alogrithm terminates
unsuccessfully if and only if there exists no set
of choices leading to a success signal.

• A machine capable of executing a non


deterministic algorithm in this way is called a
non-deterministic machine.

You might also like