Running time: O(V*E)
Proof of correctness:
Let v be reachable from s, and let p = v 0, v 1, , v k , v 0 = s and v k = v ,
be a shortest path from s to v. Since p is a simple path, k<|V|.
We want to prove by induction for i=0,1,.,k that
Digital Signatures using RSA
suppose you didnt care about eavesdropper, but wanted to make sure no one
can forge a message to look like it came from you
(credit card or check transactions over the Internet)
The discussion for the
Let d(k)[i,j] be the weight of a shortest path from i to j whose intermediate
vertices are drawn from the set cfw_ 1, 2, 3, , k
If k=0, then d(0)[i,j]=w(i,j)
If k>0, then d(k)[i,j] is the minimum of d(k-1)[i,j] and d(k-1)[i,k]+d(k-1)[k,j]
1. Tractable and Intractable Computational Problems
So far in the course we have seen many problems that have polynomial-time solutions; that is, on a problem instance of size n, the running time T (n) = O(nk ) for
some k , with k typically small. For exa
Why is the second DFS run on GT?
consider vertex r with largest nish time
r is its own forefather: ( r ) =r
what are the other vertices in rs SCC?
any vertex that has r as the forefather, i.e. those that can reach r
but cannot reach any vertex with a nish
for each u in Q
while Q is not empty
for each v Adj [ u ]
if v Q and w(u,v)<key[v] then key[v]=w(u,v)
Running time: O(V+V lg V+E lg V)=O(E lg V)
In fact, every problem in NP can be reduced to CIRCUIT SAT.
Denition of NP completeness
A problem Q is NP-complete if it is in NP and
every problem in NP can be reduced to Q.
CIRCUIT SATISFIABILITY is NP-complete.
So are all the other problems weve discus