Consider the follow operations on a stack of size at most $k$.
Push - insert element in the stack - actual cost 1
Pop - remove top element from the stack - actual cost 1
Copy - copy whole stack (but maintain the number of elements) - actual cost is the number of elements in the stack
Prove using the potential method that each single operation (push, pop or copy) has amortized cost at most 2.
What would be a suitable potential function for this problem?