Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
See more: C++ C C#
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 12-Mar-13 19:35pm
Mohibur Rashid at 13-Mar-13 1:35am
Try backtracking
Richard MacCutchan at 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 at 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)

  Print Answers RSS
0 OriginalGriff 645
1 Maciej Los 225
2 Abhinav S 171
3 Richard Deeming 160
4 Suvendu Shekhar Giri 159
0 Sergey Alexandrovich Kryukov 9,623
1 OriginalGriff 9,095
2 Peter Leow 5,044
3 Kornfeld Eliyahu Peter 3,373
4 Maciej Los 2,581

Advertise | Privacy | Mobile
Web01 | 2.8.150327.1 | Last Updated 13 Mar 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100