ENGLISH
midterm_detail_marking

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

• Notes
• 2

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

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 v (excluding v ) which is an AP, denoted it as target [ v

This preview has intentionally blurred sections. Sign up to view the full version.

This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern