{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

assignment2

# assignment2 - CSIS 0250B Design and Analysis of Algorithms...

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

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.

Unformatted text preview: CSIS 0250B Design and Analysis of Algorithms Assignment 2 Due: 11:59 PM, Feb 26, 2009 Warm-up (no need to turn in) 1. Given a directed graph G in adjacency list format, show how to construct the reverse graph in linear time. 2. Give a linear-time algorithm to determine when a given DAG (directed acyclic graph) G contains a directed path that touches every vertex exactly once. 3. Dijkstra’s algorithm can be implemented in O (( m + n )log n )) time, where n and m are respec- tively the number of vertices and edges in the graph. Suppose you have been told that the input graph is a dense graph and m is close to n 2 . Could you find another way to implement Dijkstra’s algorithm in O ( n 2 ) time? 4. The following algorithm attempts to find the shortest path from node s to node t in a directed graph with some negative edges: Add a large enough number to each edge weight so that all the weights become positive, then run Dijkstra’s algorithm....
View Full Document

{[ snackBarMessage ]}

### Page1 / 2

assignment2 - CSIS 0250B Design and Analysis of Algorithms...

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

View Full Document
Ask a homework question - tutors are online