Get glimpse about walks, trails and paths (this will probably help you to understand and answer the question):
The easiest way to solve the graph path problem is to use the Dijkstras Algorithm:
See also:
Graph Paths
Posted: Sat Oct 08, 2016 9:39 pm
by Eli
Since a path is a walk such that all vertices and edges (except possibly the first and last vertices - a circle) are distinct, then the longest path from node 1 to node 6 is is given by
, where are vertices, as marked by the red color in the diagram below:
Am I wrong? Why is my answer correct or not?
Re: Graph Paths
Posted: Sat Oct 08, 2016 9:49 pm
by Eli
What is the longest path between vertices and in the graph below?
Re: Graph Paths
Posted: Sun Oct 30, 2016 1:13 am
by Joseph Bundala
Kruskal's Algorithm.
Minimum Spanning Tree algorithm.
For the network above with vertices 1-->6, we can find the Minimum Spanning Tree, means the minimum weights that join two adjacent nodes for the overall network without creating a loop between the nodes.
With small number of nodes, it's possible to create the matrix manually to describe the connection between the nodes. But, with hundreds of nodes in a network then a code must be implemented to find adjacency between the nodes.
Moderators, you may put this code in a good visualization so that 'if', 'end' and those inbuilt statements can be displayed well in colors as in a real editor. Mistakes in the code, corrections and suggestions are appreciated, someone else may write this in C, Java etc.
But, what are the real life examples which uses Kruskal's Algorithm?