This preview shows pages 1–4. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: University of Toronto Scarborough Campus October 16, 2009 CSC C73 Midterm Examination Instructor: Vassos Hadzilacos Aids allowed: One 8 . 5 × 11 ‘cheat sheet’ (may be written on both sides) Duration: One hour and fifty minutes • There should be 7 pages in this exam booklet, including this cover page. • Answer all questions. • Put all answers in this booklet, in the spaces provided. • For rough work, use the backs of the pages; these will not be marked . • Good luck! Family Name Given Name Student Number Problem Marks Marks Rec’ved Worth 1. 10 2. 10 3. 20 4. 30 5. 30 TOTAL 100 CSC C73 Midterm, Fall 2009 Page 2 out of 7 QUESTION 1. (10 marks) The following table gives the frequencies of the symbols of an alphabet. Symbol Frequency A 1 / 20 B 2 / 20 C 2 / 20 D 4 / 20 E 4 / 20 F 7 / 20 In the space below, show a tree that Huffman’s algorithm could produce for these symbols and frequencies. Answer: CSC C73 Midterm, Fall 2009 Page 3 out of 7 QUESTION 2. (10 marks) As we have seen, Dijkstra’s shortest path algorithm does not work when edges can have negative lengths. In the space below draw a directed weighted graph, some of whose edges have negative length but which has no cycles of negative length, for which Dijkstra’s algorithm does not work correctly.has no cycles of negative length, for which Dijkstra’s algorithm does not work correctly....
View
Full
Document
This note was uploaded on 11/26/2009 for the course CIS 502 taught by Professor Naver during the Spring '09 term at National Tsing Hua University, China.
 Spring '09
 Naver

Click to edit the document details