Token Swapping

New to token swapping?Read the token swapping guide
Purpose

Model token rearrangement on a graph using swaps along graph edges.

Inputs

Create vertices and edges, then set each token's initial and target placement in the table.

Outputs

Review swap count, elapsed time, validation messages, replay animation, and step details.

Related terms

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
1A2B3C4+
Use Move / pan to drag nodes or the empty canvas. Use Add edge to connect vertices. Scroll to zoom.

Token inventory

ABC

Token Placements

VertexInitial tokenTarget 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.