Computers Java Algorithm help

Discussion in 'Computers' started by Teddz, Feb 7, 2006.

  1. Teddz

    Teddz Sexy Swedish Love ♥

    Joined:
    Dec 8, 2002
    Messages:
    3,501
    Likes Received:
    136
    We are currently doing an assignment in Java, with nodes.

    It's about creating a graph that allows a "travelling" salesman to go through different cities. Each city has it's special price, and there are certain amount of nodes to go through.

    The program should calculate the easiest path and quickest path to go throw the graph, and later print the result out.

    So...any good ideas on how to solve it? I have some plans in my pocket, but I would like to see how others would solve it :)

    - Teddz
     
    #1
  2. luvweaver

    luvweaver Ad Jesum per Mariam

    Joined:
    May 13, 2002
    Messages:
    1,196
    Likes Received:
    60
    Ah, the traveling salesman problem :)

    It's a classic :D

    http://en.wikipedia.org/wiki/Travelling_salesman

    You could do the brute-force approach, unless your teacher has told you other methods. Artificial intelligence is often used to solve this problem :)

    The wikipedia article has some algorithms on how to solve it. Good luck! :)
     
    #2
  3. Teddz

    Teddz Sexy Swedish Love ♥

    Joined:
    Dec 8, 2002
    Messages:
    3,501
    Likes Received:
    136
    Cheers for the help there luvweaver, but we have a solution ;)

    - Teddz
     
    #3
  4. Zanza

    Zanza .Net-ing & PHP-ing~*
    Staff Member

    Joined:
    Jul 16, 2001
    Messages:
    4,652
    Likes Received:
    117
    woah! I remember that one, but we didn't have to solve it in programming.

    Awful memories gushing into my mind right now..
     
    #4
    1 person likes this.

Share This Page