ToolJovia
Math

Small Cost-Matrix Tour Workbench

Find a shortest complete round trip through every supplied cost-matrix vertex and verify the edge sum.

✓ Browser-local processing

Loading tool…

How to use Small Cost-Matrix Tour Workbench

A subset dynamic program records the cheapest route to each last vertex after visiting an exact set. The final edge must return to your start. A reconstructed round trip visits every vertex once and is checked against the objective.

  1. Enter square cost matrix json (null means unavailable), starting vertex (1-based).
  2. Choose the stated convention and check the units and supported model.
  3. Calculate, inspect the result, then copy or download it.

Good to know

  • Exact-grid inputs are plain decimals with at most six places and magnitude≤1e9. Raw JSON number spelling is checked before conversion; decimal strings can preserve exact grid values. Exact rational intermediates are bounded to 8192 bits.2–12 vertices, nonnegative directed costs, diagonal zero, null for an unavailable off-diagonal arc. No coordinates, travel times, traffic, geocoding or navigation. Exact optimality is limited to the entered matrix; equal-cost tours return one deterministic witness.
  • Local calculation only; no input persistence or external lookup. Text/JSON is limited to 30000 characters and output to 1000000 characters. Numeric model inputs and precision/work limits are stated on this page. Approximate JSON numbers retain full stored values; exact arithmetic outputs retain decimal or fraction strings. Unsupported states fail explicitly.

Common questions

How is this different from a shortest path?

A shortest path only connects selected endpoints. This model requires every matrix vertex to appear once before returning to the start, so the feasible routes and objective are different.

Is the input uploaded or saved?

No. The tool calculates inside this browser tab and provides a local download; it does not persist your input.

Keep going with related tools

All math →