2 Replies - 7491 Views - Last Post: 24 January 2011 - 02:46 PM

#1 Dogstopper  Icon User is offline

  • The Ninjaducky
  • member icon



Reputation: 2876
  • View blog
  • Posts: 11,051
  • Joined: 15-July 08

[Competition] Function Challenge #3

Post icon  Posted 18 January 2011 - 11:44 AM

This week's challenge can have many ways to do it. However, the purpose is to explore Graph theory. Give it a shot to see what you can do.

You run a post office and you have a certain number of destinations that you need to deliver to. However, each one has a certain cost associated with it. For example, if stop A and stop B are close by, it is better to go by A, then B rather than going to A, back to the post office and then to B. See if you can find the optimal route for a list of several delivery locations.

For a tougher challenge, create a list of destinations on a route not just for one truck, but optimize the algorithm to handle any number of trucks and find the fastest/most efficient route for a bunch of delivery trucks.

Is This A Good Question/Topic? 1
  • +

Replies To: [Competition] Function Challenge #3

#2 macosxnerd101  Icon User is online

  • Self-Trained Economist
  • member icon




Reputation: 10803
  • View blog
  • Posts: 40,264
  • Joined: 27-December 08

Re: [Competition] Function Challenge #3

Posted 18 January 2011 - 11:02 PM

My solution using Dijkstra's algorithm:

Was This Post Helpful? 1
  • +
  • -

#3 moobler  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 143
  • View blog
  • Posts: 224
  • Joined: 21-January 11

Re: [Competition] Function Challenge #3

Posted 24 January 2011 - 02:46 PM

This is the first challenge I'm posting to, so I don't really know the protocol...so the description's going in spoiler tags and my JAR (including the ugly, mostly uncommented source) is here: FunctionChallenge3.jar.

Spoiler

Was This Post Helpful? 1
  • +
  • -

Page 1 of 1