I’m trying to find an algorithm that from a given vertex u and a given weight w finds a circular path of weight w starting and ending at vertex u.
My first idea was to apply Floyd-Warshall algorithm then make a random walk from vertex u until I find a vertex v from which the sum of the weight of the random walk and the weight of the shortest path between u and v equals w.
The problem is : I’m not sure to find a path with this algorithm.
Do you have any other ideas ?