Q:
# What Is the Nearest Neighbor Algorithm?

**The nearest neighbor algorithm is one of the initial approximate algorithms used in finding a possible solution to the travelling salesman problem.** Though it shortens the tour, it is a sub-optimal solution.

Credit:
ZenShui/Eric Audras
PhotoAlto Agency RF Collections
Getty Images

There are several steps to follow when applying the nearest neighbour algorithm to the problem. First, one has to choose an arbitrary vertex as the current vertex. Then, the shortest edge that connects an unvisited node to the current vertex should be determined. This unvisited point should then be set as the current vertex and marked as visited. If, after this, all the vertices in selected domain are visited, one should terminate the process. If not, then one should execute the second step again. Practical areas where this algorithm has been successfully used include coding satellite images, analysing handwritten digits and solving regression problems.

Learn more about Statistics-
Q:
## What Is the Simplest Solution to a Rubik's Cube?

A: A simple solution to a Rubik's cube is the algorithm R' D' R F' D' R R’ D D R D R’ D’ R F R U R’ U’ F’ R U R’ U R U U R’ U U R U’ L’ U R’ U’ L R’ D’ R D. T... Full Answer >Filed Under: -
Q:
## How Do You Resolve a Tree Dispute With Your Neighbor?

A: An individual can resolve a tree dispute with a neighbor by talking to the neighbor about the tree issue, and if the neighbor does not do anything to resol... Full Answer >Filed Under: -
Q:
## What Are Some Tips for Handling a Neighbor's Barking Dog?

A: Deal with a neighbor's barking dog by making the neighbor aware of the situation, asking him to resolve the problem, and then following up with the proper ... Full Answer >Filed Under: -
Q:
## How Do You Stop Your Neighbor's Dogs From Barking?

A: The best way to quiet a neighbor's barking dog is usually to approach the neighbors and ask them to find a solution, according to WTOP. If the problem pers... Full Answer >Filed Under: