09 DP3 and Heaps Polygon Triangulation Solutions

09 DP3 and Heaps Polygon Triangulation Solutions - First,...

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

View Full Document Right Arrow Icon
k k-1 i+1 i j C(i,k) = if k-i 2 (j = i+1) (j = k-1) if i+2 j k-2 C(i,k) = min Exercise: 0 C(i+1, k) + l(i+1,k) C(i, k-1) + l(i, k-1) C(i, j) + C(j, k) + l(i, j) + l(j, k)
Background image of page 1

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

View Full DocumentRight Arrow Icon
2 Triangulation exercise cont’d In what order should the table entries be entered?
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: First, main diagonal and then each successive diagonals in upper triangle 1. Diagonals: C(i,i), C(i,i+1), C(i,i+2) = 0 2. Diagonals: C(i, i+j), j = 3, , n-i Whats the space and running time of this algorithm? S(n) = (n 2 ) T(n) = (n 3 )...
View Full Document

Page1 / 2

09 DP3 and Heaps Polygon Triangulation Solutions - First,...

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