euler_tour
Computes an Euler tour of a tree to generate tin/tout timestamps, node depths, and subtree sizes for ancestor and subtree queries.
Instructions
Compute Euler tour of a tree with tin/tout timestamps, depths, and subtree sizes.
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": "euler_tour"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| root | No | Root vertex (default 0) | |
| edges | Yes | Tree edges as [u, v] pairs (0-indexed) | |
| vertex_count | Yes | Number of vertices |