Hi guys,
I have learn splay tree for a while and read a lot of tutorial and I found that different tutorial have different explanation but the strange thing is they have the same proof about the time complexity of splay operation.
When i see the proof,there is always one sentence "First let us use the potential method,then let potential function be log(size(n))" but why?
Is that related to the observation?Some of the math theorem happen same thing,through the result we already observe that the theorem is correct but haven't prove it then the problem become how to prove a theorem which is already correct(or at least can't found a counterexample) then there will be a lot of not logic operation just for prove the theorem.Does the splay tree happen same condition?
Thank for you reading,if you know the answer please teach me.








The proce could be found by clicking one of the following link and link
The naive rebalancing approach involves repeatedly performing rotation operations on a node to elevate it until it becomes the root. The problem with this naive method lies in chain-like trees where all child nodes are left (or right) children. In such cases, it essentially corresponds to repeatedly performing zig operations. Consequently, the constant term 1 in the amortized complexity of zig operations would continuously accumulate, resulting in a final amortized complexity reaching O(log n + n). The design of the rebalancing operation in Splay trees prevents constant accumulation in consecutive zig scenarios by ensuring that during a complete splay operation, at most one standalone zig operation is performed, thereby optimizing the time complexity.
But usually we use Treap instead of Splay because Treap has a smaller constant factor.
Except on link cut trees because splay's amortized complexity works nicely with it.
also reverse a range with O(log n) time complexity?
Yes.