Click here to Skip to main content
14,733,444 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Given matrix ,wanted to find all path traversal in c# OR any language
SUppose there is 4*4 matrix,
then if starting vertex is at point [0][0] then it can traverse to [0][1],[1][0],[1][1] all its adjacent but no vertex in a path can visit twice.
if from [0][0] it traverse to [1][1] further adjacent vertex where it can travel to are [0][0],[1][0],[2][0],[0][1],[2][1],[0][2],[1][2],[2][2] but it cannot traverse to [0][0] as it is already visited in particular path.
I want all such posible path which traverse all vertex from start of any vertex.
Posted
Comments
Mohibur Rashid 13-Mar-13 1:35am
   
Try backtracking
Richard MacCutchan 13-Mar-13 6:41am
   
This is an algorithmic rather than coding question, which you should be able to figure out with pencil and paper.
zaphoed 13-Mar-13 8:12am
   
did you try out boost graph library? it might provide just what you want.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900