Home▸Algorithms & AI▸Link-Cut Tree Splay Forest Map

🌲 Link-Cut Tree Splay Forest Map

Link-Cut Tree Splay Forest Map

Algorithms & AI2DModerate60 FPS📱 Mobile-adapted🟠 Blender⇄ 3D version
Link-Cut Tree Splay Forest Map ↗ Open standalone

The simulator demonstrates how a link-cut tree decomposes a dynamic forest into preferred paths represented as splay trees, and how access, link, and cut operations splice these paths together to keep path queries fast even as the forest's shape changes.

🔬 What It Demonstrates

The simulator demonstrates how a link-cut tree decomposes a dynamic forest into preferred paths represented as splay trees, and how access, link, and cut operations splice these paths together to keep path queries fast even as the forest's shape changes.

🎮 How to Use

Add nodes to build a forest, then use link to attach one tree under another and cut to detach a subtree. Trigger an access on any node to see the preferred path from that node to its root highlighted, and watch the underlying splay-tree reorganization happen step by step. Run a path query, such as minimum edge weight, between two nodes to see the access operation used to answer it.

💡 Did You Know?

A single access operation in a link-cut tree can restructure the entire preferred-path decomposition along the way to the root, yet the amortized cost still works out to logarithmic time, the same trick that makes ordinary splay trees efficient despite occasionally expensive individual operations.

⚙ Under the hood

Link-Cut Tree Splay Forest Map

link-cut-treedata-structuressplay-treeamortized-analysisdynamic-treesgraph-algorithmsBlender

2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)