wu :: forums
« wu :: forums - find the station between starting station to dest »

Welcome, Guest. Please Login or Register.
May 15th, 2024, 5:40pm

RIDDLES SITE WRITE MATH! Home Home Help Help Search Search Members Members Login Login Register Register
   wu :: forums
   riddles
   cs
(Moderators: SMQ, Grimbal, ThudnBlunder, william wu, towr, Eigenray, Icarus)
   find the station between starting station to dest
« Previous topic | Next topic »
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print
   Author  Topic: find the station between starting station to dest  (Read 958 times)
ipl006
Newbie
*





   


Posts: 1
find the station between starting station to dest  
« on: Aug 29th, 2011, 5:01am »
Quote Quote Modify Modify

There are n stations numbered from 1 to n stored in an array
the distance between any two stations is given as::
D[i][j]=0, if no path exists between the stations i and j
D[i][j]=n , if the distance between two stations i and j is given to be n
D[i][j]=-1 , if there is no station between i and j
The stations are arranged in a ordered linear sequence , like S1,S2,S3......Sn
find the station between starting station to destination station.
IP Logged
Grimbal
wu::riddles Moderator
Uberpuzzler
*****






   


Gender: male
Posts: 7527
Re: find the station between starting station to d  
« Reply #1 on: Aug 29th, 2011, 5:52am »
Quote Quote Modify Modify

I don't really understand what is being asked:
Are we speaking about stations like train or bus stations?
 
"D[i][j]=0, if no path exists between the stations i and j"
Does it mean there is no direct line from i to j, or no path in the graph?
 
"D[i][j]=-1 , if there is no station between i and j"
Does it mean there is a direct line without intermediate station?  Or there is no path in the sense of a disconnected graph?
 
"The stations are arranged in a ordered linear sequence , like S1,S2,S3......Sn
find the station between starting station to destination station."
Are start and destination arbitrary stations?  Or S1 and Sn?  Do you want the shortest path?  Do you want to go thru all stations?
IP Logged
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print

« Previous topic | Next topic »

Powered by YaBB 1 Gold - SP 1.4!
Forum software copyright © 2000-2004 Yet another Bulletin Board