New to Google Cloud? Get $300 in credits to explore Compute Engine, BigQuery, Cloud Run, Gemini Enterprise Agent Platform, and more.
Start your next project with $300 in free Google Cloud credit. Spin up VMs, run containers, query petabytes in BigQuery, or build agents with Gemini Enterprise Agent Platform. Once your credits are used, keep building with 20+ always-free tier products including Compute Engine, Cloud Storage, GKE, and Cloud Run functions. No commitment required—just sign up and start building.
Claim $300 Free
Earn up to 16% annual interest with Nexo.
More flexibility. More control.
Generate interest, access liquidity without selling, and execute trades seamlessly. All in one platform.
Geographic restrictions, eligibility, and terms apply.
Generate and solve Travelling Salesman Problem tasks
TSPSG is intended to generate and solve Travelling Salesman Problem (TSP) tasks. It uses Branch and Bound method for solving. An input is a number of cities and a matrix of city-to-city travel prices. The matrix can be populated with random values in a given range (useful for generating tasks). The result is an optimal route, its price, step-by-step matrices of solving and solving graph. The task can be saved in internal binary format and opened later. The result can be printed or saved as...