Model token rearrangement on a graph using swaps along graph edges.
Token Swapping
New to token swapping?Read the token swapping guide
Create vertices and edges, then set each token's initial and target placement in the table.
Review swap count, elapsed time, validation messages, replay animation, and step details.
Token swapping, graph token swapping, swap sequence, token routing, graph reconfiguration.
Modeling & constraints
Create the graph visually, then assign initial and target tokens in the table.
3 tokens4 vertices5 edgesConnected
Use Move / pan to drag nodes or the empty canvas. Use Add edge to connect vertices. Scroll to zoom.
Token inventory
ABC
Token Placements
| Vertex | Initial token | Target token |
|---|---|---|
| 1 | ||
| 2 | ||
| 3 | ||
| 4 |
Validation
Problem definition is ready to solve.
Results
Summary, visualization, error messages, and details.
Run the solver to see token-swapping preview.
