![]() |
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 |
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.
|
Quote:
Anyway you should be revising today (yes I've been defeated by my own logic you needn't point that out). |
wtf?
Do you two know each other in real life or something? |
oh and WHAT DOES "REVISE" mean you crazy Brits?!
|
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. |
??
mm... may i know that you guys answered my question...
feel like out of topicsssssssssss :cool: |
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!) |
Quote:
http://www.programmingforums.org/for...ad.php?p=35263 |
Quote:
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