This entry was posted on Sunday, December 26th, 2010 at 10:23 pm and is filed under Assignment. You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.
Does the source node remain the same for every student? And what does “4 4 2” mean at example 1, the last line? We already have 6 edges as mention in the first line. Does a node have a weight value? Thank you
Which would be the correct response for Example no. 2 if we don’t have any link edge between the source node and the destination node? Practically from the node 2 it is impossible to reach node 1, so the distance would be infinity. How would it be represented as correct answer on line 2? (0, INFINITY as string) Thank you.
Because negative weights are not allowed, if a vertex is not reachable from the source it should have the value “-1” on line 2 (meaning no possible path).
As the existence of an edge between nodes a and b doesn’t give direction and the graph is directed, just to assure my assumption is correct, does the statement “a, b and c which symbolize that between nodes a and b there is an edge of cost c” mean that there is a directed edge from node a to node b and no edge from b to a?
Does the source node remain the same for every student? And what does “4 4 2” mean at example 1, the last line? We already have 6 edges as mention in the first line. Does a node have a weight value? Thank you
You only read the first 6 edges for the first example, because you know that the graph has only 6 edges. You simply ignore the rest, if any.
Which would be the correct response for Example no. 2 if we don’t have any link edge between the source node and the destination node? Practically from the node 2 it is impossible to reach node 1, so the distance would be infinity. How would it be represented as correct answer on line 2? (0, INFINITY as string) Thank you.
Because negative weights are not allowed, if a vertex is not reachable from the source it should have the value “-1” on line 2 (meaning no possible path).
As the existence of an edge between nodes a and b doesn’t give direction and the graph is directed, just to assure my assumption is correct, does the statement “a, b and c which symbolize that between nodes a and b there is an edge of cost c” mean that there is a directed edge from node a to node b and no edge from b to a?
You are right, the edge is directed from node a to node b.