Re: shortest path with constraints that some nodes can not be on the same pth



But there could be many such constraints. Actually every node is constrained
with some other nodes. So there would be no nodes left.

<almeidaraf@xxxxxxxxx> wrote in message
news:1119020440.943294.276130@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> It's just an idea. Can't you just remove all the vertices that can't be
> together and try to find the shortest path without them, then include
> one and remove all the others, and then change the vertex that is
> included. That would be O(n) so i think you wouldn't be turning your
> algorithm in exponential one that way.
>
> example
> you have v1, v2, v3, v4, v5, v6
> v2, v3 and v5 can't be together and you have to find the shortest path
> from v1 to v6.
> You remove from your graph v2, v3 and v5 and try to calculate the
> shortest path, if there's one. Then you add v2 to your graph and
> calculate it again, then you remove v2 and add v3 and calculate the
> shortest path and then do the same thing with v5. Now you can compare
> the paths and keep the one that's the smallest one.
>
> You can find the shortest path with that dijkstra algorithm, you
> probably know that already.
>


.



Relevant Pages

  • Re: shortest path with constraints that some nodes can not be on the same pth
    ... v3 and v5 can't be together and you have to find the shortest path ... Now you can compare ... You can find the shortest path with that dijkstra algorithm, ... Prev by Date: ...
    (comp.theory)
  • Re: dijkstra algorithm
    ... can anybody give me the c-code of dijkstra algorithm which is a ... method of finding the shortest path in a graph ...
    (comp.lang.c)
  • Re: Finding the Best Path
    ... On 29 ene, 10:20, David Damerell ... method for finding the shortest path between two points. ... Are you saying that using the Dijkstra algorithm the resulting path ...
    (rec.games.roguelike.development)
  • Re: Finding the Best Path
    ... On 29 ene, 13:36, David Damerell ... Are you saying that using the Dijkstra algorithm the resulting path ... shortest path with the "lowest cost". ...
    (rec.games.roguelike.development)
  • Re: [RFC] VM: I have a dream...
    ... >>> linear address space? ... >Why would you think that the shortest path between two points is ... Please read the FAQ at http://www.tux.org/lkml/ ... Prev by Date: ...
    (Linux-Kernel)