Context
I have a graph $G=(V,E)$ with weighted edges, all weights are positive integers $w(e)\in\mathbb{N}\setminus\{0\}$. The weights represent the popularity/count of each edge, for example $w(e) = 22$ means that amongst all edges the edge $e$ was visited $22$ times.
Approach
Given two vertices $v,v'$ in $G$, how can I find the "most popular path" ? Knowing the fact finding the max weight path in cyclic directed graph is NP-hard, I changed my approach in the following way:
- Normalize the weights to have probabilities $p(e) = \dfrac{w(e)}{Z_w}$ with $Z_w = \sum_{e\in E} w(e)$
- Set the cost of a path $P = (e_1,e_2,\dots, e_n)$ as a decreasing function of the product of probabilities $\prod_{i=1}^n p(e_i)$,
for example use the Negative Log Likelihood $\ell(P) = -\sum_{i=1}^n\log p(e_i)$ - Use a shortest path algorithm which minimizes the NLL of a path between $v,v'$ to approximate the most popular path. This can be done via setting new weights $\tilde{w}(e) = -\log w(e) + \log Z_w$
Question
Is this approach at least partially correct? Can I trust its results? I will conduct a statistical experiment (on random graphs) later today and post results. Any contribution is appreciated!