From: Axel Etzold Date: 2007-07-11T23:34:38+09:00 Subject: Re: recurring search too complex for me Dear Josselin, if I understand you correctly, you are looking for are solution to a path-finding problem in a graph - so Dijkstra's algorithm can do this for you. There is a nice example of finding a shortest path between several cities illustrating how the algorithm works here: http://fr.wikipedia.org/wiki/Algorithme_de_Dijkstra (unfortunately, the English wikipedia doesn't have this example, but from your email address I assume you read French anyway). You can find an implementation of Dijkstra's algorithm, as well as many other graph algorithms, here: http://gratr.rubyforge.org/ Best regards, Axel -- GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS. Alle Infos und kostenlose Anmeldung: http://www.gmx.net/de/go/freemail