Traveling salesman problem in C

Discussion in 'C++' started by whitehatmiracle@gmail.com, Sep 10, 2006.

  1. Guest

    Hi there, i need some help for the traveling salesman prob in C
    I have an array with distances to cities

    A B C D E
    A 0 5 7 1 9
    B 5 0
    C 7 0
    D 1 0
    E 9 0
    etc.................................

    With a brute force i get all combinations ABCDE ABDCE ABCED ...........
    I guess i have to use 5 for loops. Not sure how to do that.
    In a corresponding array i store the distances by claculating with the
    help of the table look up.
    SOS....HELP URGENT

    THANKING YOU ALL IN ADVANCE

    CLUESSSSS????????
     
    , Sep 10, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. KantKwitDansin1

    Traveling Salesman Problem

    KantKwitDansin1, Dec 11, 2004, in forum: C++
    Replies:
    9
    Views:
    5,561
    Surendra Singhi
    Dec 12, 2004
  2. Vinay Adella

    complexity of Traveling Salesman Problem?

    Vinay Adella, Sep 3, 2003, in forum: C Programming
    Replies:
    4
    Views:
    1,783
    Jack Klein
    Sep 4, 2003
  3. Replies:
    5
    Views:
    986
    Jim Langston
    Sep 11, 2006
  4. JSH
    Replies:
    61
    Views:
    1,532
    Michael Press
    Aug 21, 2008
  5. Ruby Quiz
    Replies:
    17
    Views:
    315
    Rick DeNatale
    Apr 29, 2009
Loading...

Share This Page