midterm_detail_marking

midterm_detail_marking - COMP 271H Design and Analysis of...

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

View Full Document Right Arrow Icon
COMP 271H Design and Analysis of Algorithms 2006 Fall Semester Midterm marking scheme 1. Question 1: Base case handling (1 mark) Divide into two arrays, solve it recursively and get two partial results (1 mark) Compute L max × R max where L max contains A [ m ] and R max contains A [ m + 1] (1 mark) Compute L min × R min where L min contains A [ m ] and R min contains A [ m + 1] (1 mark) Running time analysis (1 mark) 2. Question 2a: Root is AP iff it has more than 1 child (1 mark) leaves are not AP (1 mark) (non-root) internal nodes are APs iff there exists a child w of v , such that no back edge connects a proper ancestor of v (i.e. excluding parent [ v ]) and a node in the subtree rooted at w (1 mark) (Note: If the description is clear enough, it is acceptable) 3. Question 2b: For correct and efficient algorithm (Max:7 marks) Compute d [] and Low [] using modified DFS / using AP algorithm (1 mark) For each vertex v , compute furthest ancestor of
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.

Page1 / 2

midterm_detail_marking - COMP 271H Design and Analysis of...

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