Re: Graph - find a path from A to B with path constraints
- From: Zhu Guohun <ccghzhu@xxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 21 Jun 2007 07:41:49 -0700
p...@xxxxxxxxxxxxx
Hi,
I am given:
Start Point
End Point
Graph showing From City, To City, and Airline or Airline with flight
number
"adjacency list" & "list of nodes"
List of flights (Airline with flight number or just an Airline).
This is to used in getting from A to B.
Order of flights given must be met.
I have to find:
The cities that are to traversed to get from A to B using the
flights given.
Graph will have many connections between nodes and there can be
multiple connections between any 2 ports.
For example the relevant connections in the graph are:
Adelaide Sydney Airline A Flight730
Sydney Bangkok Airline A Flight1
Sydney Bangkok Airline A Flight730
Bangkok London Airline A Flight1
Sydney London Airline A Flight1
London Amsterdam Airline B
Bangkok Amsterdam Airline B
Assume all flight routes have the SAME LENGTH.
You will be given:
Adelaide
Amsterdam
Airline A,Flight730
AirlineA,Flight1
AirlineB
The shortest path would be (which the Dijstra's algorithm would
produce):
Adelaide -> Sydney Airline A Flight730
Sydney -> Bangkok Airline A Flight730
Bangkok -> Amsterdam Airline B
But this does not fit the given flights.
So the correct path would be:
Adelaide -> Sydney Airline A Flight730
Sydney -> Bangkok Airline A Flight1
Bangkok -> London Airline A Flight1
London -> Amsterdam Airline B
Of course this example is simple but the real graph is much more
complicated.
Can you suggest an algorithm to use?
Are there any web sites/newsgroup articles that can assist - ideally
with examples in Oracle's PL/SQL?
Thanks for any help
I think this problme is equal to the assignment problem of a multi
directed graph with resource constraints. Maybe you can search from
google and look for some existence coding such as C++, Java, but
coding of Oracle's PL/SQL maybe very few.
--------------
Best regards,
Zhu
.
- References:
- Prev by Date: Re: A letter want to disprove my paper which submitted recently
- Next by Date: Re: Big-O notation, multiple variables
- Previous by thread: Graph - find a path from A to B with path constraints
- Next by thread: conversion to floating point
- Index(es):
Relevant Pages
|