1. Limited time only! Sign up for a free 30min personal 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!

Homework Help: 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
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Can you offer guidance or do you also need help?
Draft saved Draft deleted