2. 16, 10 19- A B 21 24 Apply the nearest neighbor algorithm to the graph above starting at vertex A. Give your answer as a list of vertices, starting and ending at vertex A. Example: ABCDA

Advanced Engineering Mathematics
10th Edition
ISBN:9780470458365
Author:Erwin Kreyszig
Publisher:Erwin Kreyszig
Chapter2: Second-order Linear Odes
Section: Chapter Questions
Problem 1RQ
icon
Related questions
Question
8
16
10
19
A
21
24
Apply the nearest neighbor algorithm to the graph above starting at vertex A. Give your answer as a list of
vertices, starting and ending at vertex A. Example: ABCDA
Enter text [more..]
Transcribed Image Text:16 10 19 A 21 24 Apply the nearest neighbor algorithm to the graph above starting at vertex A. Give your answer as a list of vertices, starting and ending at vertex A. Example: ABCDA Enter text [more..]
Expert Solution
Step 1

In the graphical representation of Travelling Salesman Problem vertices corresponds to the cities and weights of the edges denotes the distance between the cities .

Nearest Neighbour Algorithm :

  1. Choose an arbitrary vertex x as starting vertex and find all the vertices adjacent to vertex v , say v1,v2,........,vn .
  2. Find the vertex vk that is closet to vertex v w(v,vk) = min { w(v,v1),w(v,v2),......,w(v,vi)} , 1<= k <=1 join the two vertices v and vk to form a path of length one say p .
  3. Select a vertex which is not selected earlier from the last traced vertex and join it in the path to extend the path .
  4. If the path contains all vertices of the graph . Then we are done . Now to obtain Hamiltonian circuit join the terminal vertices of the path by edge of minimum weight existing between the two vertices . Otherwise repeat steps 2 and 3 .
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Recommended textbooks for you
Advanced Engineering Mathematics
Advanced Engineering Mathematics
Advanced Math
ISBN:
9780470458365
Author:
Erwin Kreyszig
Publisher:
Wiley, John & Sons, Incorporated
Numerical Methods for Engineers
Numerical Methods for Engineers
Advanced Math
ISBN:
9780073397924
Author:
Steven C. Chapra Dr., Raymond P. Canale
Publisher:
McGraw-Hill Education
Introductory Mathematics for Engineering Applicat…
Introductory Mathematics for Engineering Applicat…
Advanced Math
ISBN:
9781118141809
Author:
Nathan Klingbeil
Publisher:
WILEY
Mathematics For Machine Technology
Mathematics For Machine Technology
Advanced Math
ISBN:
9781337798310
Author:
Peterson, John.
Publisher:
Cengage Learning,
Basic Technical Mathematics
Basic Technical Mathematics
Advanced Math
ISBN:
9780134437705
Author:
Washington
Publisher:
PEARSON
Topology
Topology
Advanced Math
ISBN:
9780134689517
Author:
Munkres, James R.
Publisher:
Pearson,