# graphs and networks – All the shortest paths: argument 1 is not a valid vertex error

I run the following code to generate all the shortest paths:

``````g = graph[{"a" -> "b", "b" -> "c", "d" -> "b"}];

GraphPlot[g, VertexLabeling -> True]

s = VertexIndex[g, "a"]
t = VertexIndex[g, "c"]

Value of the property[{g, s}, "ShortestPaths"] = {{s}};
Value of the property[{g, s}, "Distance"] = 0;

découvrirFun[u_, v_, d_] : =
Yes[u != v,
PropertyValue[{g, u}, "ShortestPaths"] =
Table[Append[p, u], {p, PropertyValue[{g, v}, "ShortestPaths"]}];
Value of the property[{g, u}, "Distance"] = d]redécouvrirFun[u_, v_] : =
Yes[Valeurdelapropriété[PropertyValue[Valeurdelapropriété[PropertyValue[{g, u}, "Distance"] ==
Value of the property[{g, v}, "Distance"] +1
Value of the property[{g, u}, "ShortestPaths"] =
Join[Valeurdelapropriété[PropertyValue[Valeurdelapropriété[PropertyValue[{g, u}, "ShortestPaths"],
Table[Append[p, u], {p, PropertyValue[{g, v}, "ShortestPaths"]}]]]LargeurAvantScan[g,
s, {"DiscoverVertex" -> discoverFun,
"VisitedVertex" -> rediscoverFun,
"UnvisitedVertex" -> rediscoverFun}];
``````

This produces the following error: BreadthFirstScan :: inv: argument 1 in BreadthFirstScan[Graphic[[Graph[[Graphique[[Graph[<4>, <3>], 1, {DiscoverVertex -> discoverFun, VisitedVertex -> <<12>> n, UnvisitedVertex -> rediscoverFun}]is not a valid vertex.

BreadthFirstScan is not it designed to run on top indexes?