You want a simple depreciation analysis of static trees. If you take one basic zigzag, as an example on Wikipedia. this is the worst case of senario. And you have:
P (tf) - P (ti) ≤ 3 (rankf (x) - ranki (x))
Proof: with the notation used in wikipedia, since x is in the root of the tree after the conversion, you easily get:
rankf (x)> = rankf (g) and rankf (x)> = rankf (f)
Thus,
Ptf = rankf (x) + rankf (g) + rankf (p) <= 3 * rankf (x)
With the opposite consideration with x before conversion you get:
Pti = ranki (x) + ranki (g) + ranki (p)> = 3 * ranki (x)
You can generalize this to the entire transaction to calculate the amortized cost.
I assume this is the result of your result, but I'm not sure what you were looking for.
source share