I know this is probably very basic, I just can't wrap my head around it.
We recently studied about Dijkstra's algorithm for finding the shortest path between two vertices on a weighted graph.
My professor said this algorithm will not work on a graph with negative edges, so I tried to figure out what could be wrong with shifting all the edges weights by a positive number, so that they all be positive, when the input graph has negative edges in it.
For example, let's consider the following input graph:
Now if I'll add 3 to all edges, it's obvious that the shortest path (between $s$ and $t$) has changed:
Thus this kind of operation might result in wrong output.
And this, basically, what I don't get. Why does this happen? Why is shifting the values has such a dramatic effect on the shortest path? This is totally counter-intuitive, at least for me.
Your thoughts?