procedure output_path(graph G, integer pred[ ], integer s, integer v) // Fehler: v nicht erreichbar if pred[v]==0 then output("v nicht erreichbar"); return fi // Induktionsanfang if s==v then output(v); return; fi // Induktionsschritt output_path(G,pred,s,pred[v]); // Pfad bis zum Vorgänger ausgeben output(v); // dann v ausgeben end