This preview shows page 1. Sign up to view the full content.
CSE 331: Introduction to Algorithm Analysis and Design
Fall 2011
Homework 7
Due Friday, November 4, 2011 by 1:15pm in class
Please submit each problem separately, i.e. each problem should begin on a new page and only the
pages for one problem should be stapled together. Failure to do so might result in some problem(s)
not being graded.
For general homework policies and our suggestions, please see the policy document.
No collaboration is allowed on the ﬁrst problem.
1. (40
points
) (
Your must work on this problem on your own: NO collaboration is
allowed
)
In class I mentioned that Dijkstra’s algorithm does not work when the edge lengths can be
negative. Show this is possible in the strongest possible sense by giving an example that
exhibits this. In particular, come up with an example of a directed graph (with
no
directed
cycles) along with edge lengths (
exactly
one of which is negative) and two nodes
s
and
t
in
the graph such that when Dijkstra’s algorithm is run on the graph, it does not output the
This is the end of the preview. Sign up
to
access the rest of the document.
This note was uploaded on 12/11/2011 for the course CSE 331 taught by Professor Rudra during the Fall '11 term at SUNY Buffalo.
 Fall '11
 RUDRA

Click to edit the document details