# Shortest path with limited number of edges used

*From*: Daniel Kraft <d@xxxxxxxx>*Date*: Wed, 16 Jul 2008 15:30:40 +0200

Hi,

I'm looking for an algorithm to find the shortest path between to nodes in a graph *consistig of <= k edges*. If that helps, the graph I'm working with is fully connected, and k will be about 2--10 or so, so nothing really large.

I thought about using Dijkstra's and if it is possible to adapt it to my constraint; maybe saving for each node not only the distance from the start during the run, but the distances to the start for 0..k edges or something like that, but couldn't yet figure it out fully.

Does already such an algorithm exist? I'm quite sure it does...

Thank you very much,

Daniel

--

Done: Arc-Bar-Sam-Val-Wiz, Dwa-Elf-Gno-Hum-Orc, Law-Neu-Cha, Fem-Mal

Underway: Cav-Dwa-Law-Fem

To go: Cav-Hea-Kni-Mon-Pri-Ran-Rog-Tou

.

**Follow-Ups**:**Re: Shortest path with limited number of edges used***From:*Thad Smith

- Prev by Date:
**Re: reg learning proper level of thinking/communication for a software project** - Next by Date:
**Fastest method to get positions of all the 'On' bits** - Previous by thread:
**Info/books on shared libraries in Unix** - Next by thread:
**Re: Shortest path with limited number of edges used** - Index(es):