


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
The concept of reducibility in graph theory and how it can be used to solve new problems by reducing them to known problems. The document also covers the application of this concept to the problem of finding the shortest path in a communication network with loss probabilities. How to convert the problem into a sum using logs and then uses the floyd-warshall algorithm to find the shortest path. The document also provides a proof of the correctness of the floyd-warshall algorithm.
Typology: Study notes
1 / 4
This page cannot be seen from the preview
Don't miss anything!



Reduction is used to reduce a given problem to a known problem. Say we have an efficient algorithm, say A, that has complexity O(n^2 ). If we know of a reduction for a new problem in space and time O(klogk) where k is the size of the new problem, then we can solve it in time O((klogk)^2 ) + O(klogk), which has the asymptotic complexity of O((klogk)^2 ). Point to be taken: Strive to cast a new problem in terms of one you know and can solve efficiently.
Consider a communication network with loss probabilities along edges. The first thing we do is convert all loss probablities to success probabilities. This is because a packet being lost along an edge ⇒ the packet is lost along any path that starts from its destination vertex. Probability of successful transmission =
e∈E (1 - Pe).^ The problem: Given u, v find a sequence u = u 0 , u 1 ,... uk = v that maximizes
∏k i=1(1 - P(ui− 1 , ui). Remember that ∀ u, v ∈ V, P(u, v) ∈ [0, 1]. Convert the product into a sum using log. Transformed problem,
maximize log
∏^ k
i=
(1 − P (ui− 1 , ui))
maximize
∑^ k
i=
log(1 − P (ui− 1 , ui))
Since the Shortest Path (SP) algorithm computes the shortest path by minimizing the sum of the weights, invert the sign of log(1 - P(ui− 1 , ui)). The problem then becomes,
minimize
∑^ k
i=
− log(1 − P (ui− 1 , ui))
The terms above will always be positive, since the domain of the log function is in the range (0, 1]. So, set w(r, s), where (r, s) ∈ the set of edges to - log(1 - P(ui− 1 , ui)) and solve using SP. Note: In the above discussion, for paths that don’t exist set the loss probability to 1. Interesting note on logs: In general sums are better than products. Even from the way we have been taught multiplication and addition in school, multiplication is quadratic whereas addition is linear. So, when you have products, try to convert them into sums. logs are very useful in this regard.
Proof that the algorithm computes the shortest path between any two vertices i and j. Note that the refinement step in the algorithm, where we check for a lower cost path between any two vertices i and j is given by,
dk+1(i, j) = min{dk(i, j), dk(i, k + 1) + dk(k + 1, j)} Proof: We know that d 0 (i, j) = w(i, j). Assume that dk(i, j) computes minimum paths. At step k+1, there are two cases to consider, Use the node k+1, since there is a path from i to k+1 and from k+1 to j, which has a total cost less than dk(i, j). In this case, since all nodes along the paths (i, k+1) and (k+1, j) are below k+1, by induction hypothesis, paths (i, k+1) and (k+1, j) are each minimal paths. Hence, their concatenation is a minimum path. If we don’t use the node at k+1, then dk+1(i, j) = dk(i, j) which again by induction hypothesis is minimal.
Let d be a function that maps each vertex with a real number. So, d: V → R. Now,
BF (v, d) = min{d(v), minu∈V (w(v, u) + d(u))} We consider two versions of the algorithm. The Stratified version and the in-place version (optimized) version.
This algorithm is not asymptotically better than the Stratified algorithm but is never worse than the Stratified algorithm. There are two ways of proving the correctness of this algorithm. One is by taking it by its horns and determining an inductive assertion that states what d(r) means when the outer loop is at k and the inner loop is at u. This gets very complex. There is a simpler way. Proof: Inductive assertion - There are two parts to our assertion. The first is d(u) ≤ dk+1(u), ∀ u, k. The second, d(u) ≥ SP(u), where SP stands for Shortest Path. We base our induction on the number of assignments to d(u). For the first part, dk+1(u) := BF(u, dk) and d(u) := BF(u, d). By our induction hypothesis, ∀v: d(v) ≤ dk(v). Therefore, BF(u, d) ≤ BF(u, dk). Hence, d(u) ≤ dk+1(u). d(u) always computes a value that is at most what the Stratified BF would have computed at step k+1. For the second part, the base case holds since d(u) is either 0 or +∞. We need to prove that d(u) is always at least the shortest path only when we update it. On an update, d(u) = d(v) + w(v, u) for some v. Now, by our induction hypothesis d(v) ≥ SP(v). Adding the weight of an edge (v, u) maintains the inequality. It can at best make the update to d(u) the same as SP(u). Therefore, d(u) ≥ SP(u). Note: In this case, there has to be an edge from v to u, that caused the update to d(u). This edge is called the witness edge that caused the update.