Prograph Based Analysis of Single Source Shortest Path Problems with Few Distinct Positive Lengths

— In this paper we propose an experimental study model 2 3 P S of a fast fully dynamic programming algorithm design technique in finite directed graphs with few distinct nonnegative real edge weights. The Bellman-Ford’s approach for shortest path problems has come out in various implementations. In this paper the approach once again is re-investigated with adjacency matrix selection in associate least running time. The model tests proposed algorithm against arbitrarily but positive valued weighted digraphs introducing notion of ograph Pr that speeds up finding the shortest path over previous implementations. Our experiments have established abstract results with the intention that the proposed algorithm can consistently dominate other existing algorithms for Single Source Shortest Path Problems. A comparison study is also shown among Dijkstra’s algorithm, Bellman-Ford algorithm, and our algorithm.


INTRODUCTION Computation of Shortest Path
) (SP is one of the most fundamental problems in graph theory.Both in operations research over and above theoretical computer science areas, the Single Source Shortest Path Problem ) (SSSPP is an extremely well-studied problem because of its broad applicability in a wide range of domains [1,2].The wide spectrum of its applications ranges from the routing problem in communication networks to robot motion planning, highway and power line engineering etc.Many optimization problems solved by dynamic programming or more complicated matrix searching techniques, such as the 0/1 knapsack problem, construction of optimal inscribed polygons, sequence alignment in molecular biology, length-limited Huffman coding etc, are expressed as shortest path problems.These also include scheduling problems such as critical path computation in PERT [3] charts.Moreover, the shortest-path problem as well has numerous variations such as the minimum weight problem, the quickest path problem etc.Our motivation for focusing on the algorithmic processes of these shortest path problems with few distinct edge lengths initiates from a problem that arises in social networks [1][2][3][4][5][6][7].The Shortest Path Problems ) (SPPs have been, and still is, investigated by many researchers and mathematicians.With the rapid advancements and developments in communication, computer science and transportation systems, more variants of the SPPs have appeared.Some of these are the traveling salesman problem, K-shortest paths, constrained shortest-path problem, multi-objective shortest path problem, network flow problems, and so forth including our key SSSPP [2, 4, 8].In this paper, we propose a model 2 3

P S
that provides an algorithm similar to classical Bellman-Ford procedure that solves SSSPP .The model is represented with a digraph with few positive real edge weights introducing

Graph ogram Pr or simply
ograph Pr [9,10] where each computation is performed at every node.The paper has been organized in the following sections.
• Representation of Weight Matrix.

• Conclusion.
The Bellman-Ford's approach for shortest path problems has come into practice with different tools.The approach in this paper is re-investigated with adjacency matrix selection in associate least running time.The proposed model ) (SPL from a given source (starting) vertex s to each other vertex v in G can be defined in (1) as: Here, . Therefore, SPL (also termed weight) of p is the sum of the weight of its constituent edges.Thus, ) , ( As a consequence, SPL from vertex s to v in G means any path p with weight, ) , ( )

III. NEGATIVE WEIGHT CYCLE
We assume that all vertices are reachable from s otherwise unreachable vertices can be deleted from G in a linear-time at preprocessing steps.In some instances of SSSPP , there may be edges whose weights are negative.If the graph G has either no negative-weight edges, or no reachable negative-weight cycles from s then V v ∈ ∀ , the ) , ( v s SPL remains well defined during computation even if it has a negative value; otherwise SPLs are not well defined.No path from s to a vertex on the cycle in this case can be a shortest path and a lesser-weight path can always be found that follows the proposed shortest path and then traverses the negative- weight cycle.If there is a negative-weight cycle on some path 1 exemplifies the effect of negative weights and negative-weight cycles on shortest path weights.Within each vertex its shortest-path weight from source s is shown.Vertices e and f appear in a negative-weight cycle reachable from s , so they have shortest-path weights of ∞ − .Because vertex g is reachable from a vertex whose shortest- path weight is ∞ − , it, too, has a shortest-path weight of ∞ − .Vertices h , i , and j are not reachable from s , and so their shortest-path weights are ∞ , even though they lie on a negative-weight cycle [1,8,11,13,14].

IV. WEIGHT MATRIX REPRESENTATION
Edge weights ) , ( j i W for the edges ) , ( j i can be interpreted as metrics (adjacency matrix, adjacency list etc) [8,11,15] other than distances.They are often used to represent time, cost, penalties, loss, or any other quantity that accumulates linearly along a path and that one wishes to minimize.In a weighted digraph G , W has been defined in (3)  using adjacency matrix description of G as: Consider a digraph shown in Figure 2.

www.etasr.com Bhowmik and ag Chowdhury: Prograph Based Analysis of SSSPPs with Few Distinct Positive Lengths
1 assuming this SPL contains at most 1 − k edges and there are no cycles of negative length possible.
Both Figure 3 and Figure 4 [17,18] in sections VI and VII respectively give an idea about the above discussion.Fig. 3.
How an edge enters the solution Thus, the above observations could be a symbol of the following recurrence relation for SPL .
VI. VARIANTS A number of variations are possible depending on the type of network and costs involved, and source/destination pairs of vertices (nodes) for which we need solution [4,8,11,19].
• Cyclic or Acyclic problems -Graph with at least one cycle.Otherwise, acyclic.
• on-negative or egative distance problems -If the distances (edge weights) are non-negative or if there is at least one negative distance.

•
on-negative cyclic or egative cyclic problemscyclic problems with non-negative length of all cycles or with at least one cycle has negative length.
• Sparse or Dense network problem -A network with m , number of edges, closer to 2  n ( n is the number of nodes) is a dense network.
• Single-source shortest path problemshortest paths from a source vertex s to all other vertices in the graph.
• All-pairs shortest path problemshortest paths between every pair of vertices v , ' v in the graph.
• Single destination shortest path problemshortest paths from all vertices in the graph to a single destination vertex d .
Thus, a problem of finding a shortest path in many network as well as transportation related problems may arise as a main decision question or as a step in some situation.

VII. PROPOSED WORK
The literature on the SSSPP is large, since computing shortest paths in a given graph (both directed and undirected) can be done in various ways.For example, consider   [13].The algorithm maintains n partitions at most of the n vertices.Each partition consists of each vertex v and its corresponding adjacent vertices.Each partition acts as respective node of our ograph Pr with node s as its root.Still, these n partitions can be sub-grouped into three states: • Unlabeled Vertices: those with infinite provisional costs.
• Labeled Vertices: those with finite provisional cost whose minimum cost is so far unknown.
• Scanned Vertices: those whose minimum cost is known.
We start with s as labeled root node and all other vertices are as unlabeled.The Prograph Based Shortest Path Algorithm named as () _ _ Pr Path Shortest ograph described below executes comparable to Bellman-Ford approach to some extent.
A variety of methods and algorithms are available for the solution of SSSPPs depending on the nature of specific problem [19].Because of the nature of our problem, the algorithm suggested in this paper consists of the following steps and repeats till all vertices are scanned: is stopped.This checking is done Z (a constant) times.This Z naturally is reasonably a very small non-negative integer number.Generally Z is 2. ( 6) Reachable tentative path lengths from source vertex s to other vertices v are computed through lines 21 -43.These relaxations will be continued till Y X = .
Thus, overall running time complexity of the algorithm executes in Θ(Z|V||E|) time.Since Z is a constant and has numerical value 2 in general, thus the proposed algorithm runs in Θ(|V||E|) time.

VIII. EXPERIMENTAL RESULTS
In this section we will now look at an example of how our suggested algorithm works on a weighted digraph shown in Figure 5 to solve SSSPP in optimal way with ograph Pr  When there are no cycles of negative length, we know that there is a shortest path between two vertices.The digraph in  Suppose, 1 V s = , the first vertex (source of journey) is appeared in SPL .We follow the convention vertex i V simply as vertex i .So, path length for s is 0 For simplicity, we need to have SPL from this s to remaining vertices.Typical initial configuration of the ograph Pr would look like as Figure 6.Similarly, it is applicable to other nodes.However, each node each is related in top-down manner.Tentative path length value of a vertex in a node of the ograph Pr will be treated with its present value in next node if the vertex appears.But source vertex s would not be appeared as adjacent of the current

www.etasr.com Bhowmik and ag Chowdhury: Prograph Based Analysis of SSSPPs with Few Distinct Positive Lengths
vertex in current node.Following iterations give details how to compute SPL from s through Relaxation [8] of edges in E .
abstract results with the intention that the proposed algorithm can consistently dominate other existing algorithms for the underlying problem.A comparison study is shown among Dijkstra's algorithm, Bellman-Ford algorithm and our algorithm.II.STATEMENT OF PROBLEM Let us consider a weighted directed graph vertex set V of size n , edge (or simply arc) set E of size m , and weight function R E W → : assigning a real valued weight (cost) to each edge in G .Then, a directed Shortest Path Length

Fig. 2 .
Fig. 2.Digraph without any self loop and negative weight

Figure 4 [
18].It shows how an intermediate vertex V k ∈ enters into a tentative solution of shortest path from a source vertex s to target vertex v .As one of the fundamental problems, finding SPL is still an important field of research in computer science.

Fig. 4 .
Fig. 4.Various ways to compute shortest path from source

.
www.etasr.comBhowmik and ag Chowdhury: Prograph Based Analysis of SSSPPs with Few Distinct Positive LengthsComplexity Analysis: The running time complexity of the analyzed in the following ways:(1) The number of edges E with non-negative weight can be found in Ω(|E|) time.(2) Lines 3 -5 enqueue source and terminal vertices in two lists needed for Relaxation[8] and needs Ω(|E|) time.(3) Lines 6 -12 compute number of nodes M which are to be in our ograph Pr .This can also be computed in Ω(|E|) time.(4) Now, M ≤ |V|, before relaxation of edges, all the vertices are assumed to have unknown cost (shortest path reachable from source) with reachable path length of source vertex s These initializations necessitate Ω(|V|) time.(5) Whenever two consecutive instances of the ograph Pr of the underlying problem are identical, relaxation

Figure 5
Figure 5 contains 5 = = V n vertices.So, a SPL between any vertices has at most 1 − n edges on it.The proposed algorithm during execution examines updating SPL on the cost matrix W constructed in Table II along with its reflection

Fig. 6 .
Fig. 6.Initial arrangement of Prograph for SPL from vertex 1Node 1 consists of source vertex s and its adjacent vertices.

Fig. 12 .
Fig. 12. Shortest Path Length from Vertex V1 to Others in Iteration I

Fig. 13 .
Fig. 13.Shortest Path Length from Vertex V1 to Others Fig. 5 Every node ) : ( c i in Figure 13 represents a nodeV i i ≤ ≤ 1 ,and its associated cost say c ) . .( SPL e i from s .

TABLE I .
ADJACENCY MATRIX OF THE GRAPH SHOWN IN FIGURE 2 V. MATHEMATICAL INTERPRETATION Shortest-paths algorithms typically rely on the property that a shortest path between two vertices contains other shortest paths within it.

TABLE II .
ADJACENCY MATRIX OF THE GRAPH SHOWN INFIGURE 5