Need an algo to find a path bewtween 2 vertices of a digraph
Hi guys, is there any standard algorithm to find any path bewtween any 2 vertices of a digraph? The graph is represented by ajdacency matrix and I need such an algorithm by which I can get the set of vertices (actrually the path) which are on the way from starting vertex to ending vertex.
I looked for Dijktsra's shortest path but all those version are outputing the min cost of the path, I need a sequence of vertices of the path, in other words there is a path between i-th and j-th vertex, I need this: [i, a1, a2, ..., ai, ..., j]. Also I looked for Depth First Search but this gave just a bool value if such path exiost whenever I need all vertices of the path. Also it is known that there is only 1 path bewtween any 2 vertices.
Waiting for your inputs.
Best Regards, David.
Re: Need an algo to find a path bewtween 2 vertices of a digraph
Dijkstra's algorithm also gives you the path in a second step. link.
Re: Need an algo to find a path bewtween 2 vertices of a digraph
Thank's, Yves, I solved my problem.
Re: problem on Theory of computation
Good morning sir, I am working as a lecturer in engg collgege(india). i have one doubt on the following question in Theory of computation.
How many possible number of DFA's exist 2states over alphabet{0,1}.
a) 16 b) 14 c) 20 d) 24
give clear explanation. if there is any formulae plz mail to me....
Thanking u sir.
Ramesh Karnati
Re: problem on Theory of computation
Quote:
Originally Posted by ramesh_krnt
Good morning sir, I am working as a lecturer in engg collgege(india).
:eek:
Given this definition, and assuming automata with permuted states are equivalent, aswer is <write correct answer here>... ;)