# hw4 - CSCI 323/700 SPRING 2010 HOMEWORK 4 Written Problems....

This preview shows page 1. Sign up to view the full content.

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

Unformatted text preview: CSCI 323/700 SPRING 2010 HOMEWORK 4 Written Problems. due Mar 3 (Wed), 6.30 pm. 1. (Dijkstra’s Algorithm) Run Dijkstra’s Algorithm on the following graph starting from the source node s . Show the intermediate computations of the list values d , d’ and p . In case of a tie, pick the node that comes first in alphabetical order. a b c s e f 2 8 6 9 6 5 15 5 2 2. (Paths with Changing Colors) Consider a (weighted) directed graph G with n vertices and m edges where each edge e has a positive weight w ( e ) and is colored either red or blue. The cost of a path is equal to the sum of the weights of edges on the path plus 5 for each pair of adjcent edges that are not the same color. That is, when traversing a path, it costs an additional 5 units to switch from one edge to another of a different color. (In the context of planning the shortest commute on the New York MTA, this could correspond to the delay from switching amongst subway lines.) Give an efficient algorithm to find a lowest-cost path between two vertices...
View Full Document

## This note was uploaded on 05/31/2010 for the course COMPUTER S 700 taught by Professor Joewhite during the Spring '10 term at Universidad San Martín de Porres.

Ask a homework question - tutors are online