Definitions • Directed Graph: Some graphs have arrows indicating the direction of the graph. These must be followed. Ex: M (2) (1) N L A possible path: C-A-B Not a possible path: A-B-E-D A possible path: L-M-M-N(1)-M(2) NOT a possible path: L-M-L
Definitions • Weight of a Path: Some paths also include measurements on each edge. Such as a distance, or a length of time to travel that edge. Q 6 8 T to R = Length = 2 Weight is T-Q-R = 8 + 6 = 14 R 11 T 7 S To calculate weight, you must add the measurements on each edge that your path takes. S to T = Length = 2 Weight is S-Q-T = 11 + 8 = 19
Definitions • Weight of d (A, B) = the “distance from vertex A to vertex B”. It is the SHORTEST possible distance from A to B. There might be more than 1 possible path. Then calculate the weight of that path and pick the minimum value. Ex: Weight of d(B, C) = Weight of d(B, D) = 2. 5 3 5 4 2 7 1 B-C = 7 B-E-D = 3+2 = 5 or B-A-D = 2. 5+5 = 7. 5
Definitions • Weight of d (A, B) = the “distance from vertex A to vertex B”. It is the SHORTEST possible distance from A to B. There might be more than 1 possible path. Then calculate the weight of that path and pick the minimum value. Weight of d(E, C) = Ex: 2. 5 3 5 4 2 7 1 E-B-C = 3+5 = 8 This is the minimum value between E and C Note: Instead of asking for the Weight of d(E, C) A question will ask what is the minimum value.