Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Jun 8th, 2005, 1:49 AM   #1
lhk_mgtf2008
Newbie
 
Join Date: Jun 2005
Posts: 8
Rep Power: 0 lhk_mgtf2008 is on a distinguished road
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
lhk_mgtf2008 is offline   Reply With Quote
Old Jun 8th, 2005, 6:05 AM   #2
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
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.
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Old Jun 8th, 2005, 12:55 PM   #3
Rory
Expert Programmer
 
Rory's Avatar
 
Join Date: Jan 2005
Location: London
Posts: 542
Rep Power: 4 Rory is on a distinguished road
Send a message via MSN to Rory
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).
Rory is offline   Reply With Quote
Old Jun 8th, 2005, 1:42 PM   #4
uman
Expert Programmer
 
Join Date: Dec 2004
Posts: 794
Rep Power: 4 uman is on a distinguished road
wtf?
Do you two know each other in real life or something?
uman is offline   Reply With Quote
Old Jun 8th, 2005, 1:43 PM   #5
uman
Expert Programmer
 
Join Date: Dec 2004
Posts: 794
Rep Power: 4 uman is on a distinguished road
oh and WHAT DOES "REVISE" mean you crazy Brits?!
uman is offline   Reply With Quote
Old Jun 8th, 2005, 4:04 PM   #6
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
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.
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Old Jun 8th, 2005, 10:58 PM   #7
lhk_mgtf2008
Newbie
 
Join Date: Jun 2005
Posts: 8
Rep Power: 0 lhk_mgtf2008 is on a distinguished road
??

mm... may i know that you guys answered my question...
feel like out of topicsssssssssss
lhk_mgtf2008 is offline   Reply With Quote
Old Jun 9th, 2005, 12:44 AM   #8
EverLearning
Hobbyist Programmer
 
EverLearning's Avatar
 
Join Date: May 2005
Location: Indiana
Posts: 130
Rep Power: 4 EverLearning is on a distinguished road
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!)
__________________
got math? yumm...

"All men by nature desire to know" -Aristotle, Metaphysics
EverLearning is offline   Reply With Quote
Old Jun 9th, 2005, 1:29 AM   #9
OpenLoop
Expert Programmer
 
OpenLoop's Avatar
 
Join Date: May 2005
Location: East Lansing, MI
Posts: 663
Rep Power: 4 OpenLoop is on a distinguished road
Quote:
Originally Posted by lhk_mgtf2008
feel like out of topicsssssssssss
you'll get used to it check out this thread:
http://www.programmingforums.org/for...ad.php?p=35263

Last edited by OpenLoop; Jun 9th, 2005 at 1:32 AM.
OpenLoop is offline   Reply With Quote
Old Jun 9th, 2005, 8:11 PM   #10
lhk_mgtf2008
Newbie
 
Join Date: Jun 2005
Posts: 8
Rep Power: 0 lhk_mgtf2008 is on a distinguished road
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

Last edited by lhk_mgtf2008; Jun 9th, 2005 at 8:16 PM.
lhk_mgtf2008 is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 10:11 PM.

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