Google Answers Logo
View Question
 
Q: Dijkstra's shortest path algorithm on p-graphs ( No Answer,   0 Comments )
Question  
Subject: Dijkstra's shortest path algorithm on p-graphs
Category: Computers > Algorithms
Asked by: diddydustin-ga
List Price: $5.00
Posted: 06 Apr 2004 23:16 PDT
Expires: 07 Apr 2004 19:27 PDT
Question ID: 326442
I am using a p-graph structure in the C programming language. There
are two types of vertices: family and individual. The edges for a
family are "husband", "wife", with multiple "child" edges. The edges
for the individual are "parents" and "marriage". Individuals can only
be connected to families and vice versa. My question is, how can I
properly represent this structure so that I can perform Dijkstra's
shortest path algorithm? Also, what is the specific method to perform
Dijkstra's shortest path algorithm on the p-graph structure, or in a
more general case, how to perform Dijkstra's shortest path algorithm
with multiple types of vertices/edges of equal weight?

Request for Question Clarification by maniac-ga on 07 Apr 2004 05:41 PDT
Hello Diddydustin,

Could you please describe your use of a "p-graph structure"? I am
assuming you do not refer to process graphs such as found with a
search like
  "p graph" structure
or at
  http://www.p-graph.com/intro.html

Once you clarify that, we should be able to find several good
references (some w/ source code) on Dijkstra's shortest path
algorithm.
  --Maniac

Clarification of Question by diddydustin-ga on 07 Apr 2004 07:18 PDT
Sure,

You are correct, I am not referring to a process graph. I am using
this for a genealogical program. I am reading a file with commands
like, I 13 P 2 M 4, which means: "Individual 13 has parents 2 and is
married in family 4." Or F 4 H 9 W 6 C 4 C 5 means "Family 4 has
husband 9, wife 6, and children 4 5". Once I read in all of this data,
I need to store it in a structure, then perform the shortest path
algorithm to determine how two individuals are connected. For example,
"individual 5 family 2 individual 8 family 6 individual 8" would show
how 5 and 8 are connceted.

Does this clarify?
Answer  
There is no answer at this time.

Comments  
There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy