Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   Visual Basic (http://www.programmingforums.org/forum18.html)
-   -   seeking best path algorithm (http://www.programmingforums.org/showthread.php?t=4358)

lhk_mgtf2008 Jun 8th, 2005 1:49 AM

seeking best path algorithm
 
guys, i need some help on this, pls reply me if u know .. tq

case :
i have one board, in that bord there are several compenent ( A,B,C,D,E,N,Q)
i need to find the faster path from any point and end at any point2
e.g. A->A->D->C->........ -> N as long as i travell all of the point

i know that i can use best path algorithm , but problem is sequence of compent is a sensitive case where from A -> A delay 0 sec , A->B delay 1 sec , A-> C delay 2 sec, C->A also delay 2 sec, D->D is delay 0 sec ,
( base on the seq i listed at below, depend on you jump how many gap if one gap 1 sec)
A->A->D->C
0 3 1

so i need a solution which i can get the best path that use the fewest time ?
anyone can help me?? :confused: plssssssssssssssssssss :(

-------------------------------
| A B N C |
| C Q E |
| A D C Q N |
| |
--------------------------------

sequence:
A
B
C
D
E
N
Q

Ooble Jun 8th, 2005 6:05 AM

Look up Dijkstra's shortest path algorithm. It's easy - I had to do it in an exam yesterday, and if I can pull it off, anyone can.

Rory Jun 8th, 2005 12:55 PM

Quote:

Originally Posted by Ooble
Look up Dijkstra's shortest path algorithm. It's easy - I had to do it in an exam yesterday, and if I can pull it off, anyone can.

Don't speak to soon: we may have all failed...
Anyway you should be revising today (yes I've been defeated by my own logic you needn't point that out).

uman Jun 8th, 2005 1:42 PM

wtf?
Do you two know each other in real life or something?

uman Jun 8th, 2005 1:43 PM

oh and WHAT DOES "REVISE" mean you crazy Brits?!

Ooble Jun 8th, 2005 4:04 PM

Revise means "to study for an examination". In other words, student hell.

And yes, we know each other - we're in the same grade in school.

lhk_mgtf2008 Jun 8th, 2005 10:58 PM

??
 
mm... may i know that you guys answered my question...
feel like out of topicsssssssssss :cool:

EverLearning Jun 9th, 2005 12:44 AM

It's been a semester ago, but besides Dijkstra, look up Floyd's. This website gives a basic description on both with code in C but it is more like pseudo-code (this isn't strictly a VB question though either).
The difference basically is that Dijkstra is finding a best path (least cost) between a GIVEN node and all other nodes, while Floyd's finds best path over the ENTIRE graph (think about it as all the nodes with assigned cost to a particular other node, matrix representation really helps see what's going on, strongly suggest working it out on the paper!)

OpenLoop Jun 9th, 2005 1:29 AM

Quote:

Originally Posted by lhk_mgtf2008
feel like out of topicsssssssssss :cool:

you'll get used to it :) check out this thread:
http://www.programmingforums.org/for...ad.php?p=35263

lhk_mgtf2008 Jun 9th, 2005 8:11 PM

Quote:

Originally Posted by OpenLoop
you'll get used to it :) check out this thread:
http://www.programmingforums.org/for...ad.php?p=35263


i cant understand what you mean ...
pls help me on this ok??

i have one side which is what i want to do actually , but i need make it become a program.. even though the content i also not very understand , i still analysis it ..anyone can help me

http://arno.unimaas.nl/show.cgi?fid=537
http://arno.unimaas.nl/show.cgi?fid=78


All times are GMT -5. The time now is 6:02 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC