example : principle of optimality and dynamic programming
DESCRIPTION
EXAMPLE : Principle of Optimality and Dynamic Programming. 1.4. 1.3. 1.4. Dynamic Programming. Dynamic Programming. Search for best path Dynamic programming principle - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: EXAMPLE : Principle of Optimality and Dynamic Programming](https://reader033.vdocuments.us/reader033/viewer/2022061522/568161a5550346895dd16299/html5/thumbnails/1.jpg)
EXAMPLE :Principle of Optimality
and Dynamic Programming
![Page 2: EXAMPLE : Principle of Optimality and Dynamic Programming](https://reader033.vdocuments.us/reader033/viewer/2022061522/568161a5550346895dd16299/html5/thumbnails/2.jpg)
![Page 3: EXAMPLE : Principle of Optimality and Dynamic Programming](https://reader033.vdocuments.us/reader033/viewer/2022061522/568161a5550346895dd16299/html5/thumbnails/3.jpg)
![Page 4: EXAMPLE : Principle of Optimality and Dynamic Programming](https://reader033.vdocuments.us/reader033/viewer/2022061522/568161a5550346895dd16299/html5/thumbnails/4.jpg)
![Page 5: EXAMPLE : Principle of Optimality and Dynamic Programming](https://reader033.vdocuments.us/reader033/viewer/2022061522/568161a5550346895dd16299/html5/thumbnails/5.jpg)
![Page 6: EXAMPLE : Principle of Optimality and Dynamic Programming](https://reader033.vdocuments.us/reader033/viewer/2022061522/568161a5550346895dd16299/html5/thumbnails/6.jpg)
![Page 7: EXAMPLE : Principle of Optimality and Dynamic Programming](https://reader033.vdocuments.us/reader033/viewer/2022061522/568161a5550346895dd16299/html5/thumbnails/7.jpg)
![Page 8: EXAMPLE : Principle of Optimality and Dynamic Programming](https://reader033.vdocuments.us/reader033/viewer/2022061522/568161a5550346895dd16299/html5/thumbnails/8.jpg)
![Page 9: EXAMPLE : Principle of Optimality and Dynamic Programming](https://reader033.vdocuments.us/reader033/viewer/2022061522/568161a5550346895dd16299/html5/thumbnails/9.jpg)
![Page 10: EXAMPLE : Principle of Optimality and Dynamic Programming](https://reader033.vdocuments.us/reader033/viewer/2022061522/568161a5550346895dd16299/html5/thumbnails/10.jpg)
![Page 11: EXAMPLE : Principle of Optimality and Dynamic Programming](https://reader033.vdocuments.us/reader033/viewer/2022061522/568161a5550346895dd16299/html5/thumbnails/11.jpg)
![Page 12: EXAMPLE : Principle of Optimality and Dynamic Programming](https://reader033.vdocuments.us/reader033/viewer/2022061522/568161a5550346895dd16299/html5/thumbnails/12.jpg)
![Page 13: EXAMPLE : Principle of Optimality and Dynamic Programming](https://reader033.vdocuments.us/reader033/viewer/2022061522/568161a5550346895dd16299/html5/thumbnails/13.jpg)
![Page 14: EXAMPLE : Principle of Optimality and Dynamic Programming](https://reader033.vdocuments.us/reader033/viewer/2022061522/568161a5550346895dd16299/html5/thumbnails/14.jpg)
![Page 15: EXAMPLE : Principle of Optimality and Dynamic Programming](https://reader033.vdocuments.us/reader033/viewer/2022061522/568161a5550346895dd16299/html5/thumbnails/15.jpg)
![Page 16: EXAMPLE : Principle of Optimality and Dynamic Programming](https://reader033.vdocuments.us/reader033/viewer/2022061522/568161a5550346895dd16299/html5/thumbnails/16.jpg)
![Page 17: EXAMPLE : Principle of Optimality and Dynamic Programming](https://reader033.vdocuments.us/reader033/viewer/2022061522/568161a5550346895dd16299/html5/thumbnails/17.jpg)
1.4
1.3
![Page 18: EXAMPLE : Principle of Optimality and Dynamic Programming](https://reader033.vdocuments.us/reader033/viewer/2022061522/568161a5550346895dd16299/html5/thumbnails/18.jpg)
![Page 19: EXAMPLE : Principle of Optimality and Dynamic Programming](https://reader033.vdocuments.us/reader033/viewer/2022061522/568161a5550346895dd16299/html5/thumbnails/19.jpg)
1.4
![Page 20: EXAMPLE : Principle of Optimality and Dynamic Programming](https://reader033.vdocuments.us/reader033/viewer/2022061522/568161a5550346895dd16299/html5/thumbnails/20.jpg)
Dynamic Programming
![Page 21: EXAMPLE : Principle of Optimality and Dynamic Programming](https://reader033.vdocuments.us/reader033/viewer/2022061522/568161a5550346895dd16299/html5/thumbnails/21.jpg)
Dynamic Programming
• Search for best path• Dynamic programming principle
– If B is on the shortest path from A to C, then the path from A to B that lies on the path from A to C is the shortest path from A to B
AB
C
… …
![Page 22: EXAMPLE : Principle of Optimality and Dynamic Programming](https://reader033.vdocuments.us/reader033/viewer/2022061522/568161a5550346895dd16299/html5/thumbnails/22.jpg)
Dynamic Programming• If DP principle holds, then efficient search can be
implemented
• When at node B in search you can prune all paths to B that are not the shortest
• You should not expand these paths
AB
C
… …
![Page 23: EXAMPLE : Principle of Optimality and Dynamic Programming](https://reader033.vdocuments.us/reader033/viewer/2022061522/568161a5550346895dd16299/html5/thumbnails/23.jpg)
Applications to Handwriting Recognition• Address Interpretation – USPS
• Word Recognition
– ZIP + Street No. Hypotheses
– “Small” Lexicons for Word Rec
1. Problem Statement and History
2. Picture of Parsed Address Block
3. Word Recognition Problem
4. Results for NIST OCR Tests with refs
![Page 24: EXAMPLE : Principle of Optimality and Dynamic Programming](https://reader033.vdocuments.us/reader033/viewer/2022061522/568161a5550346895dd16299/html5/thumbnails/24.jpg)
Character Ambiguity in Handwriting Recognition
![Page 25: EXAMPLE : Principle of Optimality and Dynamic Programming](https://reader033.vdocuments.us/reader033/viewer/2022061522/568161a5550346895dd16299/html5/thumbnails/25.jpg)
word image
segmentation
dynamic programming
matchinglexicon
primitivesprimitives
and unions of primitives
match scores between word
image and lexicon strings
character class membership assignment
3 modules for character class
membership assignment
Baseline module: MLP
New module: SOFM and MLP
New module: SOFM and FI
Handwritten Word Recognition System
fuzzy integral aggregation
DP Approach to handwriting recognition
Self-Organizing Feature Maps
Mixed Linear Programming
Fuzzy Inferfence
![Page 26: EXAMPLE : Principle of Optimality and Dynamic Programming](https://reader033.vdocuments.us/reader033/viewer/2022061522/568161a5550346895dd16299/html5/thumbnails/26.jpg)
Segmentation-Based Handwritten Word Recognition
Search Problem – How do we put the pieces together?
1 2 3 4 5 6 7 8 9 10
11 12 13 14 15 16 17 18 19 20
21 22 23 24 25
Inp u t Imag e
Primitiv es
Best Match
to "Richmo nd"
Best Match
to "Ed mun d"
Image Segmentatio n
R=5 3 i=2 7 c=5 2 h=6 1 m=7 0 o=4 3 n =61 d=8 8
E=1 2 d=7 9 m-85 u=25 n=6 1 d =88
![Page 27: EXAMPLE : Principle of Optimality and Dynamic Programming](https://reader033.vdocuments.us/reader033/viewer/2022061522/568161a5550346895dd16299/html5/thumbnails/27.jpg)
DP Approach
• Let I be a word image
• L = {L1, L2, ..., LT} be a lexicon of strings representing all possible identities of I.
• Word recognition requires finding the string in L that best matches I.
• Search – DP, Heuristic
![Page 28: EXAMPLE : Principle of Optimality and Dynamic Programming](https://reader033.vdocuments.us/reader033/viewer/2022061522/568161a5550346895dd16299/html5/thumbnails/28.jpg)
DP ApproachLet Lm = c1c2...cn. Let the primitives of I be S1, S2, ..., Sp , (ordered from left to right). Denote
the set of all legal unions of primitives by
UI = { Sjk : Sjk = k
jh
hS
, j k, and k
jh
hS
is legal }.
A segmentation of length n of I is a sequence of elements of UI of the form
S = Sk0+1,k1, Sk1+1,k2, ..., Skn-1+1, kn where k0 = 0 and k n = p.
Let Sn denote the set of all segmentations of I of length n. For each character class c, let xc(s)
denote the neural network output corresponding to class c given s UI as input. A match score
between Lm and a segmentation S Sn can be computed as
segmatch ( Lm , S) =
n
ikkc iii
Sxn 1
,1 )(11 .
![Page 29: EXAMPLE : Principle of Optimality and Dynamic Programming](https://reader033.vdocuments.us/reader033/viewer/2022061522/568161a5550346895dd16299/html5/thumbnails/29.jpg)
DP ApproachFor i = 1, ..., w
For j = i, ..., p 1 IF i = 1, (that is we are matching against the first character) THEN
2 IF Legal(S1j) THEN
3 dp(1,j) = ( S1j, C1)
4 ELSE
5 dp(1,j) = -?
6 ENDIF
7 ELSEIF Legal(Sij) THEN
8 dp ( i , j ) maxk
dp ( i 1, k ) ( S k 1 , j , C i ) | i k j and Legal Sk j is TRUE
9 ELSE
10 dp(i,j) = -?
11 ENDIF
12 ENDIF
13 IF dp(i,j) > -? THEN
14 j2 arg maxk
dp (i 1, k ) (S k1, j , Ci ) | i k j and Legal Skj is TRUE
15 path(i,j) = (i - 1, j2)
16 ENDIF
ENDFOR
ENDFOR
![Page 30: EXAMPLE : Principle of Optimality and Dynamic Programming](https://reader033.vdocuments.us/reader033/viewer/2022061522/568161a5550346895dd16299/html5/thumbnails/30.jpg)
DP Approach
Table 1. Dynamic Programming Array for Match of Richmond to "Richmond"
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
"R" 11 38 53 45 44 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
"i" 0 23 27 71 80 52 53 54 52 51 55 0 0 0 0 0 0 0 0 0 0 0 0 0 0
"c" 0 0 0 38 90 132 108 108 86 86 87 63 63 63 63 62 65 65 0 0 0 0 0 0 0
"h" 0 0 0 0 42 95 144 147 157 193 189 166 162 141 145 121 100 95 85 77 76 0 0 0 0
"m" 0 0 0 0 0 50 104 154 156 167 202 208 219 227 261 263 272 258 178 177 216 231 0 0 0
"o" 0 0 0 0 0 0 74 114 169 163 179 206 241 261 236 236 279 309 312 290 281 280 281 0 0
"n" 0 0 0 0 0 0 0 83 122 178 181 190 223 261 269 269 275 285 322 337 352 370 356 321 0
"d" 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 458
Table 2. Dynamic Programming Path Array for Match of Richmond to "Richmond"
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
"R" 0 0 0 0 0 0 0 1 8 8 6 9 11 11 12 12 13 16 15 15 19 20 20 19 20
"i" 0 1 1 3 3 5 5 5 5 5 5 5 7 7 14 10 16 16 16 15 15 19 16 21 19
"c" 0 0 2 3 3 5 5 5 5 5 5 7 7 7 8 11 11 11 12 14 14 16 21 19 21
"h" 0 0 0 3 4 5 6 6 6 6 6 6 6 8 8 10 11 11 15 15 15 16 16 17 21
"m" 0 0 0 0 4 5 6 7 8 9 10 10 10 11 11 10 10 11 12 13 15 15 16 21 19
"o" 0 0 0 0 0 5 6 7 8 9 10 11 12 13 14 14 16 16 16 15 17 17 17 19 21
"n" 0 0 0 0 0 0 6 7 8 9 9 9 11 13 14 14 13 17 18 18 17 18 18 19 23
"d" 0 0 0 0 0 0 0 7 8 9 10 10 11 12 13 13 16 17 17 17 20 20 20 22 22
1 2 3 4 5 6 7 8 9 10
11 12 13 14 15 16 17 18 19 20
21 22 23 24 25
Inp u t Image
Primitives
Best Match
to "Rich mon d"
Best Match
to "Ed mu nd "
Image Seg mentatio n
R=53 i=2 7 c=5 2 h=61 m=70 o=43 n=6 1 d=88
E=1 2 d=7 9 m-8 5 u=25 n=61 d=88