351 views
0 votes
0 votes

I have a small doubt.

Chapter 25 All pairs shortest path of CLRS says following:

To solve the all-pairs shortest-paths problem on an input adjacency matrix, we need to compute not only the shortest-path weights but also a predecessor matrix $\Pi=(\pi_{ij})$, where $\pi_{ij}$ is $\text{NIL}$ if either $i=j$ or there is no path from $i$ to $j$, and otherwise $\pi_{ij}$ is the predecessor of $j$ on some shortest path from $i$. The subgraph induced by the $i$ th row of the $\Pi$ matrix should be a shortest-paths tree with root $i$. For each vertex $i\in V$, we define the predecessor subgraph of $G$ for $i$ as $G_{\pi,i}=(V_{\pi,i},E_{\pi,i})$, where

$V_{\pi,i}=\{j\in V:\pi_{ij}\neq \text{NIL}\}\cup \{i\}$

and 

$E_{\pi,i}=\{(\pi_{i,j},j):j\in V_{\pi,i}-\{i\}\}$

My doubt is, isnt both things (shortest-paths tree with root $i$ and predecessor subgraph of $G$ for $i$) the same?

Please log in or register to answer this question.

Related questions

0 votes
0 votes
0 answers
2
Vaishnavi01 asked Nov 19, 2018
306 views
1 votes
1 votes
3 answers
4