moreShortestPathsex

# moreShortestPathsex - Engineering Exercises 1. The figure...

This preview shows pages 1–2. Sign up to view the full content.

Engineering xercises Exercises 1. The figure below shows an intermediate state in the execution of the breadth-first scanning algorithm for shortest paths, starting at 2. The figure below shows the state in the execution of Floyd’s algorithm for the all-pairs shortest path problem, after the first vertex a . The queue of vertices in the labeled state appears at the bottom of the figure. three labeling steps. The distance array is shown at right. 3 4 5 8 5 3 4 h j b 4 5 2 5 4 c 2 abcde a 0 ∞∞ 52 1 9 2 1 6 6 4 0 5 6 4 5 5 1 a e k f c d i g 5 1 0 1 ueue: h c i 3 4 5 2 2 a e d b b 6 0 2 11 8 c 4 096 d 3 3 10 5 e 14 52 0 Show the state of the algorithm after the next four vertices have been scanned. Show the distance array after each of the last two labeling steps. queue: h c i 4 3 a 0 1 34 2 b 602 10 8 a 0 24 b 6021 1 8 9 2 1 6 6 3 4 4 5 5 8 5 3 4 5 1 4 a h e d i j b 2 0 5 2 c 4 5 0 8 6 d 3 3 e 1 1

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 03/03/2010 for the course CSE 541 taught by Professor Buhler during the Spring '09 term at Washington University in St. Louis.

### Page1 / 2

moreShortestPathsex - Engineering Exercises 1. The figure...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online