What is the generic algorithm for finding delta(s,v) for all v’s?
Init:
loop:
end:
Lower bound claim
All along the run of the algorithm, for all v, the inequality: d(v)>=delta(s,v) is satisfied, and if d(v)
proof that claim.
Using induction on the number of Relax operations
What is the correctness statement for the generic algorithm?
If through the run of the algorithm, for every edge (u,v), d(v)<=d(u)+w(u,v) is satisfied(that is, the algorith, stops), then, for every v, d(v)=delta(s,v).
What is the correctness statement proof for the generic algorithm, in case it stops?
What is the “full” correctness statement of the generic algorithm?

What is the exact definition of
rooted tree in vertex s
Directed graph is called rooted tree in vertex s if every vertex in the graph is accessible from s, and it is accessible only via one path
Which data structure can help us maintain a rooted tree in vertex s?
It can be maintaind via array of length |V|
“lightest paths tree T for graph G and source s”
what is it?
It is a rooted tree in vertex s which satisfies:
for every v, the only path from s to v in T is the lightest path from s to v in G.
General algorithm, what claims are used in order to prove the correctness statement?

Generic algorithm, how the first claim is proved?
General algorithm, proof for the 2nd claim.
What is the induction based on
It is based on the size of V’. That is, |V’|.
Genereal algorithm, proof of the 2nd claim.
What is the base case for the induction proof?
That is:
Trivial.
Generic algorithm, proof of the 2nd claim.
What is the proof for the step phase of the induction?
According to the 1st claim: d(v)=delta(s,v) means:
Proof: T is a tree.
proof: T is a shortest paths tree from s
Generic algorithm, what is the proof for the correctness statement, using the claims.
Dijstra, which graphs can it handle?
Directed or undirected graphs with non-negative weights.
Dijstra, which problem can it solve?
Finding the shortest paths from source s to all vertices.
_Dijstra, write exactly the Relax(u,v,w(u,v)) procedure_

Dijstra, show me the initilization step.
You are given G=(V,E),s,w

Dijstra, what is the loop step in the algorithm?

How is Dijkstra’s algorithm implemented?
what’s his run-time? divide it to operation on Q and operations on the array d
In total: O(|E| log|V|)
Dijkstra, what is the lower bound claim?
d(v)>=delta(s,v)
That is, d(v) is always greater equal to the value of the lightest path.
Dijkstra, What is the correctness statement?
When the algorithm is done, for all v, d(v)=delta(s,v)
Once vertex u is being added to S, d(u) does not change.
Explanation: