I have a simple graphing problem where I traverse a graph looking for an item. Each node in the graph has a probability n/100 of the item being there, where the sum of all the probabilities equals 1. How can I find the minimum expected time to search for the item in the entire graph?
The item is guaranteed to exist in only one node.
At first glance it seems like a traveling sales person problem and that is simple. Just get the permutations of the the paths and calculate the path for each and return the minimum.
But then it gets tricky when I need to find the minimum expected time. Is there any mathimatical formula that I could plug in on the minimal path to get the result?
ie: sum = 0
for node in path:
sum += node.prob * node.weight
Or is there something more complicated that needs to be done?