Graph Traversal with Changing Weights

830 Views Asked by At

Suppose I have a 2D grid of vertices, where every vertex $v_i$ has a weight $w_i$. Given a starting vertex $v_0$, I want to find the path of length $n$ which minimises the summation of weights along that path. Movements may only be made between adjacent vertices on the grid (i.e. up, down, left or right).

Now, the weights at time $t_0$ are known. However, the weights at time $t > t_0$ are unknown. All we know is that at every time step (every movement step in the grid), each weight is increased by a random variable drawn from a Gaussian distribution. So, if the weight for the $i^{th}$ vertex at time $j$ is $w_i^j$, then its weight at the next time step is $w_i^{j+1} = w_i^j + \mathcal{N}\sim(\mu, \sigma)$, where $\mu$ and $\sigma$ are the mean and standard deviation of this distribution.

If the weights were not changing, (or $\mu = 0$), then this could be solved exhaustively by listing all possible paths, and finding the one with the lowest summation of weights. However, given that these weights are changing, it is not known in advance which path will be the best. So, in essence, you want to minimise the "risk" associated with going along a particular path, such that the expected value of the "future cost" is minimum.

How can I solve this?

1

There are 1 best solutions below

0
On

The intuitive answer is to stay near the middle of the grid so you have the most opportunities to avoid costly vertices.

However, in general the answer on what path minimizes the expected cost of traversal depends on the way information regarding the weights becomes available which you do not specify.

If no information becomes available, you should just solve the problem using the initial weights and follow that path.

If the information about the weights is completely revealed at each time, you can solve the problem again using the updated weights until the next time step, and so on. Note that it is not useful to try to plan ahead as all you know is that - on average - every cost will just be $\mu$ greater after each time step.

If the case is something between the two extremes, i.e. partially observable, you might look at the Canadian traveller's problem. It is closely related to the type of problem you are asking about, and might give you an idea how to move forward.