2 Replies - 999 Views - Last Post: 04 April 2010 - 09:22 AM

#1 guveni   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 27-March 10

is spanning tree?

Posted 03 April 2010 - 02:06 AM

hi,
I stuck in one problem and I couldn't verify if my solution is the best solution.
The problem is ;
two postman should deliver the items between cities in min time. at first look, it seems to be travelling salesman problem.however, in this problem there is two postman and items can be picked from only one city and delivered to only another city.And postmen can carry only one item at one delivery time.
For ex; we have cities named a,b,c,d,e,f. and we have two cargos to be delivered from b to c and from e to f .And all postmen should come back to their start city.We know the time costs to go from one city to another .
I am thinking to construct a spanning tree and keep time in a matrix array.However, I couldn't be sure how the missions should be shared properly(for the sake of minimum time).

Is there any suggestion for the problem?or Is this the best solution?

thanks in advance;

Is This A Good Question/Topic? 0
  • +

Replies To: is spanning tree?

#2 Gloin   User is offline

  • Expert Schmexpert...
  • member icon

Reputation: 235
  • View blog
  • Posts: 4,489
  • Joined: 04-August 08

Re: is spanning tree?

Posted 04 April 2010 - 09:04 AM

Are there roads between all cities or what does the graph representation look like. Still sounds like TSP to me but maybe under some circumstances you can simplify the problem?!
Was This Post Helpful? 0
  • +
  • -

#3 Galois   User is offline

  • D.I.C Head

Reputation: 28
  • View blog
  • Posts: 207
  • Joined: 27-March 10

Re: is spanning tree?

Posted 04 April 2010 - 09:22 AM

Attack it like you would attack a TSP problem - just brute force your way with permutations. However, since there are certain conditions, some permutations can be eliminated immediately without having to check them. Using your example, any permutation that does not have point c following b can be ignored, since you know that in the fastest route, postman will go to b, and carry the letter straight to c. The same thing can be said about points e and f.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1