{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

hw1 - CS231 Topics in Combinatorial Algorithms Prof Suri...

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

View Full Document Right Arrow Icon

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

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

Unformatted text preview: CS231: Topics in Combinatorial Algorithms Prof. Suri Homework Assignment 1 Handed Out: Sept 28 Due: Oct 7 1. Let G = ( V,E ) be a directed graph whose edges have real-valued costs (possibly negative). We call G loop-free if it contains no directed loop (cycle). Describe an O ( m ) worst-case time algorithm for computing a shortest path from a source node s to a destination d in a loop-free graph, where m is the number of edges in G . Be sure to analyze the time complexity, prove its correctness, and argue that the algorithm works for negative edge costs as well. 2. Occasionally in a shortest path problem, multiple and possibly conflicting, criteria for the quality may be applicable. For instance, each link may be associated with both a cost (money) and latency (delay). In this problem, we consider two possible formulations to deal with such situations. Let G = ( V,E ) be a directed graph, each of whose edges e is associated with a non-negative cost ( e ) as well as a non-negative length...
View Full Document

{[ snackBarMessage ]}

Page1 / 2

hw1 - CS231 Topics in Combinatorial Algorithms Prof Suri...

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

View Full Document Right Arrow Icon bookmark
Ask a homework question - tutors are online