User:Hadis.Knj/SBPT

The Shortest Best Path Tree algorithm (also known as SBPT) is a graph search algorithm that creates and maintains dynamic multicast trees. The SBPT algorithm intends to maximize the bandwidth shared by several users and at the same time guarantees that the path connecting a user node to the sender is the shortest path.

The bandwidth consumption reduction is done by exploiting partial paths that are created for other multicast users. The SBPT creates such partial paths when there are multiple shortest paths.

Simulation experiments shows that utilizing SBPT algorithm results in 5% to 17% more bandwidth reduction compared to other SPT (Shortest Path Tree) algorithms when the number of involved users in the multicast tree is greater that 25% and these users always achieve the same shortest path lengths.

Algorithm
Given a connected, undirected graph G, a shortest path tree rooted at node S is a spanning tree T of G, such that the path from S to any other node V in T has the lowest path length (distance, hop count, or weight) called the shortest path.

In graph G, we have two different nodes to consider:
 * 1) A Joining node that is about to be connected to the sender.
 * 2) A Neighbor node that is either receiving the stream from the sender or not receiving any stream but is on a path that is already created from the sender to the receiver node.

Suppose we have n nodes in the graph and also assume there is an order in traversing nodes (e.g: from V1 to Vn). For node Vi, If there is only one shortest path from this node to the sender, we use this shortest path to connect the node to the sender. Otherwise, if there is more than one shortest path from node Vi to the sender (e.g two different paths from node Vi to the sender with the same hop-count or length), we take the nearest neighbor of Vi. If this node (e.g Vk) is on one of the Vi 's shortest paths, therefore Vi is connected to the sender by the shortest path through Vk, But if Vk is not on one of the Vi 's shortest paths, we skip to the next nearest neighbor of Vi until we find a node that is on one of Vi 's shortest paths to the sender.

Example
Suppose we have a multicast tree as shown in Figure 1. The number adjacent to each edge is a representation of a hop count and except for the root of the tree, each other node is a receiver node.

Assume each hop consumes one unit of bandwidth. Also assume the order of traversing the multicast tree as followings:

V1, V2, V13, V9, V10, V12 ,V11 ,V8 ,V6 ,V7 ,V4, V3, and V5

We also define:
 * Btotal is the total amount of consumed bandwidth by a multicast tree for a multicast session at a given time.
 * Ptotal is the total path length (sum of the hops) from the sender to the receiver nodes.

The resulting multicast tree by SBPT algorithm is created as followings:

First, node V1 has only one shortest path to the sender through node V2. Node V2 also has only one shortest path connected directly to the sender. Nodes V13, V9, V10, V11, and V12 have the same situation and they all have only one shortest path to the sender. Therefore, their connections to the sender is their shortest paths. Node V8 has three different shortest paths with length 12 to the sender. The closest neighbor to V8 is V11 and also V11 is on one of the V8 's shortest path, so V8 is connected to the sender through V11. For node V7, V8 is its nearest neighbor, but V8 is not on one of V7 's shortest path to the sender. The closest neighbor of V7 that is on V7 's shortest path is V2. Node V6 has itself as a neighbor node on its shortest path (e.g D(v6,v6) = 0), therefore it uses the shortest path established by V7 through V2. Node V4 has V6 as its closest neighbor which is also on one of its shortest paths. Node V3 has the same situation as V6. Finally, node V5 has only one shortest path connected directly to the sender.

The resulting multicast tree is shown in Figure 2 and this tree has Btotal = 41 and Ptotal = 90.

Pseudocode
Let M(i,s) be the shortest distance from node i to a sender s and D(j,i) be the distance of the shortest path between any two nodes.

The SBPT algorithm takes three inputs:
 * The ID of the joining node, j
 * The ID of the sender node, s
 * The Directed graph, G

1 procedure SBPT algorithm(j,s,G): 2   NearestDistance = ∞ Apply an SPT algorithm to graph G with j as     its root to determine the shortest distance from j to each node v ∈ G and store the shortest distance for each v in D(j,v) 3   for all i ∈ v 4       if (i is neighbor of j) then 6           if (M(j,s) == D(j,i) + M(i,s) then 7                if (D(j,i) < NearestDistance) then 8                    NearestDistance = D(j,i) 9                    NearestNeighbor = i 10               end if 11           end if 12       end if 13   end for 14   Establish shortest path between j and i 15   End of SBPT

Related algorithms
The two well known algorithms to find the shortest path from a single source vertex to all of the other vertices in a graph are: Dijkstra's_algorithm and Bellman–Ford_algorithm.

In order to construct a shortest path tree in a connected graph G, with no negative-length cycles, we can use the following algorithm: This tie-breaking rule is needed to prevent loops when there exist zero-length cycles.
 * 1) Compute D(s,v), the shortest path distance from root "s" to vertex "v" in "G" using Dijkstra's algorithm or Bellman-Ford algorithm.
 * 2) For all non-root vertices "v", we can assign to "v", a parent vertex "Pv" such that "Pv" is connected to "v", and "D(s,P v)  + edge_dist(Pv,v) = D(s,v)". If there are multiple choices for "Pv", pick "Pv" for which there exists a shortest path from "v" to "Pv" with as few edges as possible.
 * 1) Construct the shortest path tree using the edges between each node and its parent.

The above algorithm guarantees the existence of shortest path trees. Like minimum spanning trees, shortest path trees in general are not unique.

There are also Heuristic algorithms to find a multicast tree with minimized total path cost, but due to their high algorithm complexity, routing algorithms based on heuristic algorithms are not popular in practice.

We can also use the Greedy algorithm (see ) to solve SPT problem. The Greedy algorithm tries to share paths to maximize the bandwidth sharing. This task is done by developing a multicast tree by connecting each new node to its closes multicast receiver node that has been already connected to the sender in current multicast session. The problem with Greedy algorithm is that it does not consider path distance for each receiver node, which creates a multicast tree with longer path distance than that of the SPT algorithm.

It's actually the trade-off between minimized path lengths created by SPT algorithm and maximized bandwidth sharing created by the Greedy algorithm that SBPT algorithm solves. The SBPT algorithm uses partial paths already created by other multicast receiver nodes and multiple shortest paths between a receiver node and the sender to guarantee the path length to be the same as SPT algorithm and at the same time reduces bandwidth consumption.

Time Complexity
In line 2 of SBPT algorithm takes $$O(n^2)$$ time to determine Shortest Path to each node ( using Bellman-Ford Algorithm) where $$n$$ is the number of receiver nodes. Algorithm also should determine shortest distance of located a joining node’s neighbors. This operation takes $$O(n^2)$$ time.(same as Greedy Algorithm) In line 3 of algorithm, the number of located neighbors is at most $$n$$, thus, it take $$O(n)$$ time to decide a joining node’s connecting point. Overall, total cost of algorithm is $$ O(n^2 +n^2+ n) $$, and we can say time complexity of algorithm is $$O(n^2)$$.

Proof of Correctness
SBPT algorithm use partially established path of other receivers to minimize bandwidth consumption. To find such paths, algorithm use two variable M and D. M is the length of partial path and D is the length of new path to reach partial path. by using these variable, algorithm solves the trade-off problem between bandwidth consumption and shortest path length in SPT and greedy algorithms.

Based on Random Network models proposed on and results from experiments shown in, the following observations are perceived:
 * 1) When network utilization is not not high, the SBPT algorithm represent the same Shortest Path Length same as SPT Algorithm with least Bandwidth Consumption among other related algorithm (SPT and Greedy algorithms).
 * 2) With high network utilization, SBPT Algorithm works better than SPT with less Bandwidth consumption, however, in comparison to greedy algorithm, SBPT algorithm consume more bandwidth (4%to 6%) but  shorter path length (9% to 24%).
 * 3) When network utilization is very low, the SBPT algorithm is equal to the result of SPT Algorithm. But, greedy approach is very inefficient.
 * 4) Algorithm performance depends on average network utilization.