{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

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

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

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

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 / 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
Ask a homework question - tutors are online