Amortized Analysis
Amortized Analysis
It is used for algorithms where an occasional operation is very slow, but most of
the other operations are faster. In Amortized Analysis, we analyze a sequence
of operations and guarantee a worst case average time which is lower than the
worst case time of a particular expensive operation.
1.Aggragate analysis:
2.Accounting method:
3. Potential method
The potential method is a method used to analyze the amortized time and
space complexity of a data structure, a measure of its performance over
sequences of operations that smooth out the cost of infrequent but expensive
operations.
Instead of representing prepaid work as credit stored with specific objects in
the data structure, the potential method of amortized analysis represents the
prepaid work as "potential energy,"or just "potential," that can be released to
pay for future operations. The potential is associated with the data structure as
a whole rather than with specific objects within the data structure.