

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Potential Method
According to computational complexity theory, the potential method is defined as a method implemented to analyze the amortized time and space complexity of a data structure, a measure of its performance over sequences of operations that eliminates the cost of infrequent but expensive operations.
In the potential method, a function Φ is selected that converts states of the data structure to non-negative numbers. If S is treated as state of the data structure, Φ(S) denotes work that has been accounted in the amortized analysis but not yet performed. Thus, Φ(S) may be imagined as calculating the amount of potential energy stored in that state. Before initializing a data structure, the potential value is defined to be zero. Alternatively, Φ(S) may be imagined as representing the amount of disorder in state S or its distance from an ideal state.
Example
Let we can denote a potential function Φ (read "Phi") on states of a data structure satisfies the following properties −
- Φ(a0) = 0, where a0 is the starting state of the data structure.
- Φ(at) ≥ 0 for all states at of the data structure occurring at the time of the course of the computation.
Intuitively, the potential function will be able to keep track of the precharged time at any point in the computation. It measures amount of available saved-up time to pay for expensive operations. It is like a bank balance in the banker's method. But interestingly, it depends only on the present state of the data structure, whatever of the history of the computation that got it into that state.
We then define the amortized time of an operation as
c + Φ(a') − Φ(a),
where c is the original cost of the operation and a and a' are the states of the data structure before and after the operation, respectively. Thus the amortized time is defined as the actual time plus the change in potential. Ideally, Φ should be defined so that the amortized time of each operation should be small. Thus the change in potential should be measured as positive for low-cost operations and negative for high-cost operations.
- Related Questions & Answers
- Potential Distribution over a Suspension Insulator String
- What is Potential Transformer (P.T.) and how it works?
- What are the routing potential problems in Computer Architecture?
- How to Assess a Company's Growth Potential?
- How to indicate a potential word break point within a <nobr> section in HTML?
- Why hasn’t football lived up to its potential in India despite having a history of more than a century in this country?
- Class method vs static method in Python
- Collections.replaceAll() method and List.replaceAll() method in Java
- Method overloading v/s method overriding in Java
- The isEmpty() method of CopyOnWriteArrayList method in Java
- The hashCode() method of CopyOnWriteArrayList method in Java
- The clone() method of CopyOnWriteArrayList method in Java
- Difference between Method Overriding and Method Hiding in C#
- Differentiate between Asset purchase method and stock purchase method
- HTM5 checkValidity() method