heavy_light_decomposition
Decompose a tree into heavy and light paths to enable efficient path queries.
Instructions
Perform heavy-light decomposition of a tree for efficient path queries.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"vertex_count": "<vertex_count>",
"edges": "<edges>"
},
"name": "heavy_light_decomposition"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| root | No | Root vertex (default 0) | |
| edges | Yes | Edges as [u, v] pairs (0-indexed) | |
| vertex_count | Yes | Number of vertices |