It is necessary to find from the given vertex of the graph the shortest path through all the vertices of the given graph (without returning to the starting point, i.e. chain / path). It is assumed that the graph will be full oriented.
Such a task is the search for the Hamiltonian path, only taking into account that at each vertex you can return as many times as you like.
Maybe there are some modifications or ready-made solutions?
It will suit me as a fully disclosed answer, as well as a link to a source with material on the above topic or even a small hint: "which way to dig."