![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Jun 2005
Posts: 8
Rep Power: 0
![]() |
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?? plssssssssssssssssssss ------------------------------- | A B N C | | C Q E | | A D C Q N | | | -------------------------------- sequence: A B C D E N Q |
|
|
|
|
|
#2 |
|
I eat cake for breakfast.
![]() ![]() ![]() ![]() Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9
![]() |
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.
|
|
|
|
|
|
#3 | |
|
Expert Programmer
|
Quote:
Anyway you should be revising today (yes I've been defeated by my own logic you needn't point that out). |
|
|
|
|
|
|
#4 |
|
Expert Programmer
Join Date: Dec 2004
Posts: 794
Rep Power: 4
![]() |
wtf?
Do you two know each other in real life or something? |
|
|
|
|
|
#5 |
|
Expert Programmer
Join Date: Dec 2004
Posts: 794
Rep Power: 4
![]() |
oh and WHAT DOES "REVISE" mean you crazy Brits?!
|
|
|
|
|
|
#6 |
|
I eat cake for breakfast.
![]() ![]() ![]() ![]() Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9
![]() |
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. |
|
|
|
|
|
#7 |
|
Newbie
Join Date: Jun 2005
Posts: 8
Rep Power: 0
![]() |
??
mm... may i know that you guys answered my question...
feel like out of topicsssssssssss ![]() |
|
|
|
|
|
#8 |
|
Hobbyist Programmer
Join Date: May 2005
Location: Indiana
Posts: 130
Rep Power: 4
![]() |
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!) |
|
|
|
|
|
#9 | |
|
Expert Programmer
Join Date: May 2005
Location: East Lansing, MI
Posts: 663
Rep Power: 4
![]() |
Quote:
check out this thread:http://www.programmingforums.org/for...ad.php?p=35263 Last edited by OpenLoop; Jun 9th, 2005 at 1:32 AM. |
|
|
|
|
|
|
#10 | |
|
Newbie
Join Date: Jun 2005
Posts: 8
Rep Power: 0
![]() |
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 Last edited by lhk_mgtf2008; Jun 9th, 2005 at 8:16 PM. |
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|