Reversal Breaks Order

makeroot(x) in an LCT works by reversing a path, carried as a lazy flag on the splay node. Which class of path aggregate does that quietly break?

A

Nothing at all: a matrix product, a longest-run-of-ones scan, a function composition all survive. The flag only relabels the path, so every aggregate over a set of nodes is invariant under it.

B

Anything non-commutative: a matrix product, a longest-run-of-ones scan, a function composition. The flag reverses the sequence, so you must store the aggregate in both directions and swap them whenever the flag flips.

C

Anything commutative: a sum, a maximum, a count of marked nodes. The flag reverses the sequence, so you must store the aggregate in both directions and swap them whenever the flag flips.

D

Anything carrying a lazy tag: a range add, a range assign, a subtree size. The flag reverses the sequence, so every other tag goes stale and its aggregate must be recomputed from the children on each flip.