{"data":{"allMarkdownRemark":{"edges":[{"node":{"html":"<h1>Traveling Salesman Problem</h1>\n<p>The traveling salesman problem (TSP) asks , Given a set of cities and the distances between them, what is the shortest possible route that visits every city exactly once and returns to the starting city?</p>\n<h3>Project Overview</h3>\n<p>This project is an interactive visualization platform for exploring and comparing different approaches to solving the Traveling Salesman Problem.</p>\n<p>Users can:</p>\n<ul>\n<li>Enter custom coordinates</li>\n<li>Generate random city locations</li>\n<li>Visualize routes on an interactive map</li>\n<li>Compare multiple optimization algorithms</li>\n<li>Analyze route quality and execution time</li>\n</ul>\n<h2>Implemented Algorithms</h2>\n<h3>1. Nearest Neighbor</h3>\n<p>A greedy algorithm that repeatedly visits the nearest unvisited city.</p>\n<p><strong>Advantages</strong></p>\n<ul>\n<li>Very fast</li>\n<li>Simple to understand</li>\n</ul>\n<p><strong>Disadvantages</strong></p>\n<ul>\n<li>Often produces suboptimal routes</li>\n</ul>\n<h3>2. 2-Opt Inversion</h3>\n<p>A local search optimization technique that improves an existing route by removing inefficient edge crossings.</p>\n<p><strong>Advantages</strong></p>\n<ul>\n<li>Produces significantly shorter routes</li>\n<li>Fast for medium-sized datasets</li>\n</ul>\n<h3>3. Simulated Annealing</h3>\n<p>A metaheuristic optimization algorithm inspired by the annealing process in metallurgy.</p>\n<p><strong>Advantages</strong></p>\n<ul>\n<li>Escapes local minima</li>\n<li>Often produces the best routes among the implemented algorithms</li>\n</ul>\n<p><strong>Disadvantages</strong></p>\n<ul>\n<li>Slower than greedy approaches</li>\n</ul>\n<h2>Algorithm Comparison</h2>\n<p>This project demonstrates the tradeoff between:</p>\n<ul>\n<li>Route Quality</li>\n<li>Execution Time</li>\n<li>Computational Complexity</li>\n</ul>\n<p>and allows users to compare how different optimization strategies perform on the same set of cities.</p>\n<h2>Tech Used</h2>\n<p>These are the main tools used to build this site:</p>\n<ul>\n<li><a href=\"https://www.gatsbyjs.org\">gatsbyjs</a></li>\n<li><a href=\"https://reactjs.org\">reactjs</a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API\">web workers</a></li>\n<li><a href=\"https://material-ui.com/\">material-ui</a></li>\n<li><a href=\"https://deck.gl/#/\">deck.gl</a></li>\n<li><a href=\"https://openfreemap.org/\">OpenFreeMap</a></li>\n<li><a href=\"https://www.openstreetmap.org/\">OpenStreetMap</a></li>\n</ul>"}}]}}}