{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

hw08 - To break ties on which node to visit first use...

This preview shows page 1. Sign up to view the full content.

CSE331 Section 2 Homework 8 Due: Friday March 21, 2008 at 11:59am 1. Problem 7.11 on page 307. Show the array after the buildHeap step has completed, then show how the array looks after each successive deleteMax operation. 2. Problem 7.12 on page 307. Explain your answer. 3. Problem 9.1 on page 396. Apply the following conventions: use a queue and assume that vertices appear in an adjacency list alphabetically. In other words, if you use the function FindVertexOfIndegreeZero from the lecture, look at the vertices in alphabet- ical order. 4. Perform a DFS, starting from vertex A, on the graph in figure 9.83.
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: To break ties on which node to visit first, use alphabetical ordering. State the order in which the ver-tices are visited. 5. Do the following problems for BFS with enhancements. a. Perform BFS with enhancements, starting from vertex A, on the graph in figure 9.83. To break ties on which node to visit first, use alphabetical ordering. State the order in which the vertices are visited and give the contents of the queue after each visit. b. Give an example of a 3-node DAG where BFS with enhancements reduces the number of nodes placed in the queue....
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online