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 divided by the number of edges on the path.
I am unable to use BFS for such algorithm. Please suggest me a suitable known algorithm to solve such problem. The following problem is solved manually, but I wish to solve it by using some known algorithm.