{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Exam2

# Exam2 - CSE 5211 Fall 2007 Exam 2 Points 50 Time 115 min 1...

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

CSE 5211 Fall 2007 Exam 2 Points: 50 Time: 115 min 1. Organize the following nodes into an optimum cost Binary search tree using the Dynamic programming algorithm: (a, 10), (b, 5), (c, 7), (d, 12), where the number in the parenthesis corresponds to the frequency of the respective node. Show the full resulting cost matrix, and calculations of only three elements in the matrix including the final corner element. [8] What is the exact total number of steps in your computation (as it corresponds to the big- O of the algorithm)? [2] 2a. Hamiltonian path for a graph is a path via each node appearing once and only once in the path. For a weighted graph one may find the total weight of the shortest Hamiltonian path by using a Dynamic Programming algorithm. The following is the recurrence for that purpose. P(S, k) = min {P(S-{k}, m) + w(m, k) | for all m S- {k} } when |S| >1, and P(S, k) = w(1, k) when S = {k}, where P(S, k) means the minimum weight of a path from a special starting node (say, ‘ a ’) to the node k , with S

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 / 4

Exam2 - CSE 5211 Fall 2007 Exam 2 Points 50 Time 115 min 1...

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

View Full Document
Ask a homework question - tutors are online