If each edge of a graph $G$ is unweighted or has equal weights, then the shortest path between two nodes in that graph is the path that contains the fewest number of edges. Such a path can be obtained by BFS. Here, i consider that each weight of the edge is the minimum of the end vertices and the weight of the path is the sum of the edges weights divided by the number of edges on the path. I am unable to use BFS for such algoritm. Please suggest me a suitable known algorithm to solve such problem. I would also prefer to know if i can use suitable programming codes in C++ to solve such problem? The following problem is solved manually, but i wish to solve it by using some known algorithm or, programming codes. I am new to C programming as well as to this site, so if my question off-topic, then please refer me an appropriate site. Thank you,
Note 1 The above problem is solved just manually. Instead, i want to use suitable known algorithm or programming codes in C++ to solve this problem. I have just installed Dev-C++ to try. Note 2 Here, the graph $G$ is complete (except the edge $(0, 6)$ being removed) having $0$ as the source vertex and $6$ as the target vertex.