Lecture17 - CSE 421 Algorithms Richard Anderson Lecture 17...

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

View Full Document Right Arrow Icon
CSE 421 Algorithms Richard Anderson Lecture 17 Dynamic Programming
Background image of page 1

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

View Full DocumentRight Arrow Icon
Optimal linear interpolation Error = Σ (y i –ax i – b) 2
Background image of page 2
Determine set of K lines to minimize error
Background image of page 3

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

View Full DocumentRight Arrow Icon
Opt k [ j ] : Minimum error approximating p 1 …p j with k segments Express Opt k [ j ] in terms of Opt k-1 [1],…,Opt k-1 [ j ] Opt k [ j ] = min i {Opt k-1 [ i ] + E i,j }
Background image of page 4
Optimal sub-solution property Optimal solution with k segments extends an optimal solution of k-1 segments on a smaller problem
Background image of page 5

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

View Full DocumentRight Arrow Icon
Optimal multi-segment interpolation Compute Opt[ k, j ] for 0 < k < j < n for j := 1 to n Opt[ 1, j] = E 1,j ; for k := 2 to n-1 for j := 2 to n t := E 1,j for i := 1 to j -1 t = min (t, Opt[k-1, i ] + E i,j ) Opt[k, j] = t
Background image of page 6
Determining the solution When Opt[ k ,j ] is computed, record the value of i that minimized the sum Store this value in a auxiliary array Use to reconstruct solution
Background image of page 7

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

View Full DocumentRight Arrow Icon
Variable number of segments Segments not specified in advance Penalty function associated with segments Cost = Interpolation error + C x #Segments
Background image of page 8
Penalty cost measure Opt[ j ] = min(E 1,j , min i (Opt[ i ] + E i,j )) + P
Background image of page 9

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

View Full DocumentRight Arrow Icon
Image of page 10
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/25/2012 for the course CSE 421 taught by Professor Richardanderson during the Fall '06 term at University of Washington.

Page1 / 17

Lecture17 - CSE 421 Algorithms Richard Anderson Lecture 17...

This preview shows document pages 1 - 10. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online