Please verify that the error is present in the most recent revision before reporting.
Yes, I believe so as of the June 2019 version.
Chapter number or note title: Section 9.8 on Floyd-Warshall
Page number: 319
Error description: Not all dist[u,v] are initialized, because w(u->v) had only been previously defined as either the weight of an edge (u,v) (if it exists) or as 0 when u==v. (I may have overlooked an overload that w(u->v)=infinity otherwise, though, in which case it wouldn't hurt to make that explicit, as the previously listed algorithms had.)
Suggested fix (if any): The two algorithms on page 319 probably ought to initialize dist[u,v] as infinity, for those (u,v) that are not edges in the graph, and where u!=v. (Or, to be concise, point out that w(v->v)=0 and w(u->v)=inf when (u,v) is not an edge and u!=v.)
Here I've typed -> where what I really mean is →, because that's how I do.
Please verify that the error is present in the most recent revision before reporting.
Yes, I believe so as of the June 2019 version.
Chapter number or note title: Section 9.8 on Floyd-Warshall
Page number: 319
Error description: Not all
dist[u,v]
are initialized, becausew(u->v)
had only been previously defined as either the weight of an edge(u,v)
(if it exists) or as 0 whenu==v
. (I may have overlooked an overload thatw(u->v)=infinity
otherwise, though, in which case it wouldn't hurt to make that explicit, as the previously listed algorithms had.)Suggested fix (if any): The two algorithms on page 319 probably ought to initialize
dist[u,v]
as infinity, for those(u,v)
that are not edges in the graph, and whereu!=v
. (Or, to be concise, point out thatw(v->v)=0
andw(u->v)=inf
when(u,v)
is not an edge andu!=v
.)Here I've typed
->
where what I really mean is →, because that's how I do.