00:01
In this problem we are given a graph and we are asked to solve the traveling salesman problem denoted as tsm for this given graph.
00:13
This is the graph given.
00:15
Now the traveling salesman problem is to find the minimum cost hamiltonian cycle denoted as h .c.
00:25
Now the hamiltonian cycle is a cycle that visits every vertex in the graph.
00:33
Graph exactly once and return back through the vertex where it is started.
00:38
Now we need to find a minimum cost hamiltonian cycle.
00:42
For that we can use the nearest neighbor algorithm.
00:48
So by this algorithm, we have, first, we have to name the vertices, say v1, v2, v3 and v4.
01:01
Now, by this nearest neighbor algorithm, we can start at any.
01:06
Vertex from among these vertices and we can go to an adjacent vertex that has the least cost.
01:15
Now from there we can look for another adjacent vertex that is not already included in the path and that has the minimum cost...