ps4 - Problem Set #4 IE 495 Due October 6, 2000 1. Write...

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

View Full Document Right Arrow Icon
Problem Set #4 IE 495 Due October 6, 2000 1. Write pseudo-code for an implementation of a doubly linked list. The supported operations should include make_list() insert() delete() concatenate() split() Specify the arguments for each operation and the complexity of each operation. Your implementation should work when deleting the first and/or last item and when the list is empty. 2. Let G =( V , E ) be a given directed acyclic graph. We can obtain a partial order on the set of vertices by defining v < w there is a path in G from v to w Such an ordering is useful in many different settings. For instance, it can be used for analyzing precedence constraints in scheduling applications or data dependencies in parallel algorithm design. Extending this partial order to a total order is known as topological sort . In topological sort, our goal to define a complete ordering of the vertices such that v comes before w in the ordering if and only if v < w . Develop an O (| E | + | V |) algorithm to perform topological sort on the vertices of a graph. 3. (Optional) The Towers of Hanoi is a puzzle consisting of three pegs A, B, and C, and
Background image of page 1

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

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 08/06/2008 for the course IE 495 taught by Professor Linderoth during the Fall '08 term at Lehigh University .

Page1 / 2

ps4 - Problem Set #4 IE 495 Due October 6, 2000 1. Write...

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

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