bipartite_check
Checks whether an undirected graph is bipartite (2-colorable) and returns the two vertex sets or an odd cycle.
Instructions
Check whether an undirected graph is bipartite (2-colorable). Returns the two vertex sets if bipartite, or an odd cycle if not.
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": {
"vertices": "<vertices>",
"edges": "<edges>"
},
"name": "bipartite_check"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| edges | Yes | Undirected edges as [u, v] pairs | |
| vertices | Yes | Number of vertices (0-indexed) |