Finding shortest / cheapest paths in a dense graph