1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Nearest neighbor and cheapest link algorithm

  1. Jun 20, 2007 #1
    1. The problem statement, all variables and given/known data

    I need to calculate the relative error of the nearest neighbor algorithm. The book says it is the difference between the worst and nearest neighbor solution to the nearest neighbor solution. Does the mean that for example I have CITY A, find the fastest way to back to city A while reaching all the vertex and find the longest way back to city A while reaching all the vertex. Then I take the difference and divide it by the shortest way?

    Can anyone explain how to do the cheapest link algorithm:
    My professor told me is
    1) Pick the link with the smallest weight
    2) Pick the next cheapest link
    3) Contine picking the cheapest link availabe
    4) Close the circuit

    I am very confuse with his step, how do I close the link???? How is that different from the nearest neighbor algorithm??

    Thank You

    2. Relevant equations



    3. The attempt at a solution
     
  2. jcsd
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Can you help with the solution or looking for help too?