{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

# ps5 - MIT OpenCourseWare http/ocw.mit.edu 6.006...

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

MIT OpenCourseWare http://ocw.mit.edu 6.00 6 Introduction to Algorithms Spring 200 8 For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms .

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

View Full Document
Introduction to Algorithms: 6.006 Massachusetts Institute of Technology April 10, 2008 Professors Srini Devadas and Erik Demaine Handout 10 Problem Set 5 This problem set is due Thursday April 24 at 11:59PM . Solutions should be turned in through the course website in PDF form using L A T E X or scanned handwritten solutions. A template for writing up solutions in L A T E X is available on the course website. Remember, your goal is to communicate. Full credit will be given only to the correct solution which is described clearly. Convoluted and obtuse descriptions might receive low marks, even when they are correct. Also, aim for concise solutions, as it will save you time spent on write- ups, and also help you conceptualize the key idea of the problem. Exercises are for extra practice and should not be turned in. Exercises: CLRS 24.1-1 (page 591) CLRS 24.3-2 (page 600) CLRS 24.3-4 (page 600) CLRS 24.5-8 (page 614) CLRS 24.3-6 (page 600) 1. (15 points) True or False. Decide whether these statements are True or False . You must brieﬂy justify all your answers to receive full credit. (a) (5 points) If some edge weights are negative, the shortest paths from s can be obtained by adding a constant C to every edge weight, large enough to make all edge weights nonnegative, and running Dijkstra’s algorithm. (b) (5 points) Let P be a shortest path from some vertex s to some other vertex t . If the weight of each edge in the graph is squared, P remains a shortest path from s to t .
2 Handout 10: Problem Set 5 (c) (5 points) A longest simple path from s to t is defined to be a path from s to t that does not contain cycles, and has the largest possible weight.

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.

{[ snackBarMessage ]}

### Page1 / 5

ps5 - MIT OpenCourseWare http/ocw.mit.edu 6.006...

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

View Full Document
Ask a homework question - tutors are online