Path node , route path, list algorithm

Started by
3 comments, last by stoneyrich 11 years, 4 months ago
Hi everyone ...i would like your ideas on how to go about this list problem.

attached is a sample of the list am trying to work with:

I want to achieve a list of possible route like this

possible route 1 - 272<309<308>312>48

route 2 - 316<315>319>99

route 3 - 48<1420

< it begins from the left of the node
> it end at the right side of the node

any help ?
Advertisement
Okay Guys thanks very much i noticed i had over 100 views yet no one came to my rescue.

Well i was able to figure it out. in case anyone chanced upon this search and finds a simlar situation this is how
i went about it. Using Graphs Representation and BFS & DFS for path or route finding

  • i represented each conn.# or connector.# as a vertices or a node
  • created an undirected edge as a link or a connection to another conn.# object
  • created a graph out of the table
  • Used BFS,DFS to find the paths or route.

for now that is the approach i have used and seems to work well :)
Can the component graph have a loop? That would be something you need to take into account.
FYI: This happens to be the first time I've come across this thread.


Okay Guys thanks very much i noticed i had over 100 views yet no one came to my rescue.

That usually means that you haven't explained your question very well, or for some other reason it is going to require too much of our time to understand and help with.
The easier you make it for others to help you, the more help you'll get, and faster. That's just how it is.
"In order to understand recursion, you must first understand recursion."
My website dedicated to sorting algorithms
thanks @iMalc well i tried my best to really explain it in a way any one could understand. I think it really had to do with time
also but i was of the thought someone might have been in such a situation before.

@Stroppy Katamari
Yes, after trials i noticed some components had loops.

This topic is closed to new replies.

Advertisement