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

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

View Full Document Right Arrow Icon
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, ‘
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 02/10/2012 for the course CSE 5211 taught by Professor Dmitra during the Spring '12 term at FIT.

Page1 / 4

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

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