home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: LaTeX Document
(document/latex).
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| LaTeX Document (document/latex)
| magic
| Supported |
1%
| dexvert
| Corel 10 Texture (image/corel10Texture)
| ext
| Unsupported |
1%
| dexvert
| Croteam texture file (image/croteamTextureFile)
| ext
| Unsupported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| LaTeX document text
| default
| |
99%
| file
| LaTeX document, ASCII text
| default
| |
100%
| TrID
| LaTeX 2e document (with rem)
| default
| |
100%
| checkBytes
| Printable ASCII
| default
| |
100%
| perlTextCheck
| Likely Text (Perl)
| default
| |
100%
| siegfried
| fmt/281 LaTeX (Subdocument)
| default
| |
100%
| detectItEasy
| Format: plain text[LF]
| default (weak)
| |
100%
| xdgMime
| text/x-matlab
| default (weak)
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 25 20 4e 45 57 43 4f 4d | 4d 41 4e 44 20 46 4f 52 |% NEWCOM|MAND FOR|
|00000010| 20 5c 20 43 48 41 52 41 | 43 54 45 52 3a 0a 25 20 | \ CHARA|CTER:.% |
|00000020| 5c 62 73 0a 0a 5c 64 6f | 63 75 6d 65 6e 74 73 74 |\bs..\do|cumentst|
|00000030| 79 6c 65 5b 31 31 70 74 | 5d 7b 61 72 74 69 63 6c |yle[11pt|]{articl|
|00000040| 65 7d 0a 0a 5c 74 69 74 | 6c 65 7b 43 24 5e 7b 2b |e}..\tit|le{C$^{+|
|00000050| 2b 7d 24 20 53 65 61 72 | 63 68 20 43 6c 61 73 73 |+}$ Sear|ch Class|
|00000060| 20 4c 69 62 72 61 72 79 | 7d 0a 0a 5c 61 75 74 68 | Library|}..\auth|
|00000070| 6f 72 7b 50 65 74 65 72 | 20 42 6f 75 74 68 6f 6f |or{Peter| Bouthoo|
|00000080| 72 6e 7d 0a 5c 64 61 74 | 65 7b 33 20 44 65 63 65 |rn}.\dat|e{3 Dece|
|00000090| 6d 62 65 72 20 31 39 39 | 33 7d 0a 0a 5c 6e 65 77 |mber 199|3}..\new|
|000000a0| 63 6f 6d 6d 61 6e 64 7b | 5c 62 73 7d 7b 24 5c 62 |command{|\bs}{$\b|
|000000b0| 61 63 6b 73 6c 61 73 68 | 24 7d 0a 0a 5c 62 65 67 |ackslash|$}..\beg|
|000000c0| 69 6e 7b 64 6f 63 75 6d | 65 6e 74 7d 0a 5c 6d 61 |in{docum|ent}.\ma|
|000000d0| 6b 65 74 69 74 6c 65 0a | 5c 73 65 63 74 69 6f 6e |ketitle.|\section|
|000000e0| 7b 49 6e 74 72 6f 64 75 | 63 74 69 6f 6e 7d 0a 0a |{Introdu|ction}..|
|000000f0| 4f 6e 65 20 6f 66 20 6f | 75 72 20 64 61 69 6c 79 |One of o|ur daily|
|00000100| 20 61 63 74 69 76 69 74 | 69 65 73 20 69 73 20 73 | activit|ies is s|
|00000110| 6f 6c 76 69 6e 67 20 70 | 72 6f 62 6c 65 6d 73 20 |olving p|roblems |
|00000120| 6f 66 20 61 6e 79 20 6b | 69 6e 64 2e 20 41 49 2d |of any k|ind. AI-|
|00000130| 72 65 73 65 61 72 63 68 | 20 68 61 73 0a 73 68 6f |research| has.sho|
|00000140| 77 6e 20 74 68 61 74 20 | 61 20 6c 6f 74 20 6f 66 |wn that |a lot of|
|00000150| 20 74 68 65 73 65 20 70 | 72 6f 62 6c 65 6d 73 20 | these p|roblems |
|00000160| 63 61 6e 20 65 71 75 61 | 6c 6c 79 20 77 65 6c 6c |can equa|lly well|
|00000170| 20 6f 72 20 73 6f 6d 65 | 74 69 6d 65 73 20 6d 6f | or some|times mo|
|00000180| 72 65 20 65 61 73 69 6c | 79 20 62 65 0a 73 6f 6c |re easil|y be.sol|
|00000190| 76 65 64 20 62 79 20 63 | 6f 6d 70 75 74 65 72 20 |ved by c|omputer |
|000001a0| 70 72 6f 67 72 61 6d 73 | 2e 20 54 6f 20 62 65 20 |programs|. To be |
|000001b0| 61 62 6c 65 20 74 6f 20 | 77 72 69 74 65 20 73 75 |able to |write su|
|000001c0| 63 68 20 61 20 70 72 6f | 62 6c 65 6d 2d 73 6f 6c |ch a pro|blem-sol|
|000001d0| 76 69 6e 67 20 70 72 6f | 67 72 61 6d 0a 69 74 20 |ving pro|gram.it |
|000001e0| 69 73 20 6e 65 63 65 73 | 73 61 72 79 20 74 6f 20 |is neces|sary to |
|000001f0| 67 69 76 65 20 61 6e 20 | 65 78 61 63 74 20 64 65 |give an |exact de|
|00000200| 73 63 72 69 70 74 69 6f | 6e 20 6f 66 20 74 68 65 |scriptio|n of the|
|00000210| 20 70 72 6f 62 6c 65 6d | 20 74 6f 20 62 65 20 73 | problem| to be s|
|00000220| 6f 6c 76 65 64 20 61 6e | 64 20 74 6f 0a 6b 6e 6f |olved an|d to.kno|
|00000230| 77 20 68 6f 77 20 69 74 | 20 63 61 6e 20 62 65 20 |w how it| can be |
|00000240| 64 65 66 69 6e 65 64 20 | 69 6e 20 74 65 72 6d 73 |defined |in terms|
|00000250| 20 74 68 61 74 20 66 61 | 63 69 6c 69 74 61 74 65 | that fa|cilitate|
|00000260| 20 74 68 65 20 74 72 61 | 6e 73 6c 61 74 69 6f 6e | the tra|nslation|
|00000270| 20 6f 66 20 74 68 65 0a | 70 72 6f 62 6c 65 6d 20 | of the.|problem |
|00000280| 69 6e 74 6f 20 61 20 63 | 6f 6d 70 75 74 65 72 20 |into a c|omputer |
|00000290| 70 72 6f 67 72 61 6d 2e | 20 49 6e 20 74 68 69 73 |program.| In this|
|000002a0| 20 70 61 70 65 72 20 77 | 65 20 66 69 72 73 74 20 | paper w|e first |
|000002b0| 65 78 70 6c 61 69 6e 20 | 74 68 65 20 74 68 65 6f |explain |the theo|
|000002c0| 72 79 20 6f 66 0a 70 72 | 6f 62 6c 65 6d 2d 73 6f |ry of.pr|oblem-so|
|000002d0| 6c 76 69 6e 67 20 69 6e | 20 41 49 20 61 6e 64 20 |lving in| AI and |
|000002e0| 6e 65 78 74 20 64 65 73 | 63 72 69 62 65 20 61 6e |next des|cribe an|
|000002f0| 20 69 6d 70 6c 65 6d 65 | 6e 74 61 74 69 6f 6e 20 | impleme|ntation |
|00000300| 6f 66 20 73 6f 6d 65 20 | 6f 66 20 74 68 65 20 69 |of some |of the i|
|00000310| 64 65 61 73 0a 70 72 65 | 73 65 6e 74 65 64 20 28 |deas.pre|sented (|
|00000320| 74 68 65 20 64 65 73 63 | 72 69 70 74 69 6f 6e 20 |the desc|ription |
|00000330| 6f 66 20 74 68 65 20 69 | 6d 70 6c 65 6d 65 6e 74 |of the i|mplement|
|00000340| 61 74 69 6f 6e 2c 20 63 | 61 6c 6c 65 64 20 74 68 |ation, c|alled th|
|00000350| 65 20 73 65 61 72 63 68 | 20 63 6c 61 73 73 0a 6c |e search| class.l|
|00000360| 69 62 72 61 72 79 2c 20 | 77 69 6c 6c 20 62 65 20 |ibrary, |will be |
|00000370| 71 75 69 74 65 20 72 6f | 75 67 68 2c 20 62 65 63 |quite ro|ugh, bec|
|00000380| 61 75 73 65 20 77 65 20 | 77 69 6c 6c 20 63 6f 6e |ause we |will con|
|00000390| 63 65 6e 74 72 61 74 65 | 20 6f 6e 20 68 6f 77 20 |centrate| on how |
|000003a0| 74 68 65 20 73 65 61 72 | 63 68 0a 63 6c 61 73 73 |the sear|ch.class|
|000003b0| 20 6c 69 62 72 61 72 79 | 20 6d 75 73 74 20 62 65 | library| must be|
|000003c0| 20 75 73 65 64 2e 20 46 | 6f 72 20 64 65 74 61 69 | used. F|or detai|
|000003d0| 6c 73 20 6f 6e 20 74 68 | 65 20 69 6d 70 6c 65 6d |ls on th|e implem|
|000003e0| 65 6e 74 61 74 69 6f 6e | 20 73 65 65 20 74 68 65 |entation| see the|
|000003f0| 20 63 6f 6d 6d 65 6e 74 | 73 0a 61 63 63 6f 6d 70 | comment|s.accomp|
|00000400| 61 6e 79 69 6e 67 20 74 | 68 65 20 73 6f 75 72 63 |anying t|he sourc|
|00000410| 65 20 63 6f 64 65 29 2e | 0a 0a 5c 73 65 63 74 69 |e code).|..\secti|
|00000420| 6f 6e 7b 50 72 6f 62 6c | 65 6d 20 72 65 70 72 65 |on{Probl|em repre|
|00000430| 73 65 6e 74 61 74 69 6f | 6e 20 61 6e 64 20 73 65 |sentatio|n and se|
|00000440| 61 72 63 68 20 74 65 63 | 68 6e 69 71 75 65 73 7d |arch tec|hniques}|
|00000450| 0a 0a 5c 73 75 62 73 65 | 63 74 69 6f 6e 7b 53 74 |..\subse|ction{St|
|00000460| 61 74 65 20 73 70 61 63 | 65 20 72 65 70 72 65 73 |ate spac|e repres|
|00000470| 65 6e 74 61 74 69 6f 6e | 20 61 6e 64 20 70 72 6f |entation| and pro|
|00000480| 62 6c 65 6d 20 72 65 64 | 75 63 74 69 6f 6e 7d 0a |blem red|uction}.|
|00000490| 0a 49 6e 20 74 68 69 73 | 20 73 65 63 74 69 6f 6e |.In this| section|
|000004a0| 2c 20 77 65 20 77 69 6c | 6c 20 64 65 73 63 72 69 |, we wil|l descri|
|000004b0| 62 65 20 74 77 6f 20 6d | 65 74 68 6f 64 73 20 63 |be two m|ethods c|
|000004c0| 6f 6d 6d 6f 6e 6c 79 20 | 75 73 65 64 20 69 6e 20 |ommonly |used in |
|000004d0| 70 72 6f 62 6c 65 6d 0a | 72 65 70 72 65 73 65 6e |problem.|represen|
|000004e0| 74 61 74 69 6f 6e 2e 20 | 41 73 20 61 20 73 61 6d |tation. |As a sam|
|000004f0| 70 6c 65 20 70 72 6f 62 | 6c 65 6d 20 74 68 65 20 |ple prob|lem the |
|00000500| 38 2d 70 75 7a 7a 6c 65 | 20 77 69 6c 6c 20 62 65 |8-puzzle| will be|
|00000510| 20 75 73 65 64 2e 20 54 | 68 65 20 38 2d 70 75 7a | used. T|he 8-puz|
|00000520| 7a 6c 65 0a 63 6f 6e 73 | 69 73 74 73 20 6f 66 20 |zle.cons|ists of |
|00000530| 38 20 6e 75 6d 62 65 72 | 65 64 2c 20 6d 6f 76 61 |8 number|ed, mova|
|00000540| 62 6c 65 20 74 69 6c 65 | 73 20 73 65 74 20 69 6e |ble tile|s set in|
|00000550| 20 61 20 33 20 58 20 33 | 20 66 72 61 6d 65 2e 20 | a 3 X 3| frame. |
|00000560| 4f 6e 65 20 6f 66 20 74 | 68 65 20 63 65 6c 6c 73 |One of t|he cells|
|00000570| 20 6f 66 0a 74 68 65 20 | 66 72 61 6d 65 20 69 73 | of.the |frame is|
|00000580| 20 61 6c 77 61 79 73 20 | 65 6d 70 74 79 2c 20 77 | always |empty, w|
|00000590| 68 69 63 68 20 6d 61 6b | 65 73 20 69 74 20 70 6f |hich mak|es it po|
|000005a0| 73 73 69 62 6c 65 20 74 | 6f 20 6d 6f 76 65 20 74 |ssible t|o move t|
|000005b0| 68 65 20 74 69 6c 65 73 | 2e 0a 0a 41 20 73 61 6d |he tiles|...A sam|
|000005c0| 70 6c 65 20 38 2d 70 75 | 7a 7a 6c 65 20 69 73 20 |ple 8-pu|zzle is |
|000005d0| 67 69 76 65 6e 20 69 6e | 20 66 69 67 2e 7e 5c 72 |given in| fig.~\r|
|000005e0| 65 66 7b 66 69 67 73 74 | 61 74 65 7d 2e 20 43 6f |ef{figst|ate}. Co|
|000005f0| 6e 73 69 64 65 72 20 74 | 68 65 20 70 72 6f 62 6c |nsider t|he probl|
|00000600| 65 6d 20 6f 66 0a 74 72 | 61 6e 73 66 6f 72 6d 69 |em of.tr|ansformi|
|00000610| 6e 67 20 74 68 65 20 66 | 69 72 73 74 20 63 6f 6e |ng the f|irst con|
|00000620| 66 69 67 75 72 61 74 69 | 6f 6e 20 69 6e 74 6f 20 |figurati|on into |
|00000630| 74 68 65 20 73 65 63 6f | 6e 64 20 6f 6e 65 2c 20 |the seco|nd one, |
|00000640| 6f 75 72 20 67 6f 61 6c | 2e 0a 0a 5c 62 65 67 69 |our goal|...\begi|
|00000650| 6e 7b 66 69 67 75 72 65 | 7d 5b 68 74 62 5d 0a 5c |n{figure|}[htb].\|
|00000660| 63 65 6e 74 65 72 69 6e | 67 0a 20 20 20 20 5c 62 |centerin|g. \b|
|00000670| 65 67 69 6e 7b 74 61 62 | 75 6c 61 72 7d 7b 72 72 |egin{tab|ular}{rr|
|00000680| 72 63 72 72 72 7d 0a 20 | 20 20 20 20 20 20 20 20 |rcrrr}. | |
|00000690| 20 20 20 32 20 26 20 31 | 20 26 20 36 20 20 20 20 | 2 & 1| & 6 |
|000006a0| 5c 68 73 70 61 63 65 7b | 32 63 6d 7d 20 20 20 20 |\hspace{|2cm} |
|000006b0| 20 20 20 20 20 20 20 26 | 20 31 20 26 20 32 20 26 | &| 1 & 2 &|
|000006c0| 20 33 20 5c 5c 0a 20 20 | 20 20 20 20 20 20 20 20 | 3 \\. | |
|000006d0| 20 20 34 20 26 20 30 20 | 26 20 38 20 20 20 20 5c | 4 & 0 |& 8 \|
|000006e0| 68 73 70 61 63 65 7b 32 | 63 6d 7d 20 20 20 20 20 |hspace{2|cm} |
|000006f0| 20 20 20 20 20 20 26 20 | 38 20 26 20 30 20 26 20 | & |8 & 0 & |
|00000700| 34 20 5c 5c 0a 20 20 20 | 20 20 20 20 20 20 20 20 |4 \\. | |
|00000710| 20 37 20 26 20 35 20 26 | 20 33 20 20 20 20 5c 68 | 7 & 5 &| 3 \h|
|00000720| 73 70 61 63 65 7b 32 63 | 6d 7d 20 20 20 20 20 20 |space{2c|m} |
|00000730| 20 20 20 20 20 26 20 37 | 20 26 20 36 20 26 20 35 | & 7| & 6 & 5|
|00000740| 20 5c 5c 0a 20 20 20 20 | 5c 65 6e 64 7b 74 61 62 | \\. |\end{tab|
|00000750| 75 6c 61 72 7d 0a 20 20 | 20 20 5c 63 61 70 74 69 |ular}. | \capti|
|00000760| 6f 6e 7b 54 68 65 20 38 | 2d 70 75 7a 7a 6c 65 2e |on{The 8|-puzzle.|
|00000770| 7d 5c 6c 61 62 65 6c 7b | 66 69 67 73 74 61 74 65 |}\label{|figstate|
|00000780| 7d 0a 5c 65 6e 64 7b 66 | 69 67 75 72 65 7d 0a 0a |}.\end{f|igure}..|
|00000790| 5c 6e 6f 69 6e 64 65 6e | 74 0a 54 6f 20 73 6f 6c |\noinden|t.To sol|
|000007a0| 76 65 20 74 68 69 73 20 | 70 75 7a 7a 6c 65 20 77 |ve this |puzzle w|
|000007b0| 65 20 74 72 79 20 6f 75 | 74 20 76 61 72 69 6f 75 |e try ou|t variou|
|000007c0| 73 20 6d 6f 76 65 73 20 | 70 72 6f 64 75 63 69 6e |s moves |producin|
|000007d0| 67 20 6e 65 77 20 63 6f | 6e 66 69 67 75 72 61 74 |g new co|nfigurat|
|000007e0| 69 6f 6e 73 0a 75 6e 74 | 69 6c 20 77 65 20 70 72 |ions.unt|il we pr|
|000007f0| 6f 64 75 63 65 20 74 68 | 65 20 67 6f 61 6c 20 63 |oduce th|e goal c|
|00000800| 6f 6e 66 69 67 75 72 61 | 74 69 6f 6e 2e 20 54 6f |onfigura|tion. To|
|00000810| 20 67 69 76 65 20 61 20 | 6d 6f 72 65 20 66 6f 72 | give a |more for|
|00000820| 6d 61 6c 0a 64 65 66 69 | 6e 69 74 69 6f 6e 20 6f |mal.defi|nition o|
|00000830| 66 20 74 68 69 73 20 70 | 72 6f 62 6c 65 6d 20 77 |f this p|roblem w|
|00000840| 65 20 73 61 79 20 74 68 | 61 74 20 77 65 20 61 72 |e say th|at we ar|
|00000850| 65 20 74 72 79 69 6e 67 | 20 74 6f 20 72 65 61 63 |e trying| to reac|
|00000860| 68 20 61 20 63 65 72 74 | 61 69 6e 20 7b 5c 65 6d |h a cert|ain {\em|
|00000870| 0a 67 6f 61 6c 5c 2c 7d | 20 63 6f 6e 66 69 67 75 |.goal\,}| configu|
|00000880| 72 61 74 69 6f 6e 20 73 | 74 61 72 74 69 6e 67 20 |ration s|tarting |
|00000890| 77 69 74 68 20 61 6e 20 | 7b 5c 65 6d 20 69 6e 69 |with an |{\em ini|
|000008a0| 74 69 61 6c 7d 20 63 6f | 6e 66 69 67 75 72 61 74 |tial} co|nfigurat|
|000008b0| 69 6f 6e 20 62 79 20 75 | 73 69 6e 67 0a 73 6f 6d |ion by u|sing.som|
|000008c0| 65 20 73 65 74 20 6f 66 | 20 7b 5c 65 6d 20 6f 70 |e set of| {\em op|
|000008d0| 65 72 61 74 6f 72 73 5c | 2c 7d 2e 20 41 6e 20 6f |erators\|,}. An o|
|000008e0| 70 65 72 61 74 6f 72 20 | 74 72 61 6e 73 66 6f 72 |perator |transfor|
|000008f0| 6d 73 20 6f 6e 65 20 63 | 6f 6e 66 69 67 75 72 61 |ms one c|onfigura|
|00000900| 74 69 6f 6e 20 69 6e 74 | 6f 0a 61 6e 6f 74 68 65 |tion int|o.anothe|
|00000910| 72 2c 20 69 6e 20 74 68 | 65 20 63 61 73 65 20 6f |r, in th|e case o|
|00000920| 66 20 74 68 65 20 38 2d | 70 75 7a 7a 6c 65 20 69 |f the 8-|puzzle i|
|00000930| 74 20 69 73 20 6d 6f 73 | 74 20 6e 61 74 75 72 61 |t is mos|t natura|
|00000940| 6c 20 74 6f 20 74 68 69 | 6e 6b 20 6f 66 20 34 20 |l to thi|nk of 4 |
|00000950| 73 75 63 68 0a 6f 70 65 | 72 61 74 6f 72 73 2c 20 |such.ope|rators, |
|00000960| 65 61 63 68 20 63 6f 72 | 72 65 73 70 6f 6e 64 69 |each cor|respondi|
|00000970| 6e 67 20 74 6f 20 6d 6f | 76 69 6e 67 20 74 68 65 |ng to mo|ving the|
|00000980| 20 65 6d 70 74 79 20 74 | 69 6c 65 3a 20 6d 6f 76 | empty t|ile: mov|
|00000990| 65 20 65 6d 70 74 79 20 | 74 69 6c 65 20 6c 65 66 |e empty |tile lef|
|000009a0| 74 2c 0a 6d 6f 76 65 20 | 65 6d 70 74 79 20 74 69 |t,.move |empty ti|
|000009b0| 6c 65 20 72 69 67 68 74 | 2c 20 6d 6f 76 65 20 65 |le right|, move e|
|000009c0| 6d 70 74 79 20 74 69 6c | 65 20 75 70 2c 20 6d 6f |mpty til|e up, mo|
|000009d0| 76 65 20 65 6d 70 74 79 | 20 74 69 6c 65 20 64 6f |ve empty| tile do|
|000009e0| 77 6e 2e 0a 0a 57 68 61 | 74 20 77 65 20 6a 75 73 |wn...Wha|t we jus|
|000009f0| 74 20 68 61 76 65 20 64 | 6f 6e 65 20 69 73 20 64 |t have d|one is d|
|00000a00| 65 66 69 6e 69 6e 67 20 | 74 68 65 20 70 72 6f 62 |efining |the prob|
|00000a10| 6c 65 6d 20 6f 66 20 73 | 6f 6c 76 69 6e 67 20 74 |lem of s|olving t|
|00000a20| 68 65 20 38 2d 70 75 7a | 7a 6c 65 20 69 6e 0a 74 |he 8-puz|zle in.t|
|00000a30| 65 72 6d 73 20 6f 66 20 | 61 20 7b 5c 65 6d 20 73 |erms of |a {\em s|
|00000a40| 74 61 74 65 20 73 70 61 | 63 65 20 73 65 61 72 63 |tate spa|ce searc|
|00000a50| 68 5c 2c 7d 2e 20 49 6e | 20 61 20 73 74 61 74 65 |h\,}. In| a state|
|00000a60| 20 73 70 61 63 65 20 73 | 65 61 72 63 68 20 74 68 | space s|earch th|
|00000a70| 65 20 6f 62 6a 65 63 74 | 20 69 73 20 74 6f 0a 72 |e object| is to.r|
|00000a80| 65 61 63 68 20 61 20 63 | 65 72 74 61 69 6e 20 67 |each a c|ertain g|
|00000a90| 6f 61 6c 20 7b 5c 65 6d | 20 73 74 61 74 65 5c 2c |oal {\em| state\,|
|00000aa0| 7d 20 73 74 61 72 74 69 | 6e 67 20 77 69 74 68 20 |} starti|ng with |
|00000ab0| 61 6e 20 69 6e 69 74 69 | 61 6c 20 73 74 61 74 65 |an initi|al state|
|00000ac0| 2e 20 49 6e 20 74 68 65 | 20 63 61 73 65 0a 6f 66 |. In the| case.of|
|00000ad0| 20 74 68 65 20 38 2d 70 | 75 7a 7a 6c 65 20 74 68 | the 8-p|uzzle th|
|00000ae0| 65 20 73 74 61 72 74 20 | 61 6e 64 20 67 6f 61 6c |e start |and goal|
|00000af0| 20 73 74 61 74 65 20 61 | 72 65 20 74 68 65 20 63 | state a|re the c|
|00000b00| 6f 6e 66 69 67 75 72 61 | 74 69 6f 6e 73 20 67 69 |onfigura|tions gi|
|00000b10| 76 65 6e 20 69 6e 0a 66 | 69 67 2e 7e 5c 72 65 66 |ven in.f|ig.~\ref|
|00000b20| 7b 66 69 67 73 74 61 74 | 65 7d 2e 0a 4d 6f 72 65 |{figstat|e}..More|
|00000b30| 20 67 65 6e 65 72 61 6c | 6c 79 20 77 65 20 63 61 | general|ly we ca|
|00000b40| 6e 20 73 61 79 20 74 68 | 61 74 20 65 76 65 72 79 |n say th|at every|
|00000b50| 20 63 6f 6e 66 69 67 75 | 72 61 74 69 6f 6e 20 77 | configu|ration w|
|00000b60| 65 20 70 72 6f 64 75 63 | 65 20 77 68 65 6e 20 74 |e produc|e when t|
|00000b70| 72 79 69 6e 67 20 74 6f | 0a 73 6f 6c 76 65 20 74 |rying to|.solve t|
|00000b80| 68 65 20 38 2d 70 75 7a | 7a 6c 65 20 63 6f 72 72 |he 8-puz|zle corr|
|00000b90| 65 73 70 6f 6e 64 73 20 | 74 6f 20 6f 6e 65 20 73 |esponds |to one s|
|00000ba0| 74 61 74 65 20 69 6e 20 | 74 68 65 20 73 74 61 74 |tate in |the stat|
|00000bb0| 65 20 73 70 61 63 65 2e | 20 41 6c 6c 20 74 68 65 |e space.| All the|
|00000bc0| 73 65 0a 73 74 61 74 65 | 73 20 74 6f 67 65 74 68 |se.state|s togeth|
|00000bd0| 65 72 2c 20 69 2e 65 2e | 2c 20 7b 5c 65 6d 20 61 |er, i.e.|, {\em a|
|00000be0| 6c 6c 20 70 6f 73 73 69 | 62 6c 65 5c 2c 7d 20 63 |ll possi|ble\,} c|
|00000bf0| 6f 6e 66 69 67 75 72 61 | 74 69 6f 6e 73 20 6d 61 |onfigura|tions ma|
|00000c00| 6b 65 20 75 70 20 74 68 | 65 20 73 74 61 74 65 0a |ke up th|e state.|
|00000c10| 73 70 61 63 65 2e 20 49 | 74 20 69 73 20 70 6f 73 |space. I|t is pos|
|00000c20| 73 69 62 6c 65 20 6f 66 | 20 63 6f 75 72 73 65 20 |sible of| course |
|00000c30| 74 6f 20 64 65 66 69 6e | 65 20 74 68 65 20 73 74 |to defin|e the st|
|00000c40| 61 74 65 20 73 70 61 63 | 65 20 77 69 74 68 6f 75 |ate spac|e withou|
|00000c50| 74 20 65 78 70 6c 69 63 | 69 74 6c 79 0a 65 6e 75 |t explic|itly.enu|
|00000c60| 6d 65 72 61 74 69 6e 67 | 20 61 6c 6c 20 73 74 61 |merating| all sta|
|00000c70| 74 65 73 2e 20 49 6e 64 | 65 65 64 2c 20 6d 6f 73 |tes. Ind|eed, mos|
|00000c80| 74 20 6f 66 20 74 68 65 | 20 74 69 6d 65 20 74 68 |t of the| time th|
|00000c90| 69 73 20 69 73 20 69 6d | 70 6f 73 73 69 62 6c 65 |is is im|possible|
|00000ca0| 0a 61 6e 64 20 74 68 65 | 20 73 74 61 74 65 20 73 |.and the| state s|
|00000cb0| 70 61 63 65 20 77 69 6c | 6c 20 62 65 20 64 65 66 |pace wil|l be def|
|00000cc0| 69 6e 65 64 20 69 6d 70 | 6c 69 63 69 74 6c 79 20 |ined imp|licitly |
|00000cd0| 62 79 20 70 72 6f 76 69 | 64 69 6e 67 20 72 75 6c |by provi|ding rul|
|00000ce0| 65 73 20 73 70 65 63 69 | 66 79 69 6e 67 0a 68 6f |es speci|fying.ho|
|00000cf0| 77 20 65 61 63 68 20 73 | 74 61 74 65 20 63 61 6e |w each s|tate can|
|00000d00| 20 62 65 20 64 65 72 69 | 76 65 64 20 66 72 6f 6d | be deri|ved from|
|00000d10| 20 61 6e 6f 74 68 65 72 | 2e 20 54 68 65 20 73 74 | another|. The st|
|00000d20| 61 74 65 20 73 70 61 63 | 65 20 6d 61 79 20 62 65 |ate spac|e may be|
|00000d30| 20 73 6d 61 6c 6c 20 61 | 73 20 69 6e 0a 74 68 65 | small a|s in.the|
|00000d40| 20 63 61 73 65 20 6f 66 | 20 74 68 65 20 38 2d 70 | case of| the 8-p|
|00000d50| 75 7a 7a 6c 65 2c 20 62 | 75 74 20 66 6f 72 20 6d |uzzle, b|ut for m|
|00000d60| 6f 73 74 20 65 76 65 72 | 79 20 64 61 79 20 70 72 |ost ever|y day pr|
|00000d70| 6f 62 6c 65 6d 73 20 6f | 72 20 6f 74 68 65 72 20 |oblems o|r other |
|00000d80| 62 6f 61 72 64 20 67 61 | 6d 65 73 0a 69 74 20 69 |board ga|mes.it i|
|00000d90| 73 20 71 75 69 74 65 20 | 6c 61 72 67 65 20 28 65 |s quite |large (e|
|00000da0| 2e 67 2e 2c 20 69 6e 20 | 63 68 65 73 73 20 74 68 |.g., in |chess th|
|00000db0| 65 20 74 6f 74 61 6c 20 | 6e 75 6d 62 65 72 20 6f |e total |number o|
|00000dc0| 66 20 70 6f 73 73 69 62 | 6c 65 20 62 6f 61 72 64 |f possib|le board|
|00000dd0| 20 63 6f 6e 66 69 67 75 | 72 61 74 69 6f 6e 73 2c | configu|rations,|
|00000de0| 0a 74 68 69 73 20 69 73 | 20 74 68 65 20 74 6f 74 |.this is| the tot|
|00000df0| 61 6c 20 6e 75 6d 62 65 | 72 20 6f 66 20 70 6f 73 |al numbe|r of pos|
|00000e00| 73 69 62 6c 65 20 73 74 | 61 74 65 73 2c 20 65 71 |sible st|ates, eq|
|00000e10| 75 61 6c 73 20 72 6f 75 | 67 68 6c 79 20 24 31 30 |uals rou|ghly $10|
|00000e20| 5e 7b 31 32 30 7d 24 29 | 2e 0a 4f 62 76 69 6f 75 |^{120}$)|..Obviou|
|00000e30| 73 6c 79 20 69 74 20 77 | 6f 75 6c 64 20 62 65 20 |sly it w|ould be |
|00000e40| 69 6d 70 6f 73 73 69 62 | 6c 65 20 74 6f 20 65 78 |impossib|le to ex|
|00000e50| 70 6c 6f 72 65 20 74 68 | 65 20 65 6e 74 69 72 65 |plore th|e entire|
|00000e60| 20 73 74 61 74 65 20 73 | 70 61 63 65 20 61 6e 64 | state s|pace and|
|00000e70| 20 6f 66 74 65 6e 0a 74 | 68 69 73 20 69 73 20 6e | often.t|his is n|
|00000e80| 6f 74 20 6e 65 65 64 65 | 64 2c 20 62 65 63 61 75 |ot neede|d, becau|
|00000e90| 73 65 20 77 65 20 61 72 | 65 20 69 6e 74 65 72 65 |se we ar|e intere|
|00000ea0| 73 74 65 64 20 69 6e 20 | 66 69 6e 64 69 6e 67 20 |sted in |finding |
|00000eb0| 6f 6e 6c 79 20 6f 6e 65 | 20 73 6f 6c 75 74 69 6f |only one| solutio|
|00000ec0| 6e 20 74 6f 0a 61 20 70 | 72 6f 62 6c 65 6d 2c 20 |n to.a p|roblem, |
|00000ed0| 69 2e 65 2e 2c 20 6f 6e | 6c 79 20 6f 6e 65 20 70 |i.e., on|ly one p|
|00000ee0| 61 74 68 20 6c 65 61 64 | 69 6e 67 20 66 72 6f 6d |ath lead|ing from|
|00000ef0| 20 74 68 65 20 73 74 61 | 72 74 20 73 74 61 74 65 | the sta|rt state|
|00000f00| 20 74 6f 20 74 68 65 20 | 67 6f 61 6c 20 73 74 61 | to the |goal sta|
|00000f10| 74 65 2e 0a 54 68 69 73 | 20 6d 65 61 6e 73 20 74 |te..This| means t|
|00000f20| 68 61 74 20 77 65 20 64 | 6f 20 6e 6f 74 20 68 61 |hat we d|o not ha|
|00000f30| 76 65 20 74 6f 20 73 65 | 61 72 63 68 20 74 68 65 |ve to se|arch the|
|00000f40| 20 73 74 61 74 65 20 73 | 70 61 63 65 20 7b 5c 65 | state s|pace {\e|
|00000f50| 6d 20 65 78 68 61 75 73 | 74 69 76 65 6c 79 5c 2c |m exhaus|tively\,|
|00000f60| 7d 2c 0a 62 75 74 20 61 | 20 73 6d 61 6c 6c 28 65 |},.but a| small(e|
|00000f70| 72 29 20 70 6f 72 74 69 | 6f 6e 20 69 6e 73 74 65 |r) porti|on inste|
|00000f80| 61 64 2e 20 54 68 65 20 | 70 72 6f 62 6c 65 6d 20 |ad. The |problem |
|00000f90| 6f 66 20 63 6f 75 72 73 | 65 20 69 73 2c 20 77 68 |of cours|e is, wh|
|00000fa0| 69 63 68 20 70 6f 72 74 | 69 6f 6e 3f 0a 0a 42 75 |ich port|ion?..Bu|
|00000fb0| 74 20 62 65 66 6f 72 65 | 20 77 65 20 61 72 65 20 |t before| we are |
|00000fc0| 67 6f 69 6e 67 20 74 6f | 20 64 69 73 63 75 73 73 |going to| discuss|
|00000fd0| 20 74 68 69 73 20 70 6f | 69 6e 74 20 69 74 20 77 | this po|int it w|
|00000fe0| 69 6c 6c 20 62 65 20 68 | 65 6c 70 66 75 6c 20 74 |ill be h|elpful t|
|00000ff0| 6f 20 6c 6f 6f 6b 0a 73 | 6f 6d 65 77 68 61 74 20 |o look.s|omewhat |
|00001000| 66 75 72 74 68 65 72 20 | 61 74 20 74 68 65 20 61 |further |at the a|
|00001010| 70 70 72 6f 61 63 68 20 | 77 65 20 68 61 76 65 20 |pproach |we have |
|00001020| 64 65 73 63 72 69 62 65 | 64 20 73 6f 20 66 61 72 |describe|d so far|
|00001030| 2e 20 57 65 20 73 61 69 | 64 20 74 68 61 74 20 74 |. We sai|d that t|
|00001040| 6f 0a 73 6f 6c 76 65 20 | 61 20 70 72 6f 62 6c 65 |o.solve |a proble|
|00001050| 6d 20 69 74 20 69 73 20 | 6e 65 63 65 73 73 61 72 |m it is |necessar|
|00001060| 79 20 74 6f 20 72 65 70 | 72 65 73 65 6e 74 20 74 |y to rep|resent t|
|00001070| 68 65 20 70 72 6f 62 6c | 65 6d 20 61 73 20 61 20 |he probl|em as a |
|00001080| 73 74 61 74 65 20 73 70 | 61 63 65 0a 73 65 61 72 |state sp|ace.sear|
|00001090| 63 68 2e 20 54 68 61 74 | 20 69 73 2c 20 77 65 20 |ch. That| is, we |
|000010a0| 64 65 66 69 6e 65 20 61 | 20 73 74 61 72 74 20 73 |define a| start s|
|000010b0| 74 61 74 65 2c 20 61 20 | 67 6f 61 6c 20 73 74 61 |tate, a |goal sta|
|000010c0| 74 65 20 61 6e 64 20 61 | 20 73 65 74 20 6f 66 20 |te and a| set of |
|000010d0| 6f 70 65 72 61 74 6f 72 | 73 0a 74 68 61 74 20 74 |operator|s.that t|
|000010e0| 72 61 6e 73 66 6f 72 6d | 20 6f 6e 65 20 73 74 61 |ransform| one sta|
|000010f0| 74 65 20 69 6e 74 6f 20 | 61 6e 6f 74 68 65 72 2e |te into |another.|
|00001100| 20 54 68 65 20 61 63 74 | 75 61 6c 20 73 65 61 72 | The act|ual sear|
|00001110| 63 68 20 63 6f 6e 73 69 | 73 74 73 20 69 6e 20 6d |ch consi|sts in m|
|00001120| 6f 76 69 6e 67 0a 61 72 | 6f 75 6e 64 20 69 6e 20 |oving.ar|ound in |
|00001130| 74 68 65 20 73 74 61 74 | 65 20 73 70 61 63 65 2c |the stat|e space,|
|00001140| 20 6c 6f 6f 6b 69 6e 67 | 20 66 6f 72 20 61 20 70 | looking| for a p|
|00001150| 61 74 68 20 66 72 6f 6d | 20 74 68 65 20 69 6e 69 |ath from| the ini|
|00001160| 74 69 61 6c 20 73 74 61 | 74 65 20 74 6f 20 74 68 |tial sta|te to th|
|00001170| 65 0a 67 6f 61 6c 20 73 | 74 61 74 65 2e 20 49 6e |e.goal s|tate. In|
|00001180| 20 74 68 69 73 20 63 61 | 73 65 20 74 68 65 20 73 | this ca|se the s|
|00001190| 65 61 72 63 68 20 70 72 | 6f 63 65 73 73 20 70 72 |earch pr|ocess pr|
|000011a0| 6f 63 65 65 64 73 20 66 | 6f 72 77 61 72 64 20 62 |oceeds f|orward b|
|000011b0| 65 63 61 75 73 65 20 77 | 65 20 73 74 61 72 74 0a |ecause w|e start.|
|000011c0| 77 69 74 68 20 74 68 65 | 20 69 6e 69 74 69 61 6c |with the| initial|
|000011d0| 20 73 74 61 74 65 20 61 | 6e 64 20 6d 6f 76 65 20 | state a|nd move |
|000011e0| 74 6f 77 61 72 64 73 20 | 74 68 65 20 67 6f 61 6c |towards |the goal|
|000011f0| 20 73 74 61 74 65 2e 20 | 48 65 6e 63 65 20 69 74 | state. |Hence it|
|00001200| 20 69 73 20 63 61 6c 6c | 65 64 20 61 0a 7b 5c 65 | is call|ed a.{\e|
|00001210| 6d 20 66 6f 72 77 61 72 | 64 20 72 65 61 73 6f 6e |m forwar|d reason|
|00001220| 69 6e 67 20 73 79 73 74 | 65 6d 5c 2c 7d 2e 20 54 |ing syst|em\,}. T|
|00001230| 68 65 20 6f 70 70 6f 73 | 69 74 65 20 62 65 68 61 |he oppos|ite beha|
|00001240| 76 69 6f 75 72 20 69 73 | 20 61 6c 73 6f 20 70 6f |viour is| also po|
|00001250| 73 73 69 62 6c 65 3a 20 | 61 0a 73 79 73 74 65 6d |ssible: |a.system|
|00001260| 20 73 74 61 72 74 69 6e | 67 20 74 68 65 20 73 65 | startin|g the se|
|00001270| 61 72 63 68 20 77 69 74 | 68 20 74 68 65 20 67 6f |arch wit|h the go|
|00001280| 61 6c 20 73 74 61 74 65 | 20 61 6e 64 20 6d 6f 76 |al state| and mov|
|00001290| 69 6e 67 20 62 61 63 6b | 77 61 72 64 20 74 6f 20 |ing back|ward to |
|000012a0| 74 68 65 0a 69 6e 69 74 | 69 61 6c 20 73 74 61 74 |the.init|ial stat|
|000012b0| 65 2e 20 49 6e 20 74 68 | 69 73 20 6d 65 74 68 6f |e. In th|is metho|
|000012c0| 64 2c 20 6f 66 74 65 6e | 20 63 61 6c 6c 65 64 20 |d, often| called |
|000012d0| 7b 5c 65 6d 20 62 61 63 | 6b 63 68 61 69 6e 69 6e |{\em bac|kchainin|
|000012e0| 67 5c 2c 7d 20 77 65 20 | 7b 5c 65 6d 20 72 65 61 |g\,} we |{\em rea|
|000012f0| 73 6f 6e 0a 62 61 63 6b | 77 61 72 64 5c 2c 7d 20 |son.back|ward\,} |
|00001300| 66 72 6f 6d 20 74 68 65 | 20 67 6f 61 6c 20 73 74 |from the| goal st|
|00001310| 61 74 65 73 2e 20 54 68 | 65 73 65 20 74 77 6f 20 |ates. Th|ese two |
|00001320| 74 65 63 68 6e 69 71 75 | 65 73 20 63 61 6e 20 62 |techniqu|es can b|
|00001330| 65 20 63 6f 6d 62 69 6e | 65 64 2c 0a 72 65 73 75 |e combin|ed,.resu|
|00001340| 6c 74 69 6e 67 20 69 6e | 20 61 20 7b 5c 65 6d 20 |lting in| a {\em |
|00001350| 62 69 64 69 72 65 63 74 | 69 6f 6e 61 6c 20 73 65 |bidirect|ional se|
|00001360| 61 72 63 68 5c 2c 7d 2e | 20 49 6e 20 74 68 65 20 |arch\,}.| In the |
|00001370| 63 61 73 65 20 6f 66 20 | 74 68 65 20 38 2d 70 75 |case of |the 8-pu|
|00001380| 7a 7a 6c 65 20 69 74 0a | 64 6f 65 73 20 6e 6f 74 |zzle it.|does not|
|00001390| 20 6d 61 6b 65 20 6d 75 | 63 68 20 64 69 66 66 65 | make mu|ch diffe|
|000013a0| 72 65 6e 63 65 20 69 66 | 20 77 65 20 6d 6f 76 65 |rence if| we move|
|000013b0| 20 66 6f 72 77 61 72 64 | 20 6f 72 20 62 61 63 6b | forward| or back|
|000013c0| 77 61 72 64 2c 20 62 65 | 63 61 75 73 65 20 61 62 |ward, be|cause ab|
|000013d0| 6f 75 74 20 74 68 65 0a | 73 61 6d 65 20 6e 75 6d |out the.|same num|
|000013e0| 62 65 72 20 6f 66 20 70 | 61 74 68 73 20 77 69 6c |ber of p|aths wil|
|000013f0| 6c 20 62 65 20 67 65 6e | 65 72 61 74 65 64 20 69 |l be gen|erated i|
|00001400| 6e 20 65 69 74 68 65 72 | 20 63 61 73 65 2c 20 62 |n either| case, b|
|00001410| 75 74 20 73 6f 6d 65 20 | 70 72 6f 62 6c 65 6d 73 |ut some |problems|
|00001420| 20 63 61 6e 20 62 65 0a | 73 6f 6c 76 65 64 20 6d | can be.|solved m|
|00001430| 6f 72 65 20 65 66 66 69 | 63 69 65 6e 74 6c 79 20 |ore effi|ciently |
|00001440| 77 68 65 6e 20 73 65 61 | 72 63 68 69 6e 67 20 69 |when sea|rching i|
|00001450| 6e 20 6f 6e 65 20 64 69 | 72 65 63 74 69 6f 6e 20 |n one di|rection |
|00001460| 72 61 74 68 65 72 20 74 | 68 61 6e 20 74 68 65 20 |rather t|han the |
|00001470| 6f 74 68 65 72 0a 28 73 | 65 65 20 52 69 63 68 20 |other.(s|ee Rich |
|00001480| 28 31 39 38 33 29 2c 20 | 70 2e 35 38 29 2e 0a 0a |(1983), |p.58)...|
|00001490| 41 20 64 69 66 66 65 72 | 65 6e 74 20 74 65 63 68 |A differ|ent tech|
|000014a0| 6e 69 71 75 65 2c 20 6f | 72 20 72 61 74 68 65 72 |nique, o|r rather|
|000014b0| 20 61 20 64 69 66 66 65 | 72 65 6e 74 20 77 61 79 | a diffe|rent way|
|000014c0| 20 74 6f 20 72 65 70 72 | 65 73 65 6e 74 20 70 72 | to repr|esent pr|
|000014d0| 6f 62 6c 65 6d 73 2c 20 | 74 68 61 74 0a 68 61 73 |oblems, |that.has|
|000014e0| 20 6e 6f 74 20 62 65 65 | 6e 20 6d 65 6e 74 69 6f | not bee|n mentio|
|000014f0| 6e 65 64 20 73 6f 20 66 | 61 72 20 69 73 20 74 68 |ned so f|ar is th|
|00001500| 61 74 20 6f 66 20 7b 5c | 65 6d 20 70 72 6f 62 6c |at of {\|em probl|
|00001510| 65 6d 20 72 65 64 75 63 | 74 69 6f 6e 5c 2c 7d 2e |em reduc|tion\,}.|
|00001520| 20 49 6e 20 74 68 69 73 | 0a 74 79 70 65 20 6f 66 | In this|.type of|
|00001530| 20 72 65 70 72 65 73 65 | 6e 74 61 74 69 6f 6e 20 | represe|ntation |
|00001540| 65 61 63 68 20 6f 70 65 | 72 61 74 6f 72 20 75 73 |each ope|rator us|
|00001550| 65 64 20 6d 61 79 20 64 | 69 76 69 64 65 20 74 68 |ed may d|ivide th|
|00001560| 65 20 70 72 6f 62 6c 65 | 6d 20 69 6e 74 6f 20 61 |e proble|m into a|
|00001570| 20 73 65 74 20 6f 66 0a | 73 75 62 2d 70 72 6f 62 | set of.|sub-prob|
|00001580| 6c 65 6d 73 20 74 68 61 | 74 20 65 61 63 68 20 68 |lems tha|t each h|
|00001590| 61 76 65 20 74 6f 20 62 | 65 20 73 6f 6c 76 65 64 |ave to b|e solved|
|000015a0| 20 73 65 70 65 72 61 74 | 65 6c 79 2e 20 41 64 64 | seperat|ely. Add|
|000015b0| 69 74 69 6f 6e 61 6c 6c | 79 2c 0a 74 68 65 72 65 |itionall|y,.there|
|000015c0| 20 6d 61 79 20 62 65 20 | 72 65 73 74 72 69 63 74 | may be |restrict|
|000015d0| 69 6f 6e 73 20 6f 6e 20 | 74 68 65 20 6f 72 64 65 |ions on |the orde|
|000015e0| 72 20 69 6e 20 77 68 69 | 63 68 20 74 68 65 73 65 |r in whi|ch these|
|000015f0| 20 73 75 62 2d 70 72 6f | 62 6c 65 6d 73 20 68 61 | sub-pro|blems ha|
|00001600| 76 65 20 74 6f 20 62 65 | 0a 73 6f 6c 76 65 64 5c |ve to be|.solved\|
|00001610| 66 6f 6f 74 6e 6f 74 65 | 7b 49 6e 20 74 68 65 20 |footnote|{In the |
|00001620| 73 65 61 72 63 68 20 63 | 6c 61 73 73 20 6c 69 62 |search c|lass lib|
|00001630| 72 61 72 79 20 69 74 20 | 69 73 20 61 73 73 75 6d |rary it |is assum|
|00001640| 65 64 20 74 68 61 74 20 | 73 75 62 2d 70 72 6f 62 |ed that |sub-prob|
|00001650| 6c 65 6d 73 0a 6d 75 73 | 74 20 62 65 20 73 6f 6c |lems.mus|t be sol|
|00001660| 76 65 64 20 69 6e 20 74 | 68 65 20 6f 72 64 65 72 |ved in t|he order|
|00001670| 20 69 6e 20 77 68 69 63 | 68 20 74 68 65 79 20 61 | in whic|h they a|
|00001680| 72 65 20 67 65 6e 65 72 | 61 74 65 64 2e 7d 2e 20 |re gener|ated.}. |
|00001690| 54 68 65 20 6f 62 6a 65 | 63 74 20 6f 66 20 70 72 |The obje|ct of pr|
|000016a0| 6f 62 6c 65 6d 0a 72 65 | 64 75 63 74 69 6f 6e 20 |oblem.re|duction |
|000016b0| 69 73 20 74 6f 20 65 76 | 65 6e 74 75 61 6c 6c 79 |is to ev|entually|
|000016c0| 20 70 72 6f 64 75 63 65 | 20 61 20 73 65 74 20 6f | produce| a set o|
|000016d0| 66 20 7b 5c 65 6d 20 70 | 72 69 6d 69 74 69 76 65 |f {\em p|rimitive|
|000016e0| 20 70 72 6f 62 6c 65 6d | 73 5c 2c 7d 5c 6c 61 62 | problem|s\,}\lab|
|000016f0| 65 6c 7b 70 72 69 6d 70 | 72 6f 62 7d 0a 77 68 6f |el{primp|rob}.who|
|00001700| 73 65 20 73 6f 6c 75 74 | 69 6f 6e 73 20 61 72 65 |se solut|ions are|
|00001710| 20 72 65 67 61 72 64 65 | 64 20 61 73 20 74 72 69 | regarde|d as tri|
|00001720| 76 69 61 6c 3a 20 61 74 | 20 74 68 69 73 20 73 74 |vial: at| this st|
|00001730| 61 67 65 20 74 68 65 20 | 70 72 6f 63 65 73 73 20 |age the |process |
|00001740| 6f 66 20 64 69 76 69 64 | 69 6e 67 0a 70 72 6f 62 |of divid|ing.prob|
|00001750| 6c 65 6d 73 20 69 6e 74 | 6f 20 73 75 62 2d 70 72 |lems int|o sub-pr|
|00001760| 6f 62 6c 65 6d 73 20 68 | 61 6c 74 73 2e 0a 0a 54 |oblems h|alts...T|
|00001770| 68 65 73 65 20 74 77 6f | 20 61 70 70 72 6f 61 63 |hese two| approac|
|00001780| 68 65 73 2c 20 73 74 61 | 74 65 20 73 70 61 63 65 |hes, sta|te space|
|00001790| 20 73 65 61 72 63 68 20 | 61 6e 64 20 70 72 6f 62 | search |and prob|
|000017a0| 6c 65 6d 20 72 65 64 75 | 63 74 69 6f 6e 2c 20 61 |lem redu|ction, a|
|000017b0| 72 65 20 74 77 6f 20 6f | 66 20 74 68 65 0a 6d 6f |re two o|f the.mo|
|000017c0| 73 74 20 63 6f 6d 6d 6f | 6e 20 6d 65 74 68 6f 64 |st commo|n method|
|000017d0| 73 20 75 73 65 64 20 69 | 6e 20 70 72 6f 62 6c 65 |s used i|n proble|
|000017e0| 6d 20 72 65 70 72 65 73 | 65 6e 74 61 74 69 6f 6e |m repres|entation|
|000017f0| 2c 20 61 6c 74 68 6f 75 | 67 68 20 76 61 72 69 61 |, althou|gh varia|
|00001800| 74 69 6f 6e 73 20 6f 66 | 0a 74 68 65 73 65 20 61 |tions of|.these a|
|00001810| 70 70 72 6f 61 63 68 65 | 73 2c 20 61 73 20 75 73 |pproache|s, as us|
|00001820| 65 64 20 69 6e 2c 20 65 | 2e 67 2e 2c 20 67 61 6d |ed in, e|.g., gam|
|00001830| 65 2d 70 6c 61 79 69 6e | 67 20 61 72 65 20 61 6c |e-playin|g are al|
|00001840| 73 6f 20 70 6f 73 73 69 | 62 6c 65 0a 28 73 65 65 |so possi|ble.(see|
|00001850| 20 42 61 72 72 28 31 39 | 38 31 29 2c 20 70 2e 38 | Barr(19|81), p.8|
|00001860| 34 66 66 2e 2c 20 52 69 | 74 63 68 28 31 39 38 33 |4ff., Ri|tch(1983|
|00001870| 29 2c 20 70 2e 31 31 33 | 66 66 2e 2c 20 4e 69 6c |), p.113|ff., Nil|
|00001880| 73 73 6f 6e 28 31 39 37 | 31 29 2c 20 70 2e 31 33 |sson(197|1), p.13|
|00001890| 37 66 66 29 2e 0a 0a 5c | 73 75 62 73 65 63 74 69 |7ff)...\|subsecti|
|000018a0| 6f 6e 7b 54 72 65 65 73 | 20 61 6e 64 20 67 72 61 |on{Trees| and gra|
|000018b0| 70 68 73 7d 0a 0a 53 6f | 20 66 61 72 20 77 65 20 |phs}..So| far we |
|000018c0| 68 61 76 65 20 73 65 65 | 6e 20 74 68 61 74 20 61 |have see|n that a|
|000018d0| 20 73 74 61 74 65 20 73 | 70 61 63 65 20 72 65 70 | state s|pace rep|
|000018e0| 72 65 73 65 6e 74 61 74 | 69 6f 6e 20 63 6f 6e 73 |resentat|ion cons|
|000018f0| 69 73 74 73 20 6f 66 20 | 74 68 65 20 66 6f 6c 6c |ists of |the foll|
|00001900| 6f 77 69 6e 67 0a 63 6f | 6d 70 6f 6e 65 6e 74 73 |owing.co|mponents|
|00001910| 3a 0a 5c 62 65 67 69 6e | 7b 69 74 65 6d 69 7a 65 |:.\begin|{itemize|
|00001920| 7d 0a 20 20 20 20 5c 69 | 74 65 6d 20 54 68 65 20 |}. \i|tem The |
|00001930| 73 74 61 74 65 20 64 65 | 73 63 72 69 70 74 69 6f |state de|scriptio|
|00001940| 6e 73 2e 0a 20 20 20 20 | 5c 69 74 65 6d 20 41 20 |ns.. |\item A |
|00001950| 73 74 61 72 74 20 73 74 | 61 74 65 2c 20 64 65 73 |start st|ate, des|
|00001960| 63 72 69 62 69 6e 67 20 | 74 68 65 20 73 69 74 75 |cribing |the situ|
|00001970| 61 74 69 6f 6e 20 66 72 | 6f 6d 20 77 68 69 63 68 |ation fr|om which|
|00001980| 20 74 68 65 0a 20 20 20 | 20 70 72 6f 62 6c 65 6d | the. | problem|
|00001990| 2d 73 6f 6c 76 69 6e 67 | 20 70 72 6f 63 65 73 73 |-solving| process|
|000019a0| 20 6d 61 79 20 73 74 61 | 72 74 2e 0a 20 20 20 20 | may sta|rt.. |
|000019b0| 5c 69 74 65 6d 20 41 20 | 67 6f 61 6c 20 73 74 61 |\item A |goal sta|
|000019c0| 74 65 2c 20 64 65 73 63 | 72 69 62 69 6e 67 20 61 |te, desc|ribing a|
|000019d0| 6e 20 61 63 63 65 70 74 | 61 62 6c 65 20 73 6f 6c |n accept|able sol|
|000019e0| 75 74 69 6f 6e 20 74 6f | 20 74 68 65 20 70 72 6f |ution to| the pro|
|000019f0| 62 6c 65 6d 2e 0a 20 20 | 20 20 5c 69 74 65 6d 20 |blem.. | \item |
|00001a00| 41 20 73 65 74 20 6f 66 | 20 6f 70 65 72 61 74 6f |A set of| operato|
|00001a10| 72 73 20 64 65 73 63 72 | 69 62 69 6e 67 20 68 6f |rs descr|ibing ho|
|00001a20| 77 20 74 6f 20 74 72 61 | 6e 73 66 6f 72 6d 20 6f |w to tra|nsform o|
|00001a30| 6e 65 20 73 74 61 74 65 | 20 69 6e 74 6f 0a 20 20 |ne state| into. |
|00001a40| 20 20 61 6e 6f 74 68 65 | 72 2e 0a 5c 65 6e 64 7b | anothe|r..\end{|
|00001a50| 69 74 65 6d 69 7a 65 7d | 0a 0a 5c 62 69 67 73 6b |itemize}|..\bigsk|
|00001a60| 69 70 5c 6e 6f 69 6e 64 | 65 6e 74 0a 41 6c 73 6f |ip\noind|ent.Also|
|00001a70| 2c 20 77 65 20 73 61 69 | 64 20 74 68 61 74 20 74 |, we sai|d that t|
|00001a80| 6f 20 73 6f 6c 76 65 20 | 61 20 70 72 6f 62 6c 65 |o solve |a proble|
|00001a90| 6d 20 77 65 20 64 6f 20 | 6e 6f 74 20 6e 65 65 64 |m we do |not need|
|00001aa0| 20 74 6f 20 73 65 61 72 | 63 68 20 74 68 65 20 65 | to sear|ch the e|
|00001ab0| 6e 74 69 72 65 20 73 74 | 61 74 65 0a 73 70 61 63 |ntire st|ate.spac|
|00001ac0| 65 20 62 75 74 20 6f 6e | 6c 79 20 74 68 61 74 20 |e but on|ly that |
|00001ad0| 70 61 72 74 20 77 68 69 | 63 68 20 6c 65 61 64 73 |part whi|ch leads|
|00001ae0| 20 74 6f 20 61 20 73 6f | 6c 75 74 69 6f 6e 2c 20 | to a so|lution, |
|00001af0| 69 2e 65 2e 2c 20 77 65 | 20 6e 65 65 64 20 74 6f |i.e., we| need to|
|00001b00| 20 73 65 61 72 63 68 20 | 66 6f 72 0a 61 6e 20 61 | search |for.an a|
|00001b10| 70 70 72 6f 70 72 69 61 | 74 65 20 6f 70 65 72 61 |ppropria|te opera|
|00001b20| 74 6f 72 20 73 65 71 75 | 65 6e 63 65 2c 20 74 72 |tor sequ|ence, tr|
|00001b30| 61 6e 73 66 6f 72 6d 69 | 6e 67 20 74 68 65 20 69 |ansformi|ng the i|
|00001b40| 6e 69 74 69 61 6c 20 73 | 74 61 74 65 20 74 68 72 |nitial s|tate thr|
|00001b50| 6f 75 67 68 20 61 0a 6e | 75 6d 62 65 72 20 6f 66 |ough a.n|umber of|
|00001b60| 20 69 6e 74 65 72 6d 65 | 64 69 61 74 65 20 73 74 | interme|diate st|
|00001b70| 61 74 65 73 20 69 6e 74 | 6f 20 74 68 65 20 67 6f |ates int|o the go|
|00001b80| 61 6c 20 73 74 61 74 65 | 2e 20 54 6f 20 70 65 72 |al state|. To per|
|00001b90| 66 6f 72 6d 20 74 68 69 | 73 20 73 65 61 72 63 68 |form thi|s search|
|00001ba0| 0a 73 79 73 74 65 6d 61 | 74 69 63 61 6c 6c 79 20 |.systema|tically |
|00001bb0| 77 65 20 6e 65 65 64 20 | 61 20 63 6f 6e 74 72 6f |we need |a contro|
|00001bc0| 6c 20 73 74 72 61 74 65 | 67 79 20 74 68 61 74 20 |l strate|gy that |
|00001bd0| 64 65 63 69 64 65 73 20 | 77 68 69 63 68 20 6f 70 |decides |which op|
|00001be0| 65 72 61 74 6f 72 20 74 | 6f 20 61 70 70 6c 79 0a |erator t|o apply.|
|00001bf0| 6e 65 78 74 20 64 75 72 | 69 6e 67 20 74 68 65 20 |next dur|ing the |
|00001c00| 73 65 61 72 63 68 2e 20 | 54 68 65 73 65 20 73 74 |search. |These st|
|00001c10| 72 61 74 65 67 69 65 73 | 20 61 72 65 20 63 6f 6d |rategies| are com|
|00001c20| 6d 6f 6e 6c 79 20 72 65 | 70 72 65 73 65 6e 74 65 |monly re|presente|
|00001c30| 64 20 75 73 69 6e 67 0a | 7b 5c 65 6d 20 74 72 65 |d using.|{\em tre|
|00001c40| 65 73 5c 2c 7d 5c 6c 61 | 62 65 6c 7b 74 72 65 65 |es\,}\la|bel{tree|
|00001c50| 70 72 6f 63 7d 5c 66 6f | 6f 74 6e 6f 74 65 7b 53 |proc}\fo|otnote{S|
|00001c60| 65 65 20 4b 6e 75 74 68 | 28 31 39 37 39 29 2c 20 |ee Knuth|(1979), |
|00001c70| 70 2e 33 30 35 66 66 2e | 20 66 6f 72 20 74 68 65 |p.305ff.| for the|
|00001c80| 20 63 6f 6e 63 65 70 74 | 0a 6f 66 20 74 72 65 65 | concept|.of tree|
|00001c90| 73 20 69 6e 20 63 6f 6d | 70 75 74 65 72 20 73 63 |s in com|puter sc|
|00001ca0| 69 65 6e 63 65 2e 7d 3a | 20 63 6f 6e 73 74 72 75 |ience.}:| constru|
|00001cb0| 63 74 20 61 20 74 72 65 | 65 20 77 69 74 68 20 74 |ct a tre|e with t|
|00001cc0| 68 65 20 69 6e 69 74 69 | 61 6c 20 73 74 61 74 65 |he initi|al state|
|00001cd0| 20 61 73 20 69 74 73 0a | 72 6f 6f 74 2c 20 6e 65 | as its.|root, ne|
|00001ce0| 78 74 20 67 65 6e 65 72 | 61 74 65 20 61 6c 6c 20 |xt gener|ate all |
|00001cf0| 74 68 65 20 6f 66 66 73 | 70 72 69 6e 67 20 6f 66 |the offs|pring of|
|00001d00| 20 74 68 65 20 72 6f 6f | 74 20 62 79 20 61 70 70 | the roo|t by app|
|00001d10| 6c 79 69 6e 67 20 61 6c | 6c 20 6f 66 20 74 68 65 |lying al|l of the|
|00001d20| 0a 61 70 70 6c 69 63 61 | 62 6c 65 20 6f 70 65 72 |.applica|ble oper|
|00001d30| 61 74 6f 72 73 20 74 6f | 20 74 68 65 20 69 6e 69 |ators to| the ini|
|00001d40| 74 69 61 6c 20 73 74 61 | 74 65 2c 20 6e 65 78 74 |tial sta|te, next|
|00001d50| 20 66 6f 72 20 65 76 65 | 72 79 20 6c 65 61 66 20 | for eve|ry leaf |
|00001d60| 6e 6f 64 65 20 67 65 6e | 65 72 61 74 65 20 69 74 |node gen|erate it|
|00001d70| 73 0a 73 75 63 63 65 73 | 73 6f 72 73 20 62 79 20 |s.succes|sors by |
|00001d80| 61 70 70 6c 79 69 6e 67 | 20 61 6c 6c 20 6f 66 20 |applying| all of |
|00001d90| 74 68 65 20 61 70 70 6c | 69 63 61 62 6c 65 20 6f |the appl|icable o|
|00001da0| 70 65 72 61 74 6f 72 73 | 2c 20 65 74 63 2e 20 57 |perators|, etc. W|
|00001db0| 68 65 6e 20 74 68 65 73 | 65 20 73 74 65 70 73 0a |hen thes|e steps.|
|00001dc0| 61 72 65 20 70 65 72 66 | 6f 72 6d 65 64 20 61 20 |are perf|ormed a |
|00001dd0| 73 74 72 75 63 74 75 72 | 65 20 61 73 20 64 69 73 |structur|e as dis|
|00001de0| 70 6c 61 79 65 64 20 69 | 6e 20 66 69 67 2e 7e 5c |played i|n fig.~\|
|00001df0| 72 65 66 7b 66 69 67 74 | 72 65 65 7d 20 73 74 72 |ref{figt|ree} str|
|00001e00| 75 63 74 75 72 65 20 77 | 69 6c 6c 0a 61 72 69 73 |ucture w|ill.aris|
|00001e10| 65 2e 0a 5c 62 65 67 69 | 6e 7b 66 69 67 75 72 65 |e..\begi|n{figure|
|00001e20| 7d 0a 5c 62 65 67 69 6e | 7b 63 65 6e 74 65 72 7d |}.\begin|{center}|
|00001e30| 0a 5c 75 6e 69 74 6c 65 | 6e 67 74 68 3d 30 2e 37 |.\unitle|ngth=0.7|
|00001e40| 30 6d 6d 0a 25 5c 73 70 | 65 63 69 61 6c 7b 65 6d |0mm.%\sp|ecial{em|
|00001e50| 3a 6c 69 6e 65 77 69 64 | 74 68 20 30 2e 34 70 74 |:linewid|th 0.4pt|
|00001e60| 7d 0a 5c 6c 69 6e 65 74 | 68 69 63 6b 6e 65 73 73 |}.\linet|hickness|
|00001e70| 7b 30 2e 34 70 74 7d 0a | 5c 62 65 67 69 6e 7b 70 |{0.4pt}.|\begin{p|
|00001e80| 69 63 74 75 72 65 7d 28 | 37 35 2e 30 30 2c 35 35 |icture}(|75.00,55|
|00001e90| 2e 30 30 29 0a 5c 70 75 | 74 28 31 30 2e 30 30 2c |.00).\pu|t(10.00,|
|00001ea0| 31 30 2e 30 30 29 7b 5c | 63 69 72 63 6c 65 7b 30 |10.00){\|circle{0|
|00001eb0| 2e 30 30 7d 7d 0a 5c 70 | 75 74 28 31 30 2e 30 30 |.00}}.\p|ut(10.00|
|00001ec0| 2c 31 30 2e 30 30 29 7b | 5c 63 69 72 63 6c 65 7b |,10.00){|\circle{|
|00001ed0| 31 30 2e 30 30 7d 7d 0a | 5c 70 75 74 28 33 30 2e |10.00}}.|\put(30.|
|00001ee0| 30 30 2c 31 30 2e 30 30 | 29 7b 5c 63 69 72 63 6c |00,10.00|){\circl|
|00001ef0| 65 7b 31 30 2e 30 30 7d | 7d 0a 5c 70 75 74 28 35 |e{10.00}|}.\put(5|
|00001f00| 30 2e 30 30 2c 31 30 2e | 30 30 29 7b 5c 63 69 72 |0.00,10.|00){\cir|
|00001f10| 63 6c 65 7b 31 30 2e 32 | 30 7d 7d 0a 5c 70 75 74 |cle{10.2|0}}.\put|
|00001f20| 28 37 30 2e 30 30 2c 31 | 30 2e 30 30 29 7b 5c 63 |(70.00,1|0.00){\c|
|00001f30| 69 72 63 6c 65 7b 31 30 | 2e 30 30 7d 7d 0a 5c 70 |ircle{10|.00}}.\p|
|00001f40| 75 74 28 32 30 2e 30 30 | 2c 33 30 2e 30 30 29 7b |ut(20.00|,30.00){|
|00001f50| 5c 63 69 72 63 6c 65 7b | 31 30 2e 30 30 7d 7d 0a |\circle{|10.00}}.|
|00001f60| 5c 70 75 74 28 36 30 2e | 30 30 2c 33 30 2e 30 30 |\put(60.|00,30.00|
|00001f70| 29 7b 5c 63 69 72 63 6c | 65 7b 31 30 2e 30 30 7d |){\circl|e{10.00}|
|00001f80| 7d 0a 5c 70 75 74 28 34 | 30 2e 30 30 2c 35 30 2e |}.\put(4|0.00,50.|
|00001f90| 30 30 29 7b 5c 63 69 72 | 63 6c 65 7b 31 30 2e 30 |00){\cir|cle{10.0|
|00001fa0| 30 7d 7d 0a 5c 70 75 74 | 28 33 37 2e 30 30 2c 34 |0}}.\put|(37.00,4|
|00001fb0| 36 2e 30 30 29 7b 5c 6c | 69 6e 65 28 2d 33 2c 2d |6.00){\l|ine(-3,-|
|00001fc0| 32 29 7b 31 37 2e 30 30 | 7d 7d 0a 5c 70 75 74 28 |2){17.00|}}.\put(|
|00001fd0| 34 33 2e 30 30 2c 34 36 | 2e 30 30 29 7b 5c 6c 69 |43.00,46|.00){\li|
|00001fe0| 6e 65 28 33 2c 2d 32 29 | 7b 31 37 2e 30 30 7d 7d |ne(3,-2)|{17.00}}|
|00001ff0| 0a 5c 70 75 74 28 31 37 | 2e 30 30 2c 32 36 2e 30 |.\put(17|.00,26.0|
|00002000| 30 29 7b 5c 6c 69 6e 65 | 28 2d 32 2c 2d 33 29 7b |0){\line|(-2,-3){|
|00002010| 37 2e 33 33 7d 7d 0a 5c | 70 75 74 28 32 33 2e 30 |7.33}}.\|put(23.0|
|00002020| 30 2c 32 36 2e 30 30 29 | 7b 5c 6c 69 6e 65 28 32 |0,26.00)|{\line(2|
|00002030| 2c 2d 33 29 7b 37 2e 33 | 33 7d 7d 0a 5c 70 75 74 |,-3){7.3|3}}.\put|
|00002040| 28 35 37 2e 30 30 2c 32 | 36 2e 30 30 29 7b 5c 6c |(57.00,2|6.00){\l|
|00002050| 69 6e 65 28 2d 32 2c 2d | 33 29 7b 37 2e 33 33 7d |ine(-2,-|3){7.33}|
|00002060| 7d 0a 5c 70 75 74 28 36 | 33 2e 30 30 2c 32 36 2e |}.\put(6|3.00,26.|
|00002070| 30 30 29 7b 5c 6c 69 6e | 65 28 32 2c 2d 33 29 7b |00){\lin|e(2,-3){|
|00002080| 37 2e 33 33 7d 7d 0a 5c | 70 75 74 28 34 30 2e 30 |7.33}}.\|put(40.0|
|00002090| 30 2c 35 30 2e 30 30 29 | 7b 5c 6d 61 6b 65 62 6f |0,50.00)|{\makebo|
|000020a0| 78 28 30 2c 30 29 5b 63 | 63 5d 7b 61 7d 7d 0a 5c |x(0,0)[c|c]{a}}.\|
|000020b0| 70 75 74 28 32 30 2e 30 | 30 2c 33 30 2e 30 30 29 |put(20.0|0,30.00)|
|000020c0| 7b 5c 6d 61 6b 65 62 6f | 78 28 30 2c 30 29 5b 63 |{\makebo|x(0,0)[c|
|000020d0| 63 5d 7b 62 7d 7d 0a 5c | 70 75 74 28 36 30 2e 30 |c]{b}}.\|put(60.0|
|000020e0| 30 2c 33 30 2e 30 30 29 | 7b 5c 6d 61 6b 65 62 6f |0,30.00)|{\makebo|
|000020f0| 78 28 30 2c 30 29 5b 63 | 63 5d 7b 63 7d 7d 0a 5c |x(0,0)[c|c]{c}}.\|
|00002100| 70 75 74 28 31 30 2e 30 | 30 2c 31 30 2e 30 30 29 |put(10.0|0,10.00)|
|00002110| 7b 5c 6d 61 6b 65 62 6f | 78 28 30 2c 30 29 5b 63 |{\makebo|x(0,0)[c|
|00002120| 63 5d 7b 64 7d 7d 0a 5c | 70 75 74 28 33 30 2e 30 |c]{d}}.\|put(30.0|
|00002130| 30 2c 31 30 2e 30 30 29 | 7b 5c 6d 61 6b 65 62 6f |0,10.00)|{\makebo|
|00002140| 78 28 30 2c 30 29 5b 63 | 63 5d 7b 65 7d 7d 0a 5c |x(0,0)[c|c]{e}}.\|
|00002150| 70 75 74 28 35 30 2e 30 | 30 2c 31 30 2e 30 30 29 |put(50.0|0,10.00)|
|00002160| 7b 5c 6d 61 6b 65 62 6f | 78 28 30 2c 30 29 5b 63 |{\makebo|x(0,0)[c|
|00002170| 63 5d 7b 66 7d 7d 0a 5c | 70 75 74 28 37 30 2e 30 |c]{f}}.\|put(70.0|
|00002180| 30 2c 31 30 2e 30 30 29 | 7b 5c 6d 61 6b 65 62 6f |0,10.00)|{\makebo|
|00002190| 78 28 30 2c 30 29 5b 63 | 63 5d 7b 67 7d 7d 0a 5c |x(0,0)[c|c]{g}}.\|
|000021a0| 65 6e 64 7b 70 69 63 74 | 75 72 65 7d 0a 20 20 20 |end{pict|ure}. |
|000021b0| 20 5c 63 61 70 74 69 6f | 6e 7b 53 74 61 72 74 20 | \captio|n{Start |
|000021c0| 6f 66 20 61 20 73 65 61 | 72 63 68 20 74 72 65 65 |of a sea|rch tree|
|000021d0| 7d 5c 6c 61 62 65 6c 7b | 66 69 67 74 72 65 65 7d |}\label{|figtree}|
|000021e0| 0a 5c 65 6e 64 7b 63 65 | 6e 74 65 72 7d 0a 5c 65 |.\end{ce|nter}.\e|
|000021f0| 6e 64 7b 66 69 67 75 72 | 65 7d 0a 49 6e 20 74 68 |nd{figur|e}.In th|
|00002200| 69 73 20 72 65 70 72 65 | 73 65 6e 74 61 74 69 6f |is repre|sentatio|
|00002210| 6e 20 65 76 65 72 79 20 | 6c 65 61 66 20 6e 6f 64 |n every |leaf nod|
|00002220| 65 20 63 6f 72 72 65 73 | 70 6f 6e 64 73 20 74 6f |e corres|ponds to|
|00002230| 20 61 20 73 74 61 74 65 | 2c 20 77 69 74 68 20 74 | a state|, with t|
|00002240| 68 65 20 72 6f 6f 74 0a | 6e 6f 64 65 20 72 65 70 |he root.|node rep|
|00002250| 72 65 73 65 6e 74 69 6e | 67 20 74 68 65 20 69 6e |resentin|g the in|
|00002260| 69 74 69 61 6c 20 73 74 | 61 74 65 2e 20 45 61 63 |itial st|ate. Eac|
|00002270| 68 20 6f 70 65 72 61 74 | 6f 72 20 61 70 70 6c 69 |h operat|or appli|
|00002280| 63 61 74 69 6f 6e 20 69 | 73 20 72 65 70 72 65 73 |cation i|s repres|
|00002290| 65 6e 74 65 64 20 62 79 | 0a 61 20 63 6f 6e 6e 65 |ented by|.a conne|
|000022a0| 63 74 69 6f 6e 20 62 65 | 74 77 65 65 6e 20 74 77 |ction be|tween tw|
|000022b0| 6f 20 6e 6f 64 65 73 2e | 0a 0a 54 72 65 65 73 20 |o nodes.|..Trees |
|000022c0| 61 72 65 20 61 20 73 70 | 65 63 69 61 6c 20 63 61 |are a sp|ecial ca|
|000022d0| 73 65 20 6f 66 20 61 20 | 6d 6f 72 65 20 67 65 6e |se of a |more gen|
|000022e0| 65 72 61 6c 20 73 74 72 | 75 63 74 75 72 65 20 63 |eral str|ucture c|
|000022f0| 61 6c 6c 65 64 20 61 20 | 7b 5c 65 6d 20 67 72 61 |alled a |{\em gra|
|00002300| 70 68 5c 2c 7d 0a 5c 66 | 6f 6f 74 6e 6f 74 65 7b |ph\,}.\f|ootnote{|
|00002310| 53 65 65 20 4e 69 6c 73 | 73 6f 6e 28 31 39 37 31 |See Nils|son(1971|
|00002320| 29 2c 20 70 2e 32 32 2c | 20 42 61 72 72 28 31 39 |), p.22,| Barr(19|
|00002330| 38 31 29 2c 20 70 2e 32 | 35 2f 32 36 2c 20 52 69 |81), p.2|5/26, Ri|
|00002340| 74 63 68 28 31 39 38 33 | 29 2c 20 70 2e 36 33 7d |tch(1983|), p.63}|
|00002350| 2e 0a 41 20 74 72 65 65 | 20 69 73 20 61 20 67 72 |..A tree| is a gr|
|00002360| 61 70 68 20 65 61 63 68 | 20 6f 66 20 77 68 6f 73 |aph each| of whos|
|00002370| 65 20 6e 6f 64 65 73 20 | 68 61 73 20 61 20 75 6e |e nodes |has a un|
|00002380| 69 71 75 65 20 70 61 72 | 65 6e 74 20 28 65 78 63 |ique par|ent (exc|
|00002390| 65 70 74 20 66 6f 72 20 | 74 68 65 20 72 6f 6f 74 |ept for |the root|
|000023a0| 0a 6e 6f 64 65 2c 20 77 | 68 69 63 68 20 68 61 73 |.node, w|hich has|
|000023b0| 20 6e 6f 20 70 61 72 65 | 6e 74 29 2e 20 53 65 61 | no pare|nt). Sea|
|000023c0| 72 63 68 69 6e 67 20 61 | 20 74 72 65 65 20 69 73 |rching a| tree is|
|000023d0| 20 65 61 73 69 65 72 20 | 74 68 61 6e 20 73 65 61 | easier |than sea|
|000023e0| 72 63 68 69 6e 67 20 61 | 20 67 72 61 70 68 2c 0a |rching a| graph,.|
|000023f0| 62 65 63 61 75 73 65 20 | 77 68 65 6e 20 61 20 6e |because |when a n|
|00002400| 65 77 20 6e 6f 64 65 20 | 69 73 20 67 65 6e 65 72 |ew node |is gener|
|00002410| 61 74 65 64 20 69 6e 20 | 74 68 65 20 74 72 65 65 |ated in |the tree|
|00002420| 20 77 65 20 63 61 6e 20 | 62 65 20 73 75 72 65 20 | we can |be sure |
|00002430| 69 74 20 68 61 73 20 6e | 6f 74 0a 62 65 65 6e 20 |it has n|ot.been |
|00002440| 67 65 6e 65 72 61 74 65 | 64 20 62 65 66 6f 72 65 |generate|d before|
|00002450| 2e 20 54 68 69 73 20 69 | 73 20 74 72 75 65 20 62 |. This i|s true b|
|00002460| 65 63 61 75 73 65 20 65 | 76 65 72 79 20 6e 6f 64 |ecause e|very nod|
|00002470| 65 20 68 61 73 20 6f 6e | 6c 79 20 6f 6e 65 20 70 |e has on|ly one p|
|00002480| 61 72 65 6e 74 2c 20 73 | 6f 0a 74 68 65 72 65 20 |arent, s|o.there |
|00002490| 63 61 6e 6e 6f 74 20 62 | 65 20 74 77 6f 20 6f 72 |cannot b|e two or|
|000024a0| 20 6d 6f 72 65 20 64 69 | 66 66 65 72 65 6e 74 20 | more di|fferent |
|000024b0| 70 61 74 68 73 20 6c 65 | 61 64 69 6e 67 20 74 6f |paths le|ading to|
|000024c0| 20 74 68 65 20 73 61 6d | 65 20 6e 6f 64 65 2e 20 | the sam|e node. |
|000024d0| 49 6e 20 61 0a 67 72 61 | 70 68 2c 20 68 6f 77 65 |In a.gra|ph, howe|
|000024e0| 76 65 72 2c 20 6e 6f 64 | 65 73 20 75 73 75 61 6c |ver, nod|es usual|
|000024f0| 6c 79 20 68 61 76 65 20 | 6d 6f 72 65 20 74 68 61 |ly have |more tha|
|00002500| 6e 20 6f 6e 65 20 70 61 | 72 65 6e 74 2e 20 20 54 |n one pa|rent. T|
|00002510| 68 65 72 65 66 6f 72 65 | 2c 20 77 68 65 6e 0a 73 |herefore|, when.s|
|00002520| 65 61 72 63 68 69 6e 67 | 20 61 20 67 72 61 70 68 |earching| a graph|
|00002530| 20 6f 6e 65 20 73 68 6f | 75 6c 64 20 6d 61 6b 65 | one sho|uld make|
|00002540| 20 70 72 6f 76 69 73 69 | 6f 6e 73 20 74 6f 20 64 | provisi|ons to d|
|00002550| 65 61 6c 20 77 69 74 68 | 20 74 68 65 73 65 20 73 |eal with| these s|
|00002560| 69 74 75 61 74 69 6f 6e | 73 2e 0a 53 61 79 69 6e |ituation|s..Sayin|
|00002570| 67 20 74 68 61 74 20 61 | 20 6e 6f 64 65 20 68 61 |g that a| node ha|
|00002580| 73 20 6d 6f 72 65 20 74 | 68 61 6e 20 6f 6e 65 20 |s more t|han one |
|00002590| 70 61 72 65 6e 74 20 6d | 65 61 6e 73 20 74 68 61 |parent m|eans tha|
|000025a0| 74 20 74 68 65 20 6e 6f | 64 65 20 69 73 20 67 65 |t the no|de is ge|
|000025b0| 6e 65 72 61 74 65 64 0a | 62 79 20 61 20 64 69 66 |nerated.|by a dif|
|000025c0| 66 65 72 65 6e 74 20 73 | 65 71 75 65 6e 63 65 20 |ferent s|equence |
|000025d0| 6f 66 20 74 68 65 20 73 | 61 6d 65 20 6f 70 65 72 |of the s|ame oper|
|000025e0| 61 74 6f 72 73 2e 20 54 | 68 61 74 20 69 73 2c 20 |ators. T|hat is, |
|000025f0| 74 68 65 20 73 61 6d 65 | 20 6e 6f 64 65 20 6d 61 |the same| node ma|
|00002600| 79 20 62 65 0a 70 61 72 | 74 20 6f 66 20 73 65 76 |y be.par|t of sev|
|00002610| 65 72 61 6c 20 70 61 74 | 68 73 2c 20 61 6e 64 20 |eral pat|hs, and |
|00002620| 63 6f 6e 74 69 6e 75 69 | 6e 67 20 74 68 65 20 70 |continui|ng the p|
|00002630| 72 6f 63 65 73 73 69 6e | 67 20 6f 66 20 62 6f 74 |rocessin|g of bot|
|00002640| 68 20 74 68 65 73 65 20 | 6e 6f 64 65 73 20 28 77 |h these |nodes (w|
|00002650| 68 69 63 68 20 61 72 65 | 0a 72 65 61 6c 6c 79 20 |hich are|.really |
|00002660| 74 68 65 20 73 61 6d 65 | 20 6e 6f 64 65 29 20 77 |the same| node) w|
|00002670| 6f 75 6c 64 20 62 65 20 | 72 65 64 75 6e 64 61 6e |ould be |redundan|
|00002680| 74 20 61 6e 64 20 61 20 | 77 61 73 74 65 20 6f 66 |t and a |waste of|
|00002690| 20 65 66 66 6f 72 74 2e | 20 54 68 69 73 20 63 61 | effort.| This ca|
|000026a0| 6e 20 62 65 0a 61 76 6f | 69 64 65 64 20 61 74 20 |n be.avo|ided at |
|000026b0| 74 68 65 20 70 72 69 63 | 65 20 6f 66 20 61 64 64 |the pric|e of add|
|000026c0| 69 74 69 6f 6e 61 6c 20 | 62 6f 6f 6b 6b 65 65 70 |itional |bookkeep|
|000026d0| 69 6e 67 2e 20 49 6e 73 | 74 65 61 64 20 6f 66 20 |ing. Ins|tead of |
|000026e0| 74 72 61 76 65 72 73 69 | 6e 67 20 61 20 74 72 65 |traversi|ng a tre|
|000026f0| 65 20 77 65 0a 74 72 61 | 76 65 72 73 65 20 61 20 |e we.tra|verse a |
|00002700| 7b 5c 65 6d 20 64 69 72 | 65 63 74 65 64 20 67 72 |{\em dir|ected gr|
|00002710| 61 70 68 5c 2c 7d 5c 66 | 6f 6f 74 6e 6f 74 65 7b |aph\,}\f|ootnote{|
|00002720| 4b 6e 75 74 68 28 31 39 | 37 39 29 2c 20 70 2e 33 |Knuth(19|79), p.3|
|00002730| 37 31 2e 7d 3a 20 65 76 | 65 72 79 20 74 69 6d 65 |71.}: ev|ery time|
|00002740| 20 61 0a 6e 6f 64 65 20 | 69 73 20 67 65 6e 65 72 | a.node |is gener|
|00002750| 61 74 65 64 20 77 65 20 | 65 78 61 6d 69 6e 65 20 |ated we |examine |
|00002760| 74 68 65 20 73 65 74 20 | 6f 66 20 6e 6f 64 65 73 |the set |of nodes|
|00002770| 20 67 65 6e 65 72 61 74 | 65 64 20 73 6f 20 66 61 | generat|ed so fa|
|00002780| 72 20 74 6f 20 73 65 65 | 20 69 66 20 74 68 69 73 |r to see| if this|
|00002790| 0a 6e 6f 64 65 20 61 6c | 72 65 61 64 79 20 65 78 |.node al|ready ex|
|000027a0| 69 73 74 73 20 69 6e 20 | 74 68 65 20 67 72 61 70 |ists in |the grap|
|000027b0| 68 2e 20 49 66 20 69 74 | 20 64 6f 65 73 2c 20 77 |h. If it| does, w|
|000027c0| 65 20 74 68 72 6f 77 20 | 69 74 20 61 77 61 79 20 |e throw |it away |
|000027d0| 28 6e 6f 74 65 3a 20 73 | 65 65 0a 70 61 67 65 7e |(note: s|ee.page~|
|000027e0| 5c 70 61 67 65 72 65 66 | 7b 67 72 61 70 68 2d 6b |\pageref|{graph-k|
|000027f0| 65 65 70 7d 20 66 6f 72 | 20 65 78 63 65 70 74 69 |eep} for| excepti|
|00002800| 6f 6e 73 20 74 6f 20 74 | 68 69 73 20 72 75 6c 65 |ons to t|his rule|
|00002810| 29 2c 20 69 66 20 6e 6f | 74 2c 20 77 65 20 61 64 |), if no|t, we ad|
|00002820| 64 20 69 74 20 74 6f 0a | 74 68 65 20 67 72 61 70 |d it to.|the grap|
|00002830| 68 2e 0a 0a 54 68 69 73 | 20 77 61 79 20 77 65 20 |h...This| way we |
|00002840| 77 69 6c 6c 20 61 6c 73 | 6f 20 61 76 6f 69 64 20 |will als|o avoid |
|00002850| 61 20 72 65 6c 61 74 65 | 64 20 70 72 6f 62 6c 65 |a relate|d proble|
|00002860| 6d 3a 20 69 66 20 77 65 | 20 64 69 64 20 6e 6f 74 |m: if we| did not|
|00002870| 20 63 68 65 63 6b 0a 77 | 68 65 74 68 65 72 20 61 | check.w|hether a|
|00002880| 20 6e 6f 64 65 20 68 61 | 64 20 62 65 65 6e 20 67 | node ha|d been g|
|00002890| 65 6e 65 72 61 74 65 64 | 20 62 65 66 6f 72 65 2c |enerated| before,|
|000028a0| 20 74 68 65 20 73 65 61 | 72 63 68 20 70 72 6f 63 | the sea|rch proc|
|000028b0| 65 73 73 20 77 6f 75 6c | 64 20 76 65 72 79 20 6c |ess woul|d very l|
|000028c0| 69 6b 65 6c 79 0a 65 6e | 64 20 75 70 20 69 6e 20 |ikely.en|d up in |
|000028d0| 61 20 7b 5c 65 6d 20 63 | 79 63 6c 65 5c 2c 7d 2c |a {\em c|ycle\,},|
|000028e0| 20 69 6e 20 77 68 69 63 | 68 20 74 68 65 20 73 61 | in whic|h the sa|
|000028f0| 6d 65 20 73 65 74 20 6f | 66 20 6e 6f 64 65 73 20 |me set o|f nodes |
|00002900| 69 73 20 67 65 6e 65 72 | 61 74 65 64 20 6f 76 65 |is gener|ated ove|
|00002910| 72 20 61 6e 64 20 6f 76 | 65 72 0a 61 67 61 69 6e |r and ov|er.again|
|00002920| 2e 20 46 6f 72 20 69 6e | 73 74 61 6e 63 65 2c 20 |. For in|stance, |
|00002930| 77 68 65 6e 20 77 65 20 | 61 70 70 6c 79 20 6f 70 |when we |apply op|
|00002940| 65 72 61 74 6f 72 20 27 | 6d 6f 76 65 20 65 6d 70 |erator '|move emp|
|00002950| 74 79 20 74 69 6c 65 20 | 6c 65 66 74 27 2c 20 6e |ty tile |left', n|
|00002960| 65 78 74 20 27 6d 6f 76 | 65 0a 65 6d 70 74 79 20 |ext 'mov|e.empty |
|00002970| 72 69 67 68 74 27 20 61 | 6e 64 20 6e 65 78 74 20 |right' a|nd next |
|00002980| 6d 6f 76 65 20 27 65 6d | 70 74 79 20 74 69 6c 65 |move 'em|pty tile|
|00002990| 20 6c 65 66 74 27 20 65 | 74 63 2e 20 74 6f 20 74 | left' e|tc. to t|
|000029a0| 68 65 20 38 2d 70 75 7a | 7a 6c 65 2c 20 74 68 65 |he 8-puz|zle, the|
|000029b0| 0a 70 72 6f 62 6c 65 6d | 2d 73 6f 6c 76 69 6e 67 |.problem|-solving|
|000029c0| 20 70 72 6f 63 65 73 73 | 20 77 6f 75 6c 64 20 67 | process| would g|
|000029d0| 6f 20 6f 6e 20 70 72 6f | 64 75 63 69 6e 67 20 74 |o on pro|ducing t|
|000029e0| 68 65 20 73 61 6d 65 20 | 6e 6f 64 65 73 20 77 69 |he same |nodes wi|
|000029f0| 74 68 6f 75 74 20 65 6e | 64 2e 20 57 68 65 6e 0a |thout en|d. When.|
|00002a00| 77 65 20 6d 6f 64 69 66 | 79 20 74 68 65 20 73 65 |we modif|y the se|
|00002a10| 61 72 63 68 20 70 72 6f | 63 65 64 75 72 65 20 61 |arch pro|cedure a|
|00002a20| 73 20 64 65 73 63 72 69 | 62 65 64 20 61 62 6f 76 |s descri|bed abov|
|00002a30| 65 2c 20 74 68 69 73 20 | 73 69 74 75 61 74 69 6f |e, this |situatio|
|00002a40| 6e 20 77 69 6c 6c 20 6e | 65 76 65 72 0a 61 72 69 |n will n|ever.ari|
|00002a50| 73 65 2c 20 62 65 63 61 | 75 73 65 20 77 65 20 74 |se, beca|use we t|
|00002a60| 72 79 20 74 6f 20 6c 6f | 6f 6b 20 75 70 20 65 76 |ry to lo|ok up ev|
|00002a70| 65 72 79 20 6e 6f 64 65 | 20 74 68 61 74 20 69 73 |ery node| that is|
|00002a80| 20 67 65 6e 65 72 61 74 | 65 64 2c 20 62 65 66 6f | generat|ed, befo|
|00002a90| 72 65 20 69 74 20 69 73 | 0a 61 64 64 65 64 20 74 |re it is|.added t|
|00002aa0| 6f 20 74 68 65 20 67 72 | 61 70 68 2e 0a 0a 41 20 |o the gr|aph...A |
|00002ab0| 73 70 65 63 69 61 6c 20 | 6b 69 6e 64 20 6f 66 20 |special |kind of |
|00002ac0| 67 72 61 70 68 20 69 73 | 20 74 68 65 20 7b 5c 65 |graph is| the {\e|
|00002ad0| 6d 20 41 4e 44 2f 4f 52 | 20 67 72 61 70 68 5c 2c |m AND/OR| graph\,|
|00002ae0| 7d 5c 6c 61 62 65 6c 7b | 61 6e 64 6f 72 67 72 61 |}\label{|andorgra|
|00002af0| 70 68 7d 20 74 68 61 74 | 20 69 73 20 75 73 65 64 |ph} that| is used|
|00002b00| 20 69 6e 0a 70 72 6f 62 | 6c 65 6d 2d 73 6f 6c 76 | in.prob|lem-solv|
|00002b10| 69 6e 67 20 6d 65 74 68 | 6f 64 73 20 69 6e 76 6f |ing meth|ods invo|
|00002b20| 6c 76 69 6e 67 20 70 72 | 6f 62 6c 65 6d 20 72 65 |lving pr|oblem re|
|00002b30| 64 75 63 74 69 6f 6e 2e | 20 49 6e 20 74 68 65 20 |duction.| In the |
|00002b40| 63 61 73 65 20 6f 66 20 | 61 20 6e 6f 72 6d 61 6c |case of |a normal|
|00002b50| 0a 67 72 61 70 68 2c 20 | 65 61 63 68 20 6e 6f 64 |.graph, |each nod|
|00002b60| 65 20 72 65 70 72 65 73 | 65 6e 74 73 20 61 20 64 |e repres|ents a d|
|00002b70| 69 66 66 65 72 65 6e 74 | 20 61 6c 74 65 72 6e 61 |ifferent| alterna|
|00002b80| 74 69 76 65 20 73 74 61 | 74 65 20 74 6f 20 62 65 |tive sta|te to be|
|00002b90| 20 63 68 6f 73 65 6e 20 | 6e 65 78 74 20 61 6e 64 | chosen |next and|
|00002ba0| 0a 74 68 65 20 73 65 61 | 72 63 68 20 70 72 6f 63 |.the sea|rch proc|
|00002bb0| 65 73 73 20 6d 61 79 20 | 63 6f 6e 74 69 6e 75 65 |ess may |continue|
|00002bc0| 20 61 6c 6f 6e 67 20 6f | 6e 65 20 6f 66 20 74 68 | along o|ne of th|
|00002bd0| 65 73 65 20 6e 6f 64 65 | 73 20 61 72 62 69 74 72 |ese node|s arbitr|
|00002be0| 61 74 69 6c 79 2e 20 49 | 6e 20 61 0a 70 72 6f 62 |atily. I|n a.prob|
|00002bf0| 6c 65 6d 2d 72 65 64 75 | 63 74 69 6f 6e 20 72 65 |lem-redu|ction re|
|00002c00| 70 72 65 73 65 6e 74 61 | 74 69 6f 6e 2c 20 68 6f |presenta|tion, ho|
|00002c10| 77 65 76 65 72 2c 20 77 | 65 20 61 6c 73 6f 20 6e |wever, w|e also n|
|00002c20| 65 65 64 20 74 6f 20 64 | 65 61 6c 20 77 69 74 68 |eed to d|eal with|
|00002c30| 20 6f 70 65 72 61 74 6f | 72 73 0a 74 68 61 74 20 | operato|rs.that |
|00002c40| 64 69 76 69 64 65 20 74 | 68 65 20 6f 72 69 67 69 |divide t|he origi|
|00002c50| 6e 61 6c 20 70 72 6f 62 | 6c 65 6d 20 69 6e 74 6f |nal prob|lem into|
|00002c60| 20 61 20 73 65 74 20 6f | 66 20 73 75 62 2d 70 72 | a set o|f sub-pr|
|00002c70| 6f 62 6c 65 6d 73 20 7b | 5c 65 6d 20 65 61 63 68 |oblems {|\em each|
|00002c80| 5c 2c 7d 20 6f 66 20 77 | 68 69 63 68 0a 6e 65 65 |\,} of w|hich.nee|
|00002c90| 64 20 74 6f 20 62 65 20 | 73 6f 6c 76 65 64 2c 20 |d to be |solved, |
|00002ca0| 69 6e 73 74 65 61 64 20 | 6f 66 20 61 6e 79 20 6f |instead |of any o|
|00002cb0| 66 20 74 68 65 6d 2e 20 | 46 6f 72 20 65 78 61 6d |f them. |For exam|
|00002cc0| 70 6c 65 2c 20 73 75 70 | 70 6f 73 65 20 70 72 6f |ple, sup|pose pro|
|00002cd0| 62 6c 65 6d 20 41 20 63 | 61 6e 20 62 65 20 73 6f |blem A c|an be so|
|00002ce0| 6c 76 65 64 0a 65 69 74 | 68 65 72 20 62 79 20 73 |lved.eit|her by s|
|00002cf0| 6f 6c 76 69 6e 67 20 70 | 72 6f 62 6c 65 6d 73 20 |olving p|roblems |
|00002d00| 42 20 61 6e 64 20 43 20 | 6f 72 20 62 79 20 73 6f |B and C |or by so|
|00002d10| 6c 76 69 6e 67 20 70 72 | 6f 62 6c 65 6d 73 20 44 |lving pr|oblems D|
|00002d20| 20 61 6e 64 20 45 20 6f | 72 20 62 79 20 73 6f 6c | and E o|r by sol|
|00002d30| 76 69 6e 67 0a 70 72 6f | 62 6c 65 6d 20 46 2e 20 |ving.pro|blem F. |
|00002d40| 54 68 69 73 20 73 69 74 | 75 61 74 69 6f 6e 20 69 |This sit|uation i|
|00002d50| 73 20 64 65 70 69 63 74 | 65 64 20 69 6e 20 66 69 |s depict|ed in fi|
|00002d60| 67 2e 7e 5c 72 65 66 7b | 66 69 67 74 72 65 65 5f |g.~\ref{|figtree_|
|00002d70| 32 7d 2e 0a 5c 62 65 67 | 69 6e 7b 66 69 67 75 72 |2}..\beg|in{figur|
|00002d80| 65 7d 0a 5c 62 65 67 69 | 6e 7b 63 65 6e 74 65 72 |e}.\begi|n{center|
|00002d90| 7d 0a 5c 75 6e 69 74 6c | 65 6e 67 74 68 3d 30 2e |}.\unitl|ength=0.|
|00002da0| 37 30 6d 6d 0a 25 5c 73 | 70 65 63 69 61 6c 7b 65 |70mm.%\s|pecial{e|
|00002db0| 6d 3a 6c 69 6e 65 77 69 | 64 74 68 20 30 2e 34 70 |m:linewi|dth 0.4p|
|00002dc0| 74 7d 0a 5c 6c 69 6e 65 | 74 68 69 63 6b 6e 65 73 |t}.\line|thicknes|
|00002dd0| 73 7b 30 2e 34 70 74 7d | 0a 5c 62 65 67 69 6e 7b |s{0.4pt}|.\begin{|
|00002de0| 70 69 63 74 75 72 65 7d | 28 37 35 2e 30 30 2c 35 |picture}|(75.00,5|
|00002df0| 35 2e 30 30 29 0a 5c 70 | 75 74 28 31 30 2e 30 30 |5.00).\p|ut(10.00|
|00002e00| 2c 31 30 2e 30 30 29 7b | 5c 63 69 72 63 6c 65 7b |,10.00){|\circle{|
|00002e10| 31 30 2e 30 30 7d 7d 0a | 5c 70 75 74 28 32 35 2e |10.00}}.|\put(25.|
|00002e20| 30 30 2c 31 30 2e 30 30 | 29 7b 5c 63 69 72 63 6c |00,10.00|){\circl|
|00002e30| 65 7b 31 30 2e 30 30 7d | 7d 0a 5c 70 75 74 28 34 |e{10.00}|}.\put(4|
|00002e40| 30 2e 30 30 2c 31 30 2e | 30 30 29 7b 5c 63 69 72 |0.00,10.|00){\cir|
|00002e50| 63 6c 65 7b 31 30 2e 30 | 30 7d 7d 0a 5c 70 75 74 |cle{10.0|0}}.\put|
|00002e60| 28 35 35 2e 30 30 2c 31 | 30 2e 30 30 29 7b 5c 63 |(55.00,1|0.00){\c|
|00002e70| 69 72 63 6c 65 7b 31 30 | 2e 30 30 7d 7d 0a 5c 70 |ircle{10|.00}}.\p|
|00002e80| 75 74 28 37 30 2e 30 30 | 2c 31 30 2e 30 30 29 7b |ut(70.00|,10.00){|
|00002e90| 5c 63 69 72 63 6c 65 7b | 31 30 2e 30 30 7d 7d 0a |\circle{|10.00}}.|
|00002ea0| 5c 70 75 74 28 34 30 2e | 30 30 2c 35 30 2e 30 30 |\put(40.|00,50.00|
|00002eb0| 29 7b 5c 63 69 72 63 6c | 65 7b 31 30 2e 30 30 7d |){\circl|e{10.00}|
|00002ec0| 7d 0a 5c 70 75 74 28 33 | 36 2e 30 30 2c 34 37 2e |}.\put(3|6.00,47.|
|00002ed0| 30 30 29 7b 5c 6c 69 6e | 65 28 2d 33 2c 2d 34 29 |00){\lin|e(-3,-4)|
|00002ee0| 7b 32 34 2e 30 30 7d 7d | 0a 5c 70 75 74 28 33 39 |{24.00}}|.\put(39|
|00002ef0| 2e 30 30 2c 34 35 2e 30 | 30 29 7b 5c 6c 69 6e 65 |.00,45.0|0){\line|
|00002f00| 28 30 2c 2d 31 29 7b 33 | 30 2e 30 30 7d 7d 0a 5c |(0,-1){3|0.00}}.\|
|00002f10| 70 75 74 28 34 32 2e 30 | 30 2c 34 35 2e 30 30 29 |put(42.0|0,45.00)|
|00002f20| 7b 5c 6c 69 6e 65 28 32 | 2c 2d 35 29 7b 31 32 2e |{\line(2|,-5){12.|
|00002f30| 30 30 7d 7d 0a 5c 70 75 | 74 28 34 30 2e 30 30 2c |00}}.\pu|t(40.00,|
|00002f40| 35 30 2e 30 30 29 7b 5c | 6d 61 6b 65 62 6f 78 28 |50.00){\|makebox(|
|00002f50| 30 2c 30 29 5b 63 63 5d | 7b 61 7d 7d 0a 5c 70 75 |0,0)[cc]|{a}}.\pu|
|00002f60| 74 28 31 30 2e 30 30 2c | 31 30 2e 30 30 29 7b 5c |t(10.00,|10.00){\|
|00002f70| 6d 61 6b 65 62 6f 78 28 | 30 2c 30 29 5b 63 63 5d |makebox(|0,0)[cc]|
|00002f80| 7b 62 7d 7d 0a 5c 70 75 | 74 28 32 35 2e 30 30 2c |{b}}.\pu|t(25.00,|
|00002f90| 31 30 2e 30 30 29 7b 5c | 6d 61 6b 65 62 6f 78 28 |10.00){\|makebox(|
|00002fa0| 30 2c 30 29 5b 63 63 5d | 7b 63 7d 7d 0a 5c 70 75 |0,0)[cc]|{c}}.\pu|
|00002fb0| 74 28 34 30 2e 30 30 2c | 31 30 2e 30 30 29 7b 5c |t(40.00,|10.00){\|
|00002fc0| 6d 61 6b 65 62 6f 78 28 | 30 2c 30 29 5b 63 63 5d |makebox(|0,0)[cc]|
|00002fd0| 7b 64 7d 7d 0a 5c 70 75 | 74 28 35 35 2e 30 30 2c |{d}}.\pu|t(55.00,|
|00002fe0| 31 30 2e 30 30 29 7b 5c | 6d 61 6b 65 62 6f 78 28 |10.00){\|makebox(|
|00002ff0| 30 2c 30 29 5b 63 63 5d | 7b 65 7d 7d 0a 5c 70 75 |0,0)[cc]|{e}}.\pu|
|00003000| 74 28 37 30 2e 30 30 2c | 31 30 2e 30 30 29 7b 5c |t(70.00,|10.00){\|
|00003010| 6d 61 6b 65 62 6f 78 28 | 30 2c 30 29 5b 63 63 5d |makebox(|0,0)[cc]|
|00003020| 7b 66 7d 7d 0a 5c 70 75 | 74 28 34 30 2e 30 30 2c |{f}}.\pu|t(40.00,|
|00003030| 33 33 2e 30 30 29 7b 5c | 6c 69 6e 65 28 36 2c 31 |33.00){\|line(6,1|
|00003040| 29 7b 36 2e 30 30 7d 7d | 0a 5c 70 75 74 28 33 37 |){6.00}}|.\put(37|
|00003050| 2e 30 30 2c 34 35 2e 30 | 30 29 7b 5c 6c 69 6e 65 |.00,45.0|0){\line|
|00003060| 28 2d 31 2c 2d 33 29 7b | 31 30 2e 30 30 7d 7d 0a |(-1,-3){|10.00}}.|
|00003070| 5c 70 75 74 28 34 34 2e | 30 30 2c 34 37 2e 30 30 |\put(44.|00,47.00|
|00003080| 29 7b 5c 6c 69 6e 65 28 | 34 2c 2d 35 29 7b 32 35 |){\line(|4,-5){25|
|00003090| 2e 36 37 7d 7d 0a 5c 70 | 75 74 28 32 36 2e 30 30 |.67}}.\p|ut(26.00|
|000030a0| 2c 33 35 2e 30 30 29 7b | 5c 6c 69 6e 65 28 36 2c |,35.00){|\line(6,|
|000030b0| 2d 35 29 7b 37 2e 30 30 | 7d 7d 0a 5c 65 6e 64 7b |-5){7.00|}}.\end{|
|000030c0| 70 69 63 74 75 72 65 7d | 0a 20 20 20 20 5c 63 61 |picture}|. \ca|
|000030d0| 70 74 69 6f 6e 7b 41 20 | 73 74 72 75 63 74 75 72 |ption{A |structur|
|000030e0| 65 20 73 68 6f 77 69 6e | 67 20 61 6c 74 65 72 6e |e showin|g altern|
|000030f0| 61 74 69 76 65 20 73 65 | 74 73 20 6f 66 20 73 75 |ative se|ts of su|
|00003100| 62 70 72 6f 62 6c 65 6d | 73 20 66 6f 72 20 41 2e |bproblem|s for A.|
|00003110| 7d 5c 6c 61 62 65 6c 7b | 66 69 67 74 72 65 65 5f |}\label{|figtree_|
|00003120| 32 7d 0a 5c 65 6e 64 7b | 63 65 6e 74 65 72 7d 0a |2}.\end{|center}.|
|00003130| 5c 65 6e 64 7b 66 69 67 | 75 72 65 7d 0a 49 6e 20 |\end{fig|ure}.In |
|00003140| 66 69 67 2e 7e 5c 72 65 | 66 7b 66 69 67 74 72 65 |fig.~\re|f{figtre|
|00003150| 65 5f 32 7d 20 74 68 65 | 20 6e 6f 64 65 73 20 77 |e_2} the| nodes w|
|00003160| 68 69 63 68 20 66 6f 72 | 6d 20 61 20 73 65 74 20 |hich for|m a set |
|00003170| 74 68 61 74 20 68 61 73 | 20 74 6f 20 62 65 20 73 |that has| to be s|
|00003180| 6f 6c 76 65 64 0a 65 6e | 74 69 72 65 6c 79 20 61 |olved.en|tirely a|
|00003190| 72 65 20 69 6e 64 69 63 | 61 74 65 64 20 62 79 20 |re indic|ated by |
|000031a0| 61 20 73 70 65 63 69 61 | 6c 20 6d 61 72 6b 20 6c |a specia|l mark l|
|000031b0| 69 6e 6b 69 6e 67 20 74 | 68 65 69 72 20 69 6e 63 |inking t|heir inc|
|000031c0| 6f 6d 69 6e 67 20 61 72 | 63 73 2e 20 49 74 20 69 |oming ar|cs. It i|
|000031d0| 73 0a 75 73 75 61 6c 2c | 20 68 6f 77 65 76 65 72 |s.usual,| however|
|000031e0| 2c 20 74 6f 20 69 6e 74 | 72 6f 64 75 63 65 20 73 |, to int|roduce s|
|000031f0| 6f 6d 65 20 65 78 74 72 | 61 20 6e 6f 64 65 73 20 |ome extr|a nodes |
|00003200| 69 6e 74 6f 20 74 68 65 | 20 73 74 72 75 63 74 75 |into the| structu|
|00003210| 72 65 20 73 6f 20 74 68 | 61 74 20 65 61 63 68 0a |re so th|at each.|
|00003220| 73 65 74 20 63 6f 6e 74 | 61 69 6e 69 6e 67 20 6d |set cont|aining m|
|00003230| 6f 72 65 20 74 68 61 6e | 20 6f 6e 65 20 73 75 63 |ore than| one suc|
|00003240| 63 65 73 73 6f 72 20 70 | 72 6f 62 6c 65 6d 20 69 |cessor p|roblem i|
|00003250| 73 20 67 72 6f 75 70 65 | 64 20 62 65 6c 6f 77 20 |s groupe|d below |
|00003260| 69 74 73 20 6f 77 6e 0a | 70 61 72 65 6e 74 20 6e |its own.|parent n|
|00003270| 6f 64 65 2e 20 57 69 74 | 68 20 74 68 69 73 20 63 |ode. Wit|h this c|
|00003280| 6f 6e 76 65 6e 74 69 6f | 6e 20 74 68 65 20 73 74 |onventio|n the st|
|00003290| 72 75 63 74 75 72 65 20 | 6f 66 20 66 69 67 2e 7e |ructure |of fig.~|
|000032a0| 5c 72 65 66 7b 66 69 67 | 74 72 65 65 5f 32 7d 0a |\ref{fig|tree_2}.|
|000032b0| 62 65 63 6f 6d 65 73 20 | 61 73 20 73 68 6f 77 6e |becomes |as shown|
|000032c0| 20 69 6e 20 66 69 67 2e | 7e 5c 72 65 66 7b 66 69 | in fig.|~\ref{fi|
|000032d0| 67 74 72 65 65 5f 33 7d | 2e 20 49 6e 20 74 68 69 |gtree_3}|. In thi|
|000032e0| 73 20 66 69 67 75 72 65 | 20 74 68 65 20 61 64 64 |s figure| the add|
|000032f0| 65 64 20 6e 6f 64 65 73 | 0a 6c 61 62 65 6c 6c 65 |ed nodes|.labelle|
|00003300| 64 20 4e 20 61 6e 64 20 | 4d 20 73 65 72 76 65 20 |d N and |M serve |
|00003310| 61 73 20 65 78 63 6c 75 | 73 69 76 65 20 70 61 72 |as exclu|sive par|
|00003320| 65 6e 74 73 20 66 6f 72 | 20 73 65 74 73 20 5c 7b |ents for| sets \{|
|00003330| 42 2c 43 5c 7d 20 61 6e | 64 20 5c 7b 44 2c 45 5c |B,C\} an|d \{D,E\|
|00003340| 7d 2c 20 72 65 73 70 65 | 63 74 69 76 65 6c 79 2e |}, respe|ctively.|
|00003350| 0a 54 68 69 73 20 77 61 | 79 20 6f 6e 65 20 63 61 |.This wa|y one ca|
|00003360| 6e 20 74 68 69 6e 6b 20 | 6f 66 20 4e 20 61 6e 64 |n think |of N and|
|00003370| 20 4d 20 61 6e 64 20 46 | 20 61 73 20 7b 5c 65 6d | M and F| as {\em|
|00003380| 20 4f 52 5c 2c 7d 20 6e | 6f 64 65 73 2c 20 62 65 | OR\,} n|odes, be|
|00003390| 63 61 75 73 65 20 61 6e | 79 20 6f 66 20 74 68 65 |cause an|y of the|
|000033a0| 6d 0a 6d 61 79 20 62 65 | 20 73 6f 6c 76 65 64 20 |m.may be| solved |
|000033b0| 74 6f 20 73 6f 6c 76 65 | 20 6e 6f 64 65 20 41 2e |to solve| node A.|
|000033c0| 20 50 72 6f 62 6c 65 6d | 20 4e 2c 20 68 6f 77 65 | Problem| N, howe|
|000033d0| 76 65 72 2c 20 69 73 20 | 72 65 64 75 63 65 64 20 |ver, is |reduced |
|000033e0| 74 6f 20 61 20 73 69 6e | 67 6c 65 0a 73 65 74 20 |to a sin|gle.set |
|000033f0| 6f 66 20 73 75 62 2d 70 | 72 6f 62 6c 65 6d 73 20 |of sub-p|roblems |
|00003400| 42 20 61 6e 64 20 43 2c | 20 61 6e 64 20 7b 5c 65 |B and C,| and {\e|
|00003410| 6d 20 65 61 63 68 5c 2c | 7d 20 6f 66 20 74 68 65 |m each\,|} of the|
|00003420| 73 65 20 73 75 62 2d 70 | 72 6f 62 6c 65 6d 73 20 |se sub-p|roblems |
|00003430| 6d 75 73 74 0a 62 65 20 | 73 6f 6c 76 65 64 20 74 |must.be |solved t|
|00003440| 6f 20 73 6f 6c 76 65 20 | 4e 2e 20 46 6f 72 20 74 |o solve |N. For t|
|00003450| 68 69 73 20 72 65 61 73 | 6f 6e 20 6e 6f 64 65 73 |his reas|on nodes|
|00003460| 20 42 2c 20 43 2c 20 44 | 20 61 6e 64 20 45 20 61 | B, C, D| and E a|
|00003470| 72 65 20 63 61 6c 6c 65 | 64 20 7b 5c 65 6d 20 41 |re calle|d {\em A|
|00003480| 4e 44 5c 2c 7d 0a 6e 6f | 64 65 73 2e 20 49 6e 20 |ND\,}.no|des. In |
|00003490| 66 69 67 2e 7e 5c 72 65 | 66 7b 66 69 67 74 72 65 |fig.~\re|f{figtre|
|000034a0| 65 5f 33 7d 20 41 4e 44 | 20 6e 6f 64 65 73 20 61 |e_3} AND| nodes a|
|000034b0| 72 65 20 69 6e 64 69 63 | 61 74 65 64 20 62 79 20 |re indic|ated by |
|000034c0| 61 20 6d 61 72 6b 20 6f | 6e 20 74 68 65 69 72 0a |a mark o|n their.|
|000034d0| 69 6e 63 6f 6d 69 6e 67 | 20 61 72 63 73 2e 0a 5c |incoming| arcs..\|
|000034e0| 62 65 67 69 6e 7b 66 69 | 67 75 72 65 7d 0a 5c 62 |begin{fi|gure}.\b|
|000034f0| 65 67 69 6e 7b 63 65 6e | 74 65 72 7d 0a 5c 75 6e |egin{cen|ter}.\un|
|00003500| 69 74 6c 65 6e 67 74 68 | 3d 30 2e 37 30 6d 6d 0a |itlength|=0.70mm.|
|00003510| 25 5c 73 70 65 63 69 61 | 6c 7b 65 6d 3a 6c 69 6e |%\specia|l{em:lin|
|00003520| 65 77 69 64 74 68 20 30 | 2e 34 70 74 7d 0a 5c 6c |ewidth 0|.4pt}.\l|
|00003530| 69 6e 65 74 68 69 63 6b | 6e 65 73 73 7b 30 2e 34 |inethick|ness{0.4|
|00003540| 70 74 7d 0a 5c 62 65 67 | 69 6e 7b 70 69 63 74 75 |pt}.\beg|in{pictu|
|00003550| 72 65 7d 28 38 30 2e 30 | 30 2c 36 35 2e 30 30 29 |re}(80.0|0,65.00)|
|00003560| 0a 5c 70 75 74 28 31 30 | 2e 30 30 2c 31 30 2e 30 |.\put(10|.00,10.0|
|00003570| 30 29 7b 5c 63 69 72 63 | 6c 65 7b 31 30 2e 30 30 |0){\circ|le{10.00|
|00003580| 7d 7d 0a 5c 70 75 74 28 | 32 35 2e 30 30 2c 31 30 |}}.\put(|25.00,10|
|00003590| 2e 30 30 29 7b 5c 63 69 | 72 63 6c 65 7b 31 30 2e |.00){\ci|rcle{10.|
|000035a0| 30 30 7d 7d 0a 5c 70 75 | 74 28 34 30 2e 30 30 2c |00}}.\pu|t(40.00,|
|000035b0| 31 30 2e 30 30 29 7b 5c | 63 69 72 63 6c 65 7b 31 |10.00){\|circle{1|
|000035c0| 30 2e 30 30 7d 7d 0a 5c | 70 75 74 28 35 35 2e 30 |0.00}}.\|put(55.0|
|000035d0| 30 2c 31 30 2e 30 30 29 | 7b 5c 63 69 72 63 6c 65 |0,10.00)|{\circle|
|000035e0| 7b 31 30 2e 30 30 7d 7d | 0a 5c 70 75 74 28 31 38 |{10.00}}|.\put(18|
|000035f0| 2e 30 30 2c 33 30 2e 30 | 30 29 7b 5c 63 69 72 63 |.00,30.0|0){\circ|
|00003600| 6c 65 7b 31 30 2e 30 30 | 7d 7d 0a 5c 70 75 74 28 |le{10.00|}}.\put(|
|00003610| 34 38 2e 30 30 2c 33 30 | 2e 30 30 29 7b 5c 63 69 |48.00,30|.00){\ci|
|00003620| 72 63 6c 65 7b 31 30 2e | 30 30 7d 7d 0a 5c 70 75 |rcle{10.|00}}.\pu|
|00003630| 74 28 37 35 2e 30 30 2c | 33 30 2e 30 30 29 7b 5c |t(75.00,|30.00){\|
|00003640| 63 69 72 63 6c 65 7b 31 | 30 2e 30 30 7d 7d 0a 5c |circle{1|0.00}}.\|
|00003650| 70 75 74 28 34 38 2e 30 | 30 2c 36 30 2e 30 30 29 |put(48.0|0,60.00)|
|00003660| 7b 5c 63 69 72 63 6c 65 | 7b 31 30 2e 30 30 7d 7d |{\circle|{10.00}}|
|00003670| 0a 5c 70 75 74 28 34 38 | 2e 30 30 2c 35 35 2e 30 |.\put(48|.00,55.0|
|00003680| 30 29 7b 5c 6c 69 6e 65 | 28 30 2c 2d 31 29 7b 31 |0){\line|(0,-1){1|
|00003690| 39 2e 30 30 7d 7d 0a 5c | 70 75 74 28 31 30 2e 30 |9.00}}.\|put(10.0|
|000036a0| 30 2c 31 30 2e 30 30 29 | 7b 5c 6d 61 6b 65 62 6f |0,10.00)|{\makebo|
|000036b0| 78 28 30 2c 30 29 5b 63 | 63 5d 7b 62 7d 7d 0a 5c |x(0,0)[c|c]{b}}.\|
|000036c0| 70 75 74 28 32 35 2e 30 | 30 2c 31 30 2e 30 30 29 |put(25.0|0,10.00)|
|000036d0| 7b 5c 6d 61 6b 65 62 6f | 78 28 30 2c 30 29 5b 63 |{\makebo|x(0,0)[c|
|000036e0| 63 5d 7b 63 7d 7d 0a 5c | 70 75 74 28 34 30 2e 30 |c]{c}}.\|put(40.0|
|000036f0| 30 2c 31 30 2e 30 30 29 | 7b 5c 6d 61 6b 65 62 6f |0,10.00)|{\makebo|
|00003700| 78 28 30 2c 30 29 5b 63 | 63 5d 7b 64 7d 7d 0a 5c |x(0,0)[c|c]{d}}.\|
|00003710| 70 75 74 28 35 35 2e 30 | 30 2c 31 30 2e 30 30 29 |put(55.0|0,10.00)|
|00003720| 7b 5c 6d 61 6b 65 62 6f | 78 28 30 2c 30 29 5b 63 |{\makebo|x(0,0)[c|
|00003730| 63 5d 7b 65 7d 7d 0a 5c | 70 75 74 28 31 35 2e 30 |c]{e}}.\|put(15.0|
|00003740| 30 2c 32 35 2e 30 30 29 | 7b 5c 6c 69 6e 65 28 2d |0,25.00)|{\line(-|
|00003750| 31 2c 2d 32 29 7b 35 2e | 30 30 7d 7d 0a 5c 70 75 |1,-2){5.|00}}.\pu|
|00003760| 74 28 32 30 2e 30 30 2c | 32 35 2e 30 30 29 7b 5c |t(20.00,|25.00){\|
|00003770| 6c 69 6e 65 28 31 2c 2d | 32 29 7b 35 2e 30 30 7d |line(1,-|2){5.00}|
|00003780| 7d 0a 5c 70 75 74 28 35 | 30 2e 30 30 2c 32 35 2e |}.\put(5|0.00,25.|
|00003790| 30 30 29 7b 5c 72 75 6c | 65 7b 31 2e 30 30 5c 75 |00){\rul|e{1.00\u|
|000037a0| 6e 69 74 6c 65 6e 67 74 | 68 7d 7b 30 2e 30 30 5c |nitlengt|h}{0.00\|
|000037b0| 75 6e 69 74 6c 65 6e 67 | 74 68 7d 7d 0a 5c 70 75 |unitleng|th}}.\pu|
|000037c0| 74 28 34 35 2e 30 30 2c | 32 35 2e 30 30 29 7b 5c |t(45.00,|25.00){\|
|000037d0| 6c 69 6e 65 28 2d 31 2c | 2d 32 29 7b 35 2e 30 30 |line(-1,|-2){5.00|
|000037e0| 7d 7d 0a 5c 70 75 74 28 | 35 30 2e 30 30 2c 32 35 |}}.\put(|50.00,25|
|000037f0| 2e 30 30 29 7b 5c 6c 69 | 6e 65 28 31 2c 2d 32 29 |.00){\li|ne(1,-2)|
|00003800| 7b 35 2e 30 30 7d 7d 0a | 5c 70 75 74 28 34 35 2e |{5.00}}.|\put(45.|
|00003810| 30 30 2c 35 36 2e 30 30 | 29 7b 5c 6c 69 6e 65 28 |00,56.00|){\line(|
|00003820| 2d 36 2c 2d 35 29 7b 32 | 35 2e 30 30 7d 7d 0a 5c |-6,-5){2|5.00}}.\|
|00003830| 70 75 74 28 35 31 2e 30 | 30 2c 35 35 2e 30 30 29 |put(51.0|0,55.00)|
|00003840| 7b 5c 6c 69 6e 65 28 36 | 2c 2d 35 29 7b 32 34 2e |{\line(6|,-5){24.|
|00003850| 30 30 7d 7d 0a 5c 70 75 | 74 28 34 38 2e 30 30 2c |00}}.\pu|t(48.00,|
|00003860| 36 30 2e 30 30 29 7b 5c | 6d 61 6b 65 62 6f 78 28 |60.00){\|makebox(|
|00003870| 30 2c 30 29 5b 63 63 5d | 7b 61 7d 7d 0a 5c 70 75 |0,0)[cc]|{a}}.\pu|
|00003880| 74 28 31 38 2e 30 30 2c | 33 30 2e 30 30 29 7b 5c |t(18.00,|30.00){\|
|00003890| 6d 61 6b 65 62 6f 78 28 | 30 2c 30 29 5b 63 63 5d |makebox(|0,0)[cc]|
|000038a0| 7b 6e 7d 7d 0a 5c 70 75 | 74 28 34 38 2e 30 30 2c |{n}}.\pu|t(48.00,|
|000038b0| 33 30 2e 30 30 29 7b 5c | 6d 61 6b 65 62 6f 78 28 |30.00){\|makebox(|
|000038c0| 30 2c 30 29 5b 63 63 5d | 7b 6d 7d 7d 0a 5c 70 75 |0,0)[cc]|{m}}.\pu|
|000038d0| 74 28 37 35 2e 30 30 2c | 33 30 2e 30 30 29 7b 5c |t(75.00,|30.00){\|
|000038e0| 6d 61 6b 65 62 6f 78 28 | 30 2c 30 29 5b 63 63 5d |makebox(|0,0)[cc]|
|000038f0| 7b 66 7d 7d 0a 5c 70 75 | 74 28 31 33 2e 30 30 2c |{f}}.\pu|t(13.00,|
|00003900| 32 31 2e 30 30 29 7b 5c | 6c 69 6e 65 28 31 2c 30 |21.00){\|line(1,0|
|00003910| 29 7b 39 2e 30 30 7d 7d | 0a 5c 70 75 74 28 34 33 |){9.00}}|.\put(43|
|00003920| 2e 30 30 2c 32 31 2e 30 | 30 29 7b 5c 6c 69 6e 65 |.00,21.0|0){\line|
|00003930| 28 31 2c 30 29 7b 31 30 | 2e 30 30 7d 7d 0a 5c 65 |(1,0){10|.00}}.\e|
|00003940| 6e 64 7b 70 69 63 74 75 | 72 65 7d 0a 20 20 20 20 |nd{pictu|re}. |
|00003950| 5c 63 61 70 74 69 6f 6e | 7b 41 6e 20 41 4e 44 2f |\caption|{An AND/|
|00003960| 4f 52 20 67 72 61 70 68 | 7d 5c 6c 61 62 65 6c 7b |OR graph|}\label{|
|00003970| 66 69 67 74 72 65 65 5f | 33 7d 0a 5c 65 6e 64 7b |figtree_|3}.\end{|
|00003980| 63 65 6e 74 65 72 7d 0a | 5c 65 6e 64 7b 66 69 67 |center}.|\end{fig|
|00003990| 75 72 65 7d 0a 0a 5c 73 | 75 62 73 65 63 74 69 6f |ure}..\s|ubsectio|
|000039a0| 6e 7b 42 61 73 69 63 20 | 73 65 61 72 63 68 20 6d |n{Basic |search m|
|000039b0| 65 74 68 6f 64 73 20 2d | 20 64 65 70 74 68 2d 66 |ethods -| depth-f|
|000039c0| 69 72 73 74 2c 20 62 72 | 65 61 64 74 68 2d 66 69 |irst, br|eadth-fi|
|000039d0| 72 73 74 7d 0a 0a 49 6e | 20 73 65 63 74 69 6f 6e |rst}..In| section|
|000039e0| 20 32 20 77 65 20 64 65 | 73 63 72 69 62 65 64 20 | 2 we de|scribed |
|000039f0| 74 68 65 20 70 72 6f 63 | 65 73 73 20 6f 66 20 67 |the proc|ess of g|
|00003a00| 65 6e 65 72 61 74 69 6e | 67 20 61 20 73 65 61 72 |eneratin|g a sear|
|00003a10| 63 68 20 74 72 65 65 2c | 20 69 6e 20 74 68 69 73 |ch tree,| in this|
|00003a20| 0a 73 65 63 74 69 6f 6e | 20 77 65 20 77 69 6c 6c |.section| we will|
|00003a30| 20 67 69 76 65 20 61 20 | 6d 6f 72 65 20 70 72 65 | give a |more pre|
|00003a40| 63 69 73 65 20 64 65 73 | 63 72 69 70 74 69 6f 6e |cise des|cription|
|00003a50| 20 6f 66 20 74 68 69 73 | 20 70 72 6f 63 65 73 73 | of this| process|
|00003a60| 2e 0a 5c 62 65 67 69 6e | 7b 69 74 65 6d 69 7a 65 |..\begin|{itemize|
|00003a70| 7d 0a 20 20 20 20 5c 69 | 74 65 6d 20 41 20 73 74 |}. \i|tem A st|
|00003a80| 61 72 74 20 6e 6f 64 65 | 20 69 73 20 61 73 73 6f |art node| is asso|
|00003a90| 63 69 61 74 65 64 20 77 | 69 74 68 20 74 68 65 20 |ciated w|ith the |
|00003aa0| 69 6e 69 74 69 61 6c 20 | 73 74 61 74 65 20 64 65 |initial |state de|
|00003ab0| 73 63 72 69 70 74 69 6f | 6e 2e 0a 0a 20 20 20 20 |scriptio|n... |
|00003ac0| 5c 69 74 65 6d 20 54 68 | 65 20 73 75 63 63 65 73 |\item Th|e succes|
|00003ad0| 73 6f 72 73 20 6f 66 20 | 61 20 6e 6f 64 65 20 61 |sors of |a node a|
|00003ae0| 72 65 20 67 65 6e 65 72 | 61 74 65 64 20 62 79 20 |re gener|ated by |
|00003af0| 61 70 70 6c 79 69 6e 67 | 20 61 6c 6c 20 6f 66 20 |applying| all of |
|00003b00| 74 68 65 0a 20 20 20 20 | 61 70 70 6c 69 63 61 62 |the. |applicab|
|00003b10| 6c 65 20 6f 70 65 72 61 | 74 6f 72 73 20 74 6f 20 |le opera|tors to |
|00003b20| 74 68 65 20 73 74 61 74 | 65 20 64 65 73 63 72 69 |the stat|e descri|
|00003b30| 70 74 69 6f 6e 20 61 73 | 73 6f 63 69 61 74 65 64 |ption as|sociated|
|00003b40| 20 77 69 74 68 20 74 68 | 65 20 6e 6f 64 65 2e 0a | with th|e node..|
|00003b50| 20 20 20 20 57 65 20 77 | 69 6c 6c 20 63 61 6c 6c | We w|ill call|
|00003b60| 20 74 68 69 73 20 70 72 | 6f 63 65 64 75 72 65 20 | this pr|ocedure |
|00003b70| 74 68 65 20 7b 5c 65 6d | 20 65 78 70 61 6e 73 69 |the {\em| expansi|
|00003b80| 6f 6e 5c 2c 7d 20 6f 66 | 20 61 20 6e 6f 64 65 2e |on\,} of| a node.|
|00003b90| 0a 0a 20 20 20 20 5c 69 | 74 65 6d 20 50 6f 69 6e |.. \i|tem Poin|
|00003ba0| 74 65 72 73 20 61 72 65 | 20 73 65 74 75 70 20 66 |ters are| setup f|
|00003bb0| 72 6f 6d 20 65 61 63 68 | 20 73 75 63 63 65 73 73 |rom each| success|
|00003bc0| 6f 72 20 62 61 63 6b 20 | 74 6f 20 69 74 73 20 70 |or back |to its p|
|00003bd0| 61 72 65 6e 74 20 6e 6f | 64 65 2e 0a 20 20 20 20 |arent no|de.. |
|00003be0| 54 68 65 73 65 20 70 6f | 69 6e 74 65 72 73 20 69 |These po|inters i|
|00003bf0| 6e 64 69 63 61 74 65 20 | 74 68 65 20 73 6f 6c 75 |ndicate |the solu|
|00003c00| 74 69 6f 6e 20 70 61 74 | 68 20 69 6e 20 74 68 65 |tion pat|h in the|
|00003c10| 20 67 61 6d 65 20 74 72 | 65 65 2c 20 6c 65 61 64 | game tr|ee, lead|
|00003c20| 69 6e 67 20 66 72 6f 6d | 0a 20 20 20 20 74 68 65 |ing from|. the|
|00003c30| 20 67 6f 61 6c 20 6e 6f | 64 65 2c 20 6f 6e 63 65 | goal no|de, once|
|00003c40| 20 69 74 20 69 73 20 66 | 69 6e 61 6c 6c 79 20 66 | it is f|inally f|
|00003c50| 6f 75 6e 64 2c 20 62 61 | 63 6b 20 74 6f 20 74 68 |ound, ba|ck to th|
|00003c60| 65 20 73 74 61 72 74 2e | 0a 0a 20 20 20 20 5c 69 |e start.|.. \i|
|00003c70| 74 65 6d 20 45 76 65 72 | 79 20 73 75 63 63 65 73 |tem Ever|y succes|
|00003c80| 73 6f 72 20 6e 6f 64 65 | 20 69 73 20 63 68 65 63 |sor node| is chec|
|00003c90| 6b 65 64 20 74 6f 20 73 | 65 65 20 69 66 20 69 74 |ked to s|ee if it|
|00003ca0| 20 69 73 20 61 20 67 6f | 61 6c 20 6e 6f 64 65 2e | is a go|al node.|
|00003cb0| 20 57 68 65 6e 20 61 0a | 20 20 20 20 67 6f 61 6c | When a.| goal|
|00003cc0| 20 6e 6f 64 65 20 68 61 | 73 20 62 65 65 6e 20 66 | node ha|s been f|
|00003cd0| 6f 75 6e 64 20 74 68 65 | 20 70 72 6f 63 65 73 73 |ound the| process|
|00003ce0| 20 6f 66 20 65 78 70 61 | 6e 64 69 6e 67 20 6e 6f | of expa|nding no|
|00003cf0| 64 65 73 20 66 69 6e 69 | 73 68 65 73 20 61 6e 64 |des fini|shes and|
|00003d00| 20 77 65 20 74 72 61 63 | 65 0a 20 20 20 20 62 61 | we trac|e. ba|
|00003d10| 63 6b 20 74 68 65 20 73 | 6f 6c 75 74 69 6f 6e 20 |ck the s|olution |
|00003d20| 70 61 74 68 20 74 68 72 | 6f 75 67 68 20 74 68 65 |path thr|ough the|
|00003d30| 20 70 6f 69 6e 74 65 72 | 73 2e 0a 5c 65 6e 64 7b | pointer|s..\end{|
|00003d40| 69 74 65 6d 69 7a 65 7d | 0a 0a 5c 62 69 67 73 6b |itemize}|..\bigsk|
|00003d50| 69 70 5c 6e 6f 69 6e 64 | 65 6e 74 0a 54 68 65 73 |ip\noind|ent.Thes|
|00003d60| 65 20 61 72 65 20 74 68 | 65 20 62 61 73 69 63 20 |e are th|e basic |
|00003d70| 65 6c 65 6d 65 6e 74 73 | 20 6f 66 20 61 20 70 72 |elements| of a pr|
|00003d80| 6f 62 6c 65 6d 2d 73 6f | 6c 76 69 6e 67 20 70 72 |oblem-so|lving pr|
|00003d90| 6f 63 65 73 73 2c 20 62 | 75 74 20 74 68 65 20 6f |ocess, b|ut the o|
|00003da0| 72 64 65 72 20 69 6e 0a | 77 68 69 63 68 20 6e 6f |rder in.|which no|
|00003db0| 64 65 73 20 61 72 65 20 | 74 6f 20 62 65 20 65 78 |des are |to be ex|
|00003dc0| 70 61 6e 64 65 64 20 69 | 73 20 73 74 69 6c 6c 20 |panded i|s still |
|00003dd0| 6c 65 66 74 20 6f 70 65 | 6e 2e 20 57 65 20 6d 61 |left ope|n. We ma|
|00003de0| 79 20 63 68 6f 6f 73 65 | 2c 20 66 6f 72 20 69 6e |y choose|, for in|
|00003df0| 73 74 61 6e 63 65 2c 0a | 74 6f 20 73 65 61 72 63 |stance,.|to searc|
|00003e00| 68 20 6f 6e 65 20 65 6e | 74 69 72 65 20 62 72 61 |h one en|tire bra|
|00003e10| 6e 63 68 20 6f 66 20 74 | 68 65 20 74 72 65 65 20 |nch of t|he tree |
|00003e20| 62 65 66 6f 72 65 20 65 | 78 61 6d 69 6e 69 6e 67 |before e|xamining|
|00003e30| 20 6e 6f 64 65 73 20 69 | 6e 20 74 68 65 20 6f 74 | nodes i|n the ot|
|00003e40| 68 65 72 0a 62 72 61 6e | 63 68 65 73 2e 20 41 6c |her.bran|ches. Al|
|00003e50| 74 65 72 6e 61 74 69 76 | 65 6c 79 2c 20 77 65 20 |ternativ|ely, we |
|00003e60| 6d 61 79 20 64 65 63 69 | 64 65 20 74 6f 20 65 78 |may deci|de to ex|
|00003e70| 70 61 6e 64 20 61 6c 6c | 20 6e 6f 64 65 73 20 74 |pand all| nodes t|
|00003e80| 68 61 74 20 61 72 65 20 | 6f 6e 20 74 68 65 0a 73 |hat are |on the.s|
|00003e90| 61 6d 65 20 6c 65 76 65 | 6c 2c 20 69 6e 20 64 69 |ame leve|l, in di|
|00003ea0| 66 66 65 72 65 6e 74 20 | 62 72 61 6e 63 68 65 73 |fferent |branches|
|00003eb0| 2e 20 54 68 65 20 66 69 | 72 73 74 20 6f 70 74 69 |. The fi|rst opti|
|00003ec0| 6f 6e 20 77 6f 75 6c 64 | 20 72 65 73 75 6c 74 20 |on would| result |
|00003ed0| 69 6e 20 77 68 61 74 20 | 69 73 0a 63 61 6c 6c 65 |in what |is.calle|
|00003ee0| 64 20 61 20 7b 5c 65 6d | 20 64 65 70 74 68 2d 66 |d a {\em| depth-f|
|00003ef0| 69 72 73 74 5c 2c 7d 20 | 73 65 61 72 63 68 3a 20 |irst\,} |search: |
|00003f00| 74 68 65 20 6d 6f 73 74 | 20 72 65 63 65 6e 74 6c |the most| recentl|
|00003f10| 79 20 67 65 6e 65 72 61 | 74 65 64 20 6e 6f 64 65 |y genera|ted node|
|00003f20| 20 67 65 74 73 0a 65 78 | 70 61 6e 64 65 64 20 66 | gets.ex|panded f|
|00003f30| 69 72 73 74 2e 20 49 6e | 20 61 20 7b 5c 65 6d 20 |irst. In| a {\em |
|00003f40| 62 72 65 61 64 74 68 2d | 66 69 72 73 74 5c 2c 7d |breadth-|first\,}|
|00003f50| 20 73 65 61 72 63 68 2c | 20 74 68 65 20 73 65 63 | search,| the sec|
|00003f60| 6f 6e 64 20 6f 70 74 69 | 6f 6e 2c 20 6e 6f 64 65 |ond opti|on, node|
|00003f70| 73 20 61 72 65 0a 65 78 | 70 61 6e 64 65 64 20 69 |s are.ex|panded i|
|00003f80| 6e 20 74 68 65 20 6f 72 | 64 65 72 20 69 6e 20 77 |n the or|der in w|
|00003f90| 68 69 63 68 20 74 68 65 | 79 20 61 72 65 20 67 65 |hich the|y are ge|
|00003fa0| 6e 65 72 61 74 65 64 2e | 0a 0a 5c 73 75 62 73 65 |nerated.|..\subse|
|00003fb0| 63 74 69 6f 6e 7b 46 69 | 6e 64 69 6e 67 20 61 6e |ction{Fi|nding an|
|00003fc0| 20 6f 70 74 69 6d 61 6c | 20 73 6f 6c 75 74 69 6f | optimal| solutio|
|00003fd0| 6e 2c 20 75 6e 69 66 6f | 72 6d 2d 63 6f 73 74 20 |n, unifo|rm-cost |
|00003fe0| 73 65 61 72 63 68 7d 0a | 0a 49 74 20 73 68 6f 75 |search}.|.It shou|
|00003ff0| 6c 64 20 62 65 20 6e 6f | 74 65 64 20 74 68 61 74 |ld be no|ted that|
|00004000| 20 66 6f 72 20 73 6f 6d | 65 20 70 72 6f 62 6c 65 | for som|e proble|
|00004010| 6d 73 20 77 65 20 61 72 | 65 20 6e 6f 74 20 69 6e |ms we ar|e not in|
|00004020| 74 65 72 65 73 74 65 64 | 20 69 6e 20 66 69 6e 64 |terested| in find|
|00004030| 69 6e 67 0a 7b 5c 65 6d | 20 61 6e 79 5c 2c 7d 20 |ing.{\em| any\,} |
|00004040| 73 6f 6c 75 74 69 6f 6e | 2c 20 62 75 74 20 72 61 |solution|, but ra|
|00004050| 74 68 65 72 20 74 68 65 | 20 7b 5c 65 6d 20 6f 70 |ther the| {\em op|
|00004060| 74 69 6d 61 6c 5c 2c 7d | 20 6f 72 20 7b 5c 65 6d |timal\,}| or {\em|
|00004070| 20 62 65 73 74 5c 2c 7d | 20 6f 6e 65 2e 20 57 68 | best\,}| one. Wh|
|00004080| 61 74 0a 27 62 65 73 74 | 27 20 6d 65 61 6e 73 20 |at.'best|' means |
|00004090| 64 65 70 65 6e 64 73 20 | 6f 6e 20 74 68 65 20 70 |depends |on the p|
|000040a0| 72 6f 62 6c 65 6d 20 61 | 74 20 68 61 6e 64 2c 20 |roblem a|t hand, |
|000040b0| 62 75 74 20 66 6f 72 20 | 6e 6f 77 20 77 65 20 77 |but for |now we w|
|000040c0| 69 6c 6c 20 63 61 6c 6c | 20 61 0a 73 6f 6c 75 74 |ill call| a.solut|
|000040d0| 69 6f 6e 20 70 61 74 68 | 20 6f 70 74 69 6d 61 6c |ion path| optimal|
|000040e0| 20 69 66 20 69 74 20 63 | 6f 6e 74 61 69 6e 73 20 | if it c|ontains |
|000040f0| 74 68 65 20 6c 65 61 73 | 74 20 70 6f 73 73 69 62 |the leas|t possib|
|00004100| 6c 65 20 6e 75 6d 62 65 | 72 20 6f 66 20 6e 6f 64 |le numbe|r of nod|
|00004110| 65 73 20 6c 65 61 64 69 | 6e 67 0a 74 6f 20 74 68 |es leadi|ng.to th|
|00004120| 65 20 67 6f 61 6c 20 6e | 6f 64 65 2e 20 4c 61 74 |e goal n|ode. Lat|
|00004130| 65 72 20 6f 6e 20 77 65 | 20 77 69 6c 6c 20 72 65 |er on we| will re|
|00004140| 66 69 6e 65 20 6f 75 72 | 20 64 65 66 69 6e 69 74 |fine our| definit|
|00004150| 69 6f 6e 20 74 6f 20 69 | 6e 63 6c 75 64 65 20 61 |ion to i|nclude a|
|00004160| 0a 64 69 66 66 65 72 65 | 6e 74 2c 20 62 75 74 20 |.differe|nt, but |
|00004170| 72 65 6c 61 74 65 64 20 | 74 79 70 65 20 6f 66 20 |related |type of |
|00004180| 70 72 6f 62 6c 65 6d 73 | 2e 20 49 6e 20 74 68 65 |problems|. In the|
|00004190| 20 63 61 73 65 20 6f 66 | 20 61 20 64 65 70 74 68 | case of| a depth|
|000041a0| 2d 66 69 72 73 74 20 73 | 65 61 72 63 68 20 77 65 |-first s|earch we|
|000041b0| 0a 63 61 6e 6e 6f 74 20 | 67 75 61 72 61 6e 74 65 |.cannot |guarante|
|000041c0| 65 20 74 68 61 74 20 74 | 68 65 20 62 65 73 74 20 |e that t|he best |
|000041d0| 73 6f 6c 75 74 69 6f 6e | 20 77 69 6c 6c 20 62 65 |solution| will be|
|000041e0| 20 66 6f 75 6e 64 2e 20 | 54 68 69 73 20 69 73 20 | found. |This is |
|000041f0| 62 65 63 61 75 73 65 20 | 65 76 65 72 79 0a 62 72 |because |every.br|
|00004200| 61 6e 63 68 20 69 73 20 | 65 78 61 6d 69 6e 65 64 |anch is |examined|
|00004210| 20 73 65 70 65 72 61 74 | 65 6c 79 2c 20 73 6f 20 | seperat|ely, so |
|00004220| 69 66 20 74 68 65 20 73 | 65 61 72 63 68 20 70 72 |if the s|earch pr|
|00004230| 6f 63 65 73 73 20 66 69 | 6e 64 73 20 61 20 67 6f |ocess fi|nds a go|
|00004240| 61 6c 20 6e 6f 64 65 20 | 69 6e 0a 6f 6e 65 20 62 |al node |in.one b|
|00004250| 72 61 6e 63 68 20 69 74 | 20 77 69 6c 6c 20 74 65 |ranch it| will te|
|00004260| 72 6d 69 6e 61 74 65 2e | 20 42 75 74 20 69 74 20 |rminate.| But it |
|00004270| 6d 61 79 20 77 65 6c 6c | 20 62 65 20 74 68 61 74 |may well| be that|
|00004280| 20 61 20 62 65 74 74 65 | 72 20 73 6f 6c 75 74 69 | a bette|r soluti|
|00004290| 6f 6e 20 69 73 0a 6c 6f | 63 61 74 65 64 20 69 6e |on is.lo|cated in|
|000042a0| 20 61 20 64 69 66 66 65 | 72 65 6e 74 20 62 72 61 | a diffe|rent bra|
|000042b0| 6e 63 68 2e 20 42 72 65 | 61 64 74 68 2d 66 69 72 |nch. Bre|adth-fir|
|000042c0| 73 74 20 73 65 61 72 63 | 68 20 6f 6e 20 74 68 65 |st searc|h on the|
|000042d0| 20 6f 74 68 65 72 20 68 | 61 6e 64 20 69 73 0a 67 | other h|and is.g|
|000042e0| 75 61 72 61 6e 74 65 65 | 64 20 74 6f 20 66 69 6e |uarantee|d to fin|
|000042f0| 64 20 74 68 65 20 73 68 | 6f 72 74 65 73 74 20 70 |d the sh|ortest p|
|00004300| 61 74 68 2c 20 62 65 63 | 61 75 73 65 20 69 74 20 |ath, bec|ause it |
|00004310| 65 78 70 61 6e 64 73 20 | 61 6c 6c 20 6e 6f 64 65 |expands |all node|
|00004320| 73 20 6f 6e 20 6f 6e 65 | 0a 6c 65 76 65 6c 20 62 |s on one|.level b|
|00004330| 65 66 6f 72 65 20 61 64 | 76 61 6e 63 69 6e 67 20 |efore ad|vancing |
|00004340| 74 6f 20 74 68 65 20 6e | 65 78 74 2e 0a 0a 46 6f |to the n|ext...Fo|
|00004350| 72 20 73 6f 6d 65 20 70 | 72 6f 62 6c 65 6d 73 2c |r some p|roblems,|
|00004360| 20 68 6f 77 65 76 65 72 | 2c 20 66 69 6e 64 69 6e | however|, findin|
|00004370| 67 20 74 68 65 20 62 65 | 73 74 20 73 6f 6c 75 74 |g the be|st solut|
|00004380| 69 6f 6e 20 64 6f 65 73 | 20 6e 6f 74 20 6d 65 61 |ion does| not mea|
|00004390| 6e 20 66 69 6e 64 69 6e | 67 20 74 68 65 0a 73 68 |n findin|g the.sh|
|000043a0| 6f 72 74 65 73 74 20 70 | 61 74 68 2c 20 62 75 74 |ortest p|ath, but|
|000043b0| 20 72 61 74 68 65 72 20 | 74 68 65 20 7b 5c 65 6d | rather |the {\em|
|000043c0| 20 63 68 65 61 70 65 73 | 74 5c 2c 7d 20 70 61 74 | cheapes|t\,} pat|
|000043d0| 68 2e 20 54 68 69 73 20 | 69 73 20 74 72 75 65 20 |h. This |is true |
|000043e0| 66 6f 72 20 69 6e 73 74 | 61 6e 63 65 0a 77 68 65 |for inst|ance.whe|
|000043f0| 6e 20 77 65 20 6e 65 65 | 64 20 74 6f 20 66 69 6e |n we nee|d to fin|
|00004400| 64 20 74 68 65 20 73 68 | 6f 72 74 65 73 74 20 70 |d the sh|ortest p|
|00004410| 61 74 68 20 66 72 6f 6d | 20 6f 6e 65 20 63 69 74 |ath from| one cit|
|00004420| 79 20 74 6f 20 61 6e 6f | 74 68 65 72 2e 20 49 6e |y to ano|ther. In|
|00004430| 20 74 68 69 73 20 63 61 | 73 65 0a 74 68 65 72 65 | this ca|se.there|
|00004440| 20 6d 61 79 20 62 65 20 | 73 65 76 65 72 61 6c 20 | may be |several |
|00004450| 72 6f 75 74 65 73 20 74 | 68 61 74 20 63 61 6e 20 |routes t|hat can |
|00004460| 62 65 20 75 73 65 64 20 | 74 6f 20 67 65 74 20 66 |be used |to get f|
|00004470| 72 6f 6d 20 63 69 74 79 | 20 41 20 74 6f 20 63 69 |rom city| A to ci|
|00004480| 74 79 20 42 2c 0a 76 69 | 73 69 74 69 6e 67 20 6f |ty B,.vi|siting o|
|00004490| 74 68 65 72 20 63 69 74 | 69 65 73 20 61 6c 6f 6e |ther cit|ies alon|
|000044a0| 67 20 74 68 65 20 77 61 | 79 2e 20 4e 6f 77 20 73 |g the wa|y. Now s|
|000044b0| 75 70 70 6f 73 65 20 74 | 68 65 20 63 69 74 69 65 |uppose t|he citie|
|000044c0| 73 20 61 72 65 20 6e 6f | 64 65 73 20 69 6e 20 61 |s are no|des in a|
|000044d0| 0a 73 65 61 72 63 68 20 | 74 72 65 65 2c 20 63 6c |.search |tree, cl|
|000044e0| 65 61 72 6c 79 20 77 68 | 61 74 20 77 65 20 77 61 |early wh|at we wa|
|000044f0| 6e 74 20 69 73 20 6e 6f | 74 20 74 68 65 20 73 6d |nt is no|t the sm|
|00004500| 61 6c 6c 65 73 74 20 6e | 75 6d 62 65 72 20 6f 66 |allest n|umber of|
|00004510| 20 6e 6f 64 65 73 20 28 | 63 69 74 69 65 73 29 0a | nodes (|cities).|
|00004520| 74 68 61 74 20 6d 61 6b | 65 20 75 70 20 61 20 70 |that mak|e up a p|
|00004530| 61 74 68 20 66 72 6f 6d | 20 41 20 74 6f 20 42 2c |ath from| A to B,|
|00004540| 20 62 75 74 20 74 68 65 | 20 73 68 6f 72 74 65 73 | but the| shortes|
|00004550| 74 20 72 6f 75 74 65 2e | 20 54 6f 20 73 6f 6c 76 |t route.| To solv|
|00004560| 65 20 70 72 6f 62 6c 65 | 6d 73 0a 6c 69 6b 65 20 |e proble|ms.like |
|00004570| 74 68 69 73 20 6f 6e 65 | 20 77 65 20 6e 65 65 64 |this one| we need|
|00004580| 20 74 6f 20 61 73 73 6f | 63 69 61 74 65 20 7b 5c | to asso|ciate {\|
|00004590| 65 6d 20 63 6f 73 74 73 | 5c 2c 7d 20 77 69 74 68 |em costs|\,} with|
|000045a0| 20 74 68 65 20 61 72 63 | 73 20 69 6e 20 74 68 65 | the arc|s in the|
|000045b0| 20 74 72 65 65 20 28 69 | 6e 0a 74 68 69 73 20 63 | tree (i|n.this c|
|000045c0| 61 73 65 20 74 68 65 20 | 63 6f 73 74 73 20 77 69 |ase the |costs wi|
|000045d0| 6c 6c 20 72 65 70 72 65 | 73 65 6e 74 20 74 68 65 |ll repre|sent the|
|000045e0| 20 64 69 73 74 61 6e 63 | 65 73 20 62 65 74 77 65 | distanc|es betwe|
|000045f0| 65 6e 20 74 68 65 20 63 | 69 74 69 65 73 29 2e 20 |en the c|ities). |
|00004600| 54 68 65 0a 6f 62 6a 65 | 63 74 20 69 73 20 74 6f |The.obje|ct is to|
|00004610| 20 66 69 6e 64 20 61 20 | 70 61 74 68 20 68 61 76 | find a |path hav|
|00004620| 69 6e 67 20 74 68 65 20 | 6c 65 61 73 74 20 63 6f |ing the |least co|
|00004630| 73 74 2e 0a 0a 41 20 6d | 6f 72 65 20 67 65 6e 65 |st...A m|ore gene|
|00004640| 72 61 6c 20 76 65 72 73 | 69 6f 6e 20 6f 66 20 74 |ral vers|ion of t|
|00004650| 68 65 20 62 72 65 61 64 | 74 68 2d 66 69 72 73 74 |he bread|th-first|
|00004660| 20 6d 65 74 68 6f 64 2c | 20 63 61 6c 6c 65 64 20 | method,| called |
|00004670| 74 68 65 20 7b 5c 65 6d | 0a 75 6e 69 66 6f 72 6d |the {\em|.uniform|
|00004680| 2d 63 6f 73 74 20 73 65 | 61 72 63 68 20 6d 65 74 |-cost se|arch met|
|00004690| 68 6f 64 5c 2c 7d 20 69 | 73 20 67 75 61 72 61 6e |hod\,} i|s guaran|
|000046a0| 74 65 65 64 20 74 6f 20 | 66 69 6e 64 20 61 20 70 |teed to |find a p|
|000046b0| 61 74 68 20 6f 66 20 6d | 69 6e 69 6d 61 6c 20 63 |ath of m|inimal c|
|000046c0| 6f 73 74 0a 66 72 6f 6d | 20 74 68 65 20 73 74 61 |ost.from| the sta|
|000046d0| 72 74 20 6e 6f 64 65 20 | 74 6f 20 61 20 67 6f 61 |rt node |to a goa|
|000046e0| 6c 20 6e 6f 64 65 2e 20 | 49 6e 73 74 65 61 64 20 |l node. |Instead |
|000046f0| 6f 66 20 65 78 70 61 6e | 64 69 6e 67 20 70 61 74 |of expan|ding pat|
|00004700| 68 73 20 6f 66 20 65 71 | 75 61 6c 20 6c 65 6e 67 |hs of eq|ual leng|
|00004710| 74 68 0a 6c 69 6b 65 20 | 74 68 65 20 62 72 65 61 |th.like |the brea|
|00004720| 64 74 68 2d 66 69 72 73 | 74 20 6d 65 74 68 6f 64 |dth-firs|t method|
|00004730| 2c 20 74 68 69 73 20 6d | 65 74 68 6f 64 20 65 78 |, this m|ethod ex|
|00004740| 70 61 6e 64 73 20 70 61 | 74 68 73 20 6f 66 20 65 |pands pa|ths of e|
|00004750| 71 75 61 6c 20 63 6f 73 | 74 2e 20 54 6f 0a 63 6f |qual cos|t. To.co|
|00004760| 6d 70 75 74 65 20 74 68 | 65 20 63 6f 73 74 20 6f |mpute th|e cost o|
|00004770| 66 20 61 20 70 61 74 68 | 20 7b 5c 65 6d 20 73 5c |f a path| {\em s\|
|00004780| 2c 7d 20 74 6f 20 61 20 | 6e 6f 64 65 20 7b 5c 65 |,} to a |node {\e|
|00004790| 6d 20 6e 5c 2c 7d 20 77 | 65 20 77 69 6c 6c 20 75 |m n\,} w|e will u|
|000047a0| 73 65 20 74 68 65 0a 66 | 75 6e 63 74 69 6f 6e 20 |se the.f|unction |
|000047b0| 7b 5c 65 6d 20 67 28 6e | 29 5c 2c 7d 5c 6c 61 62 |{\em g(n|)\,}\lab|
|000047c0| 65 6c 7b 67 66 75 6e 63 | 7d 2e 20 54 68 65 20 63 |el{gfunc|}. The c|
|000047d0| 6f 73 74 20 61 73 73 6f | 63 69 61 74 65 64 20 77 |ost asso|ciated w|
|000047e0| 69 74 68 20 61 20 6e 6f | 64 65 20 77 69 6c 6c 20 |ith a no|de will |
|000047f0| 63 6f 6e 73 69 73 74 0a | 6f 66 20 74 68 65 20 63 |consist.|of the c|
|00004800| 6f 73 74 20 61 73 73 6f | 63 69 61 74 65 64 20 77 |ost asso|ciated w|
|00004810| 69 74 68 20 69 74 73 20 | 70 61 72 65 6e 74 20 70 |ith its |parent p|
|00004820| 6c 75 73 20 74 68 65 20 | 63 6f 73 74 20 6f 66 20 |lus the |cost of |
|00004830| 67 65 74 74 69 6e 67 20 | 66 72 6f 6d 20 74 68 65 |getting |from the|
|00004840| 20 70 61 72 65 6e 74 20 | 74 6f 0a 74 68 69 73 20 | parent |to.this |
|00004850| 6e 6f 64 65 2e 20 55 73 | 69 6e 67 20 74 68 69 73 |node. Us|ing this|
|00004860| 20 6d 65 74 68 6f 64 20 | 74 6f 20 6f 72 64 65 72 | method |to order|
|00004870| 20 74 68 65 20 73 65 74 | 20 6f 66 20 6e 6f 64 65 | the set| of node|
|00004880| 73 20 77 65 20 61 72 65 | 20 73 75 72 65 20 74 68 |s we are| sure th|
|00004890| 65 0a 75 6e 69 66 6f 72 | 6d 2d 63 6f 73 74 20 6d |e.unifor|m-cost m|
|000048a0| 65 74 68 6f 64 20 65 78 | 70 61 6e 64 73 20 6e 6f |ethod ex|pands no|
|000048b0| 64 65 73 20 69 6e 20 6f | 72 64 65 72 20 6f 66 20 |des in o|rder of |
|000048c0| 69 6e 63 72 65 61 73 69 | 6e 67 20 67 28 6e 29 2e |increasi|ng g(n).|
|000048d0| 0a 0a 4f 6e 65 20 5c 6c | 61 62 65 6c 7b 67 72 61 |..One \l|abel{gra|
|000048e0| 70 68 2d 6b 65 65 70 7d | 20 73 68 6f 75 6c 64 20 |ph-keep}| should |
|000048f0| 6e 6f 74 65 20 74 68 61 | 74 20 74 68 65 20 67 72 |note tha|t the gr|
|00004900| 61 70 68 20 73 65 61 72 | 63 68 20 74 65 63 68 6e |aph sear|ch techn|
|00004910| 69 71 75 65 20 74 68 61 | 74 20 77 65 0a 64 65 73 |ique tha|t we.des|
|00004920| 63 72 69 62 65 64 20 65 | 61 72 6c 69 65 72 20 6d |cribed e|arlier m|
|00004930| 75 73 74 20 62 65 20 6d | 6f 64 69 66 69 65 64 20 |ust be m|odified |
|00004940| 77 68 65 6e 20 77 65 20 | 61 72 65 20 6c 6f 6f 6b |when we |are look|
|00004950| 69 6e 67 20 66 6f 72 20 | 61 6e 20 6f 70 74 69 6d |ing for |an optim|
|00004960| 61 6c 20 73 6f 6c 75 74 | 69 6f 6e 2e 0a 57 65 20 |al solut|ion..We |
|00004970| 73 61 69 64 20 74 68 61 | 74 20 64 75 72 69 6e 67 |said tha|t during|
|00004980| 20 61 20 67 72 61 70 68 | 20 73 65 61 72 63 68 20 | a graph| search |
|00004990| 65 76 65 72 79 20 6e 6f | 64 65 20 74 68 61 74 20 |every no|de that |
|000049a0| 69 73 20 67 65 6e 65 72 | 61 74 65 64 20 74 77 69 |is gener|ated twi|
|000049b0| 63 65 20 63 61 6e 0a 73 | 69 6d 70 6c 79 20 62 65 |ce can.s|imply be|
|000049c0| 20 74 68 72 6f 77 6e 20 | 61 77 61 79 2e 20 49 66 | thrown |away. If|
|000049d0| 20 77 65 20 77 6f 75 6c | 64 20 75 73 65 20 74 68 | we woul|d use th|
|000049e0| 69 73 20 74 65 63 68 6e | 69 71 75 65 20 69 6e 20 |is techn|ique in |
|000049f0| 61 20 75 6e 69 66 6f 72 | 6d 2d 63 6f 73 74 0a 73 |a unifor|m-cost.s|
|00004a00| 65 61 72 63 68 20 77 65 | 20 63 6f 75 6c 64 20 6e |earch we| could n|
|00004a10| 65 76 65 72 20 67 75 61 | 72 61 6e 74 65 65 20 74 |ever gua|rantee t|
|00004a20| 6f 20 66 69 6e 64 20 74 | 68 65 20 63 68 65 61 70 |o find t|he cheap|
|00004a30| 65 73 74 20 70 61 74 68 | 2e 20 41 73 20 73 61 69 |est path|. As sai|
|00004a40| 64 2c 20 69 6e 20 61 20 | 67 72 61 70 68 0a 74 68 |d, in a |graph.th|
|00004a50| 65 72 65 20 6d 61 79 20 | 62 65 20 6d 75 6c 74 69 |ere may |be multi|
|00004a60| 70 6c 65 20 70 61 74 68 | 73 20 6c 65 61 64 69 6e |ple path|s leadin|
|00004a70| 67 20 74 6f 20 74 68 65 | 20 73 61 6d 65 20 6e 6f |g to the| same no|
|00004a80| 64 65 2e 20 42 75 74 20 | 65 61 63 68 20 6f 66 20 |de. But |each of |
|00004a90| 74 68 65 73 65 20 68 61 | 73 0a 69 74 73 20 6f 77 |these ha|s.its ow|
|00004aa0| 6e 20 28 70 6f 73 73 69 | 62 6c 79 20 64 69 66 66 |n (possi|bly diff|
|00004ab0| 65 72 65 6e 74 29 20 63 | 6f 73 74 2e 20 53 6f 20 |erent) c|ost. So |
|00004ac0| 69 66 20 77 65 20 74 68 | 72 6f 77 20 61 77 61 79 |if we th|row away|
|00004ad0| 20 61 20 6e 6f 64 65 20 | 77 69 74 68 6f 75 74 20 | a node |without |
|00004ae0| 70 61 79 69 6e 67 20 61 | 74 74 65 6e 74 69 6f 6e |paying a|ttention|
|00004af0| 20 74 6f 20 74 68 69 73 | 0a 66 61 63 74 20 77 65 | to this|.fact we|
|00004b00| 20 6d 61 79 20 62 65 20 | 6d 69 73 73 69 6e 67 20 | may be |missing |
|00004b10| 61 20 62 65 74 74 65 72 | 20 73 6f 6c 75 74 69 6f |a better| solutio|
|00004b20| 6e 20 77 69 74 68 6f 75 | 74 20 65 76 65 72 20 6e |n withou|t ever n|
|00004b30| 6f 74 69 63 69 6e 67 2e | 20 54 68 65 72 65 66 6f |oticing.| Therefo|
|00004b40| 72 65 2c 0a 74 68 65 20 | 67 72 61 70 68 20 73 65 |re,.the |graph se|
|00004b50| 61 72 63 68 20 70 72 6f | 63 65 64 75 72 65 20 6d |arch pro|cedure m|
|00004b60| 75 73 74 20 62 65 20 6d | 6f 64 69 66 69 65 64 20 |ust be m|odified |
|00004b70| 69 6e 20 74 68 65 20 66 | 6f 6c 6c 6f 77 69 6e 67 |in the f|ollowing|
|00004b80| 20 77 61 79 3a 20 65 76 | 65 72 79 20 74 69 6d 65 | way: ev|ery time|
|00004b90| 0a 61 20 6e 65 77 20 6e | 6f 64 65 20 69 73 20 67 |.a new n|ode is g|
|00004ba0| 65 6e 65 72 61 74 65 64 | 20 77 65 20 63 68 65 63 |enerated| we chec|
|00004bb0| 6b 20 77 68 65 74 68 65 | 72 20 69 74 20 61 6c 72 |k whethe|r it alr|
|00004bc0| 65 61 64 79 20 65 78 69 | 73 74 73 20 69 6e 20 74 |eady exi|sts in t|
|00004bd0| 68 65 20 67 72 61 70 68 | 2e 20 49 66 20 6e 6f 74 |he graph|. If not|
|00004be0| 2c 0a 77 65 20 61 64 64 | 20 69 74 2e 20 49 66 20 |,.we add| it. If |
|00004bf0| 69 74 20 64 6f 65 73 2c | 20 77 65 20 63 6f 6d 70 |it does,| we comp|
|00004c00| 61 72 65 20 74 68 65 20 | 63 6f 73 74 20 6f 66 20 |are the |cost of |
|00004c10| 74 68 65 20 6f 6c 64 20 | 6e 6f 64 65 20 61 6e 64 |the old |node and|
|00004c20| 20 74 68 65 20 63 6f 73 | 74 20 6f 66 20 74 68 65 | the cos|t of the|
|00004c30| 0a 6e 65 77 6c 79 20 67 | 65 6e 65 72 61 74 65 64 |.newly g|enerated|
|00004c40| 20 6e 6f 64 65 2e 20 49 | 66 20 74 68 65 20 6f 6c | node. I|f the ol|
|00004c50| 64 20 6e 6f 64 65 20 69 | 73 20 62 65 74 74 65 72 |d node i|s better|
|00004c60| 20 28 63 68 65 61 70 65 | 72 29 20 6e 6f 74 68 69 | (cheape|r) nothi|
|00004c70| 6e 67 20 68 61 73 20 74 | 6f 20 62 65 0a 64 6f 6e |ng has t|o be.don|
|00004c80| 65 2c 20 69 66 20 69 74 | 20 69 73 20 77 6f 72 73 |e, if it| is wors|
|00004c90| 65 20 77 65 20 63 68 61 | 6e 67 65 20 69 74 73 20 |e we cha|nge its |
|00004ca0| 63 6f 73 74 20 61 6e 64 | 20 64 69 72 65 63 74 20 |cost and| direct |
|00004cb0| 69 74 73 20 70 6f 69 6e | 74 65 72 20 74 6f 20 74 |its poin|ter to t|
|00004cc0| 68 65 20 70 61 72 65 6e | 74 20 6f 6e 0a 74 68 65 |he paren|t on.the|
|00004cd0| 20 6c 65 61 73 74 20 63 | 6f 73 74 6c 79 20 70 61 | least c|ostly pa|
|00004ce0| 74 68 20 74 68 61 74 20 | 68 61 73 20 6a 75 73 74 |th that |has just|
|00004cf0| 20 62 65 65 6e 20 66 6f | 75 6e 64 2e 0a 0a 5c 73 | been fo|und...\s|
|00004d00| 75 62 73 65 63 74 69 6f | 6e 7b 42 6c 69 6e 64 20 |ubsectio|n{Blind |
|00004d10| 73 65 61 72 63 68 20 76 | 73 20 68 65 75 72 69 73 |search v|s heuris|
|00004d20| 74 69 63 20 73 65 61 72 | 63 68 2c 20 62 65 73 74 |tic sear|ch, best|
|00004d30| 2d 66 69 72 73 74 20 73 | 65 61 72 63 68 7d 0a 0a |-first s|earch}..|
|00004d40| 41 6c 6c 20 6f 66 20 74 | 68 65 20 6d 65 74 68 6f |All of t|he metho|
|00004d50| 64 73 20 64 65 73 63 72 | 69 62 65 64 20 73 6f 20 |ds descr|ibed so |
|00004d60| 66 61 72 20 61 72 65 20 | 63 61 6c 6c 65 64 20 7b |far are |called {|
|00004d70| 5c 65 6d 20 62 6c 69 6e | 64 2d 73 65 61 72 63 68 |\em blin|d-search|
|00004d80| 20 70 72 6f 63 65 64 75 | 72 65 73 5c 2c 7d 20 62 | procedu|res\,} b|
|00004d90| 65 63 61 75 73 65 20 74 | 68 65 79 0a 64 6f 20 6e |ecause t|hey.do n|
|00004da0| 6f 74 20 75 73 65 20 61 | 6e 79 20 73 70 65 63 69 |ot use a|ny speci|
|00004db0| 66 69 63 20 69 6e 66 6f | 72 6d 61 74 69 6f 6e 20 |fic info|rmation |
|00004dc0| 61 62 6f 75 74 20 74 68 | 65 20 70 72 6f 62 6c 65 |about th|e proble|
|00004dd0| 6d 20 74 6f 20 62 65 20 | 73 6f 6c 76 65 64 2c 20 |m to be |solved, |
|00004de0| 69 2e 65 2c 20 74 68 65 | 0a 73 65 61 72 63 68 20 |i.e, the|.search |
|00004df0| 70 72 6f 63 65 73 73 20 | 6a 75 73 74 20 63 6f 6e |process |just con|
|00004e00| 74 69 6e 75 65 73 20 75 | 6e 74 69 6c 20 69 74 20 |tinues u|ntil it |
|00004e10| 68 61 70 70 65 6e 73 20 | 6f 6e 20 61 20 73 6f 6c |happens |on a sol|
|00004e20| 75 74 69 6f 6e 3a 20 69 | 74 20 69 73 20 6e 6f 74 |ution: i|t is not|
|00004e30| 0a 64 69 72 65 63 74 65 | 64 20 69 6e 20 73 6f 6d |.directe|d in som|
|00004e40| 65 20 77 61 79 20 74 6f | 20 74 68 65 20 67 6f 61 |e way to| the goa|
|00004e50| 6c 2e 20 54 68 65 20 61 | 64 76 61 6e 74 61 67 65 |l. The a|dvantage|
|00004e60| 20 6f 66 20 62 6c 69 6e | 64 2d 73 65 61 72 63 68 | of blin|d-search|
|00004e70| 20 70 72 6f 63 65 64 75 | 72 65 73 20 69 73 0a 74 | procedu|res is.t|
|00004e80| 68 61 74 20 74 68 65 79 | 20 61 72 65 20 65 61 73 |hat they| are eas|
|00004e90| 79 20 74 6f 20 69 6d 70 | 6c 65 6d 65 6e 74 20 61 |y to imp|lement a|
|00004ea0| 6e 64 20 6d 61 79 20 66 | 69 6e 64 20 61 20 73 6f |nd may f|ind a so|
|00004eb0| 6c 75 74 69 6f 6e 20 71 | 75 69 63 6b 6c 79 20 66 |lution q|uickly f|
|00004ec0| 6f 72 20 73 6d 61 6c 6c | 0a 70 72 6f 62 6c 65 6d |or small|.problem|
|00004ed0| 73 2e 20 54 68 65 20 6f | 62 76 69 6f 75 73 20 64 |s. The o|bvious d|
|00004ee0| 69 73 61 64 76 61 6e 74 | 61 67 65 20 6f 66 20 74 |isadvant|age of t|
|00004ef0| 68 65 73 65 20 6d 65 74 | 68 6f 64 73 20 69 73 20 |hese met|hods is |
|00004f00| 74 68 61 74 20 74 68 65 | 79 20 6d 61 79 20 62 65 |that the|y may be|
|00004f10| 20 6c 65 64 0a 61 73 74 | 72 61 79 2c 20 65 78 70 | led.ast|ray, exp|
|00004f20| 61 6e 64 69 6e 67 20 61 | 20 6c 6f 74 20 6f 66 20 |anding a| lot of |
|00004f30| 6e 6f 64 65 73 20 74 68 | 61 74 20 61 72 65 20 6e |nodes th|at are n|
|00004f40| 6f 74 20 70 61 72 74 20 | 6f 66 20 74 68 65 20 73 |ot part |of the s|
|00004f50| 6f 6c 75 74 69 6f 6e 20 | 70 61 74 68 2e 20 46 6f |olution |path. Fo|
|00004f60| 72 0a 65 78 61 6d 70 6c | 65 2c 20 77 68 65 6e 20 |r.exampl|e, when |
|00004f70| 74 72 61 76 65 72 73 69 | 6e 67 20 61 20 74 72 65 |traversi|ng a tre|
|00004f80| 65 20 69 6e 20 64 65 70 | 74 68 2d 66 69 72 73 74 |e in dep|th-first|
|00004f90| 20 6f 72 64 65 72 20 77 | 65 20 64 69 76 65 20 69 | order w|e dive i|
|00004fa0| 6e 74 6f 20 74 68 65 0a | 6c 65 66 74 20 6d 6f 73 |nto the.|left mos|
|00004fb0| 74 20 62 72 61 6e 63 68 | 2c 20 74 68 69 73 20 69 |t branch|, this i|
|00004fc0| 73 20 66 69 6e 65 20 69 | 66 20 77 65 20 68 61 70 |s fine i|f we hap|
|00004fd0| 70 65 6e 20 74 6f 20 66 | 69 6e 64 20 61 20 73 6f |pen to f|ind a so|
|00004fe0| 6c 75 74 69 6f 6e 20 74 | 68 65 72 65 2e 20 42 75 |lution t|here. Bu|
|00004ff0| 74 20 73 75 70 70 6f 73 | 65 0a 74 68 65 20 67 6f |t suppos|e.the go|
|00005000| 61 6c 20 6e 6f 64 65 20 | 69 73 20 6c 6f 63 61 74 |al node |is locat|
|00005010| 65 64 20 69 6e 20 61 20 | 64 69 66 66 65 72 65 6e |ed in a |differen|
|00005020| 74 20 70 61 72 74 20 6f | 66 20 74 68 65 20 74 72 |t part o|f the tr|
|00005030| 65 65 2c 20 65 2e 67 2e | 2c 20 61 74 20 74 68 65 |ee, e.g.|, at the|
|00005040| 20 72 69 67 68 74 20 6d | 6f 73 74 0a 62 72 61 6e | right m|ost.bran|
|00005050| 63 68 2e 20 49 6e 20 74 | 68 69 73 20 63 61 73 65 |ch. In t|his case|
|00005060| 20 77 65 20 77 69 6c 6c | 20 68 61 76 65 20 73 65 | we will| have se|
|00005070| 61 72 63 68 65 64 20 74 | 68 65 20 65 6e 74 69 72 |arched t|he entir|
|00005080| 65 20 74 72 65 65 20 62 | 65 66 6f 72 65 20 67 65 |e tree b|efore ge|
|00005090| 74 74 69 6e 67 0a 6f 6e | 20 74 68 65 20 72 69 67 |tting.on| the rig|
|000050a0| 68 74 20 74 72 61 63 6b | 2e 20 49 74 20 77 6f 75 |ht track|. It wou|
|000050b0| 6c 64 20 68 61 76 65 20 | 62 65 65 6e 20 6d 75 63 |ld have |been muc|
|000050c0| 68 20 62 65 74 74 65 72 | 20 69 66 20 77 65 20 68 |h better| if we h|
|000050d0| 61 64 20 6b 6e 6f 77 6e | 20 69 6e 20 61 64 76 61 |ad known| in adva|
|000050e0| 6e 63 65 0a 77 68 69 63 | 68 20 77 61 79 20 74 6f |nce.whic|h way to|
|000050f0| 20 67 6f 2e 20 42 75 74 | 20 6f 66 20 63 6f 75 72 | go. But| of cour|
|00005100| 73 65 2c 20 74 68 69 73 | 20 69 73 20 69 6d 70 6f |se, this| is impo|
|00005110| 73 73 69 62 6c 65 3b 20 | 69 66 20 77 65 20 68 61 |ssible; |if we ha|
|00005120| 64 20 6b 6e 6f 77 6e 20 | 74 68 69 73 0a 77 65 20 |d known |this.we |
|00005130| 77 6f 75 6c 64 20 6e 65 | 76 65 72 20 68 61 76 65 |would ne|ver have|
|00005140| 20 74 6f 20 7b 5c 65 6d | 20 73 65 61 72 63 68 5c | to {\em| search\|
|00005150| 2c 7d 20 66 6f 72 20 61 | 20 73 6f 6c 75 74 69 6f |,} for a| solutio|
|00005160| 6e 2e 20 53 74 69 6c 6c | 2c 20 74 68 65 72 65 20 |n. Still|, there |
|00005170| 6d 61 79 20 62 65 0a 73 | 69 74 75 61 74 69 6f 6e |may be.s|ituation|
|00005180| 73 20 77 68 65 72 65 20 | 77 65 20 64 6f 20 6e 6f |s where |we do no|
|00005190| 74 20 6b 6e 6f 77 20 65 | 78 61 63 74 6c 79 20 77 |t know e|xactly w|
|000051a0| 68 65 72 65 20 74 6f 20 | 67 6f 2c 20 62 75 74 20 |here to |go, but |
|000051b0| 63 61 6e 20 67 69 76 65 | 20 61 6e 20 65 73 74 69 |can give| an esti|
|000051c0| 6d 61 74 65 0a 6f 66 20 | 68 6f 77 20 66 61 72 20 |mate.of |how far |
|000051d0| 61 20 6e 6f 64 65 20 69 | 73 20 72 65 6d 6f 76 65 |a node i|s remove|
|000051e0| 64 20 66 72 6f 6d 20 74 | 68 65 20 67 6f 61 6c 20 |d from t|he goal |
|000051f0| 6e 6f 64 65 20 61 6e 64 | 20 68 65 6e 63 65 20 64 |node and| hence d|
|00005200| 65 74 65 72 6d 69 6e 65 | 20 69 66 20 69 74 20 69 |etermine| if it i|
|00005210| 73 20 6f 6e 0a 74 68 65 | 20 28 62 65 73 74 29 20 |s on.the| (best) |
|00005220| 73 6f 6c 75 74 69 6f 6e | 20 70 61 74 68 2e 20 55 |solution| path. U|
|00005230| 73 69 6e 67 20 74 68 69 | 73 20 69 6e 66 6f 72 6d |sing thi|s inform|
|00005240| 61 74 69 6f 6e 20 69 74 | 20 69 73 20 70 6f 73 73 |ation it| is poss|
|00005250| 69 62 6c 65 20 74 6f 20 | 69 6d 70 72 6f 76 65 20 |ible to |improve |
|00005260| 74 68 65 0a 65 66 66 69 | 63 69 65 6e 63 79 20 6f |the.effi|ciency o|
|00005270| 66 20 74 68 65 20 73 65 | 61 72 63 68 20 70 72 6f |f the se|arch pro|
|00005280| 63 65 73 73 2e 20 48 65 | 72 65 2c 20 77 65 20 68 |cess. He|re, we h|
|00005290| 61 76 65 20 69 6e 74 72 | 6f 64 75 63 65 64 20 74 |ave intr|oduced t|
|000052a0| 68 65 20 69 64 65 61 20 | 6f 66 20 75 73 69 6e 67 |he idea |of using|
|000052b0| 20 61 0a 7b 5c 65 6d 20 | 68 65 75 72 69 73 74 69 | a.{\em |heuristi|
|000052c0| 63 5c 2c 7d 2e 0a 0a 41 | 20 68 65 75 72 69 73 74 |c\,}...A| heurist|
|000052d0| 69 63 20 69 73 20 61 20 | 72 75 6c 65 20 6f 66 20 |ic is a |rule of |
|000052e0| 74 68 75 6d 62 2c 20 61 | 20 74 65 63 68 6e 69 71 |thumb, a| techniq|
|000052f0| 75 65 20 74 68 61 74 20 | 69 6d 70 72 6f 76 65 73 |ue that |improves|
|00005300| 20 74 68 65 20 65 66 66 | 69 63 69 65 6e 63 79 20 | the eff|iciency |
|00005310| 6f 66 20 61 0a 73 65 61 | 72 63 68 20 70 72 6f 63 |of a.sea|rch proc|
|00005320| 65 73 73 2c 20 70 6f 73 | 73 69 62 6c 79 20 62 79 |ess, pos|sibly by|
|00005330| 20 73 61 63 72 69 66 69 | 63 69 6e 67 20 63 6c 61 | sacrifi|cing cla|
|00005340| 69 6d 73 20 74 6f 20 63 | 6f 6d 70 6c 65 74 65 6e |ims to c|ompleten|
|00005350| 65 73 73 0a 5b 52 69 63 | 68 20 31 39 38 33 2c 20 |ess.[Ric|h 1983, |
|00005360| 33 35 5d 2e 20 54 68 69 | 73 20 6d 65 61 6e 73 20 |35]. Thi|s means |
|00005370| 74 68 61 74 2c 20 6c 69 | 6b 65 20 61 6c 6c 20 72 |that, li|ke all r|
|00005380| 75 6c 65 73 20 6f 66 20 | 74 68 75 6d 62 2c 20 68 |ules of |thumb, h|
|00005390| 65 75 72 69 73 74 69 63 | 73 20 6d 61 79 20 6c 65 |euristic|s may le|
|000053a0| 61 64 0a 74 68 65 20 73 | 65 61 72 63 68 20 69 6e |ad.the s|earch in|
|000053b0| 20 74 68 65 20 6d 6f 73 | 74 20 70 72 6f 6d 69 73 | the mos|t promis|
|000053c0| 69 6e 67 20 77 61 79 2c | 20 66 69 6e 64 69 6e 67 |ing way,| finding|
|000053d0| 20 61 20 73 6f 6c 75 74 | 69 6f 6e 20 71 75 69 63 | a solut|ion quic|
|000053e0| 6b 6c 79 2c 20 62 75 74 | 20 61 6c 73 6f 0a 74 68 |kly, but| also.th|
|000053f0| 61 74 20 74 68 65 79 20 | 6d 61 79 20 74 61 6b 65 |at they |may take|
|00005400| 20 61 20 77 72 6f 6e 67 | 20 74 75 72 6e 20 28 62 | a wrong| turn (b|
|00005410| 75 74 20 73 74 69 6c 6c | 20 6c 65 61 64 69 6e 67 |ut still| leading|
|00005420| 20 74 6f 20 74 68 65 20 | 67 6f 61 6c 29 20 6f 72 | to the |goal) or|
|00005430| 20 6c 65 61 64 20 74 6f | 0a 64 65 61 64 65 6e 64 | lead to|.deadend|
|00005440| 73 2e 20 41 20 67 6f 6f | 64 20 77 61 79 20 74 6f |s. A goo|d way to|
|00005450| 20 75 73 65 20 68 65 75 | 72 69 73 74 69 63 20 69 | use heu|ristic i|
|00005460| 6e 66 6f 72 6d 61 74 69 | 6f 6e 20 69 73 20 62 79 |nformati|on is by|
|00005470| 20 6d 65 61 6e 73 20 6f | 66 20 61 20 7b 5c 65 6d | means o|f a {\em|
|00005480| 20 68 65 75 72 69 73 74 | 69 63 0a 66 75 6e 63 74 | heurist|ic.funct|
|00005490| 69 6f 6e 5c 2c 7d 20 74 | 68 61 74 20 65 76 61 6c |ion\,} t|hat eval|
|000054a0| 75 61 74 65 73 20 65 76 | 65 72 79 20 6e 6f 64 65 |uates ev|ery node|
|000054b0| 20 74 68 61 74 20 69 73 | 20 62 65 69 6e 67 20 67 | that is| being g|
|000054c0| 65 6e 65 72 61 74 65 64 | 2c 20 69 2e 65 2e 20 74 |enerated|, i.e. t|
|000054d0| 68 61 74 20 64 65 74 65 | 72 6d 69 6e 65 73 0a 74 |hat dete|rmines.t|
|000054e0| 68 65 20 67 6f 6f 64 6e | 65 73 73 20 6f 72 20 62 |he goodn|ess or b|
|000054f0| 61 64 6e 65 73 73 20 6f | 66 20 61 20 6e 6f 64 65 |adness o|f a node|
|00005500| 2e 20 55 73 69 6e 67 20 | 61 20 68 65 75 72 69 73 |. Using |a heuris|
|00005510| 74 69 63 20 66 75 6e 63 | 74 69 6f 6e 20 69 74 20 |tic func|tion it |
|00005520| 77 69 6c 6c 20 62 65 0a | 70 6f 73 73 69 62 6c 65 |will be.|possible|
|00005530| 20 74 6f 20 63 6f 6e 64 | 75 63 74 20 74 68 65 20 | to cond|uct the |
|00005540| 73 65 61 72 63 68 20 69 | 6e 20 74 68 65 20 6d 6f |search i|n the mo|
|00005550| 73 74 20 70 72 6f 66 69 | 74 61 62 6c 65 20 64 69 |st profi|table di|
|00005560| 72 65 63 74 69 6f 6e 2c | 20 62 79 20 73 75 67 67 |rection,| by sugg|
|00005570| 65 73 74 69 6e 67 0a 77 | 68 69 63 68 20 70 61 74 |esting.w|hich pat|
|00005580| 68 20 74 6f 20 66 6f 6c | 6c 6f 77 20 66 69 72 73 |h to fol|low firs|
|00005590| 74 20 77 68 65 6e 20 6d | 6f 72 65 20 74 68 61 6e |t when m|ore than|
|000055a0| 20 6f 6e 65 20 69 73 20 | 61 76 61 69 6c 61 62 6c | one is |availabl|
|000055b0| 65 2e 0a 0a 57 65 20 77 | 69 6c 6c 20 64 65 66 69 |e...We w|ill defi|
|000055c0| 6e 65 20 61 20 68 65 75 | 72 69 73 74 69 63 20 66 |ne a heu|ristic f|
|000055d0| 75 6e 63 74 69 6f 6e 20 | 7b 5c 65 6d 20 66 28 6e |unction |{\em f(n|
|000055e0| 29 5c 2c 7d 5c 6c 61 62 | 65 6c 7b 66 66 75 6e 63 |)\,}\lab|el{ffunc|
|000055f0| 7d 20 62 65 69 6e 67 20 | 74 68 65 20 73 75 6d 20 |} being |the sum |
|00005600| 6f 66 20 74 77 6f 20 63 | 6f 6d 70 6f 6e 65 6e 74 |of two c|omponent|
|00005610| 73 0a 7b 5c 65 6d 20 67 | 28 6e 29 5c 2c 7d 20 61 |s.{\em g|(n)\,} a|
|00005620| 6e 64 20 7b 5c 65 6d 20 | 68 28 6e 29 5c 2c 7d 3a |nd {\em |h(n)\,}:|
|00005630| 0a 20 20 20 20 5c 5b 20 | 66 28 6e 29 20 3d 20 67 |. \[ |f(n) = g|
|00005640| 28 6e 29 20 2b 20 68 28 | 6e 29 20 5c 5d 0a 46 75 |(n) + h(|n) \].Fu|
|00005650| 6e 63 74 69 6f 6e 20 67 | 28 6e 29 20 69 73 20 74 |nction g|(n) is t|
|00005660| 68 65 20 73 61 6d 65 20 | 61 73 20 74 68 65 20 6f |he same |as the o|
|00005670| 6e 65 20 64 65 73 63 72 | 69 62 65 64 20 69 6e 20 |ne descr|ibed in |
|00005680| 73 65 63 74 69 6f 6e 7e | 5c 72 65 66 7b 67 66 75 |section~|\ref{gfu|
|00005690| 6e 63 7d 3a 20 61 20 6d | 65 61 73 75 72 65 20 6f |nc}: a m|easure o|
|000056a0| 66 20 74 68 65 20 63 6f | 73 74 0a 6f 66 20 67 65 |f the co|st.of ge|
|000056b0| 74 74 69 6e 67 20 66 72 | 6f 6d 20 74 68 65 20 69 |tting fr|om the i|
|000056c0| 6e 69 74 69 61 6c 20 73 | 74 61 74 65 20 74 6f 20 |nitial s|tate to |
|000056d0| 74 68 65 20 63 75 72 72 | 65 6e 74 20 6e 6f 64 65 |the curr|ent node|
|000056e0| 2e 20 54 68 65 20 66 75 | 6e 63 74 69 6f 6e 20 68 |. The fu|nction h|
|000056f0| 28 6e 29 20 69 73 20 61 | 6e 0a 65 73 74 69 6d 61 |(n) is a|n.estima|
|00005700| 74 65 20 6f 66 20 74 68 | 65 20 61 64 64 69 74 69 |te of th|e additi|
|00005710| 6f 6e 61 6c 20 63 6f 73 | 74 20 6f 66 20 67 65 74 |onal cos|t of get|
|00005720| 74 69 6e 67 20 66 72 6f | 6d 20 74 68 65 20 63 75 |ting fro|m the cu|
|00005730| 72 72 65 6e 74 20 6e 6f | 64 65 20 74 6f 20 61 20 |rrent no|de to a |
|00005740| 67 6f 61 6c 0a 73 74 61 | 74 65 2e 20 50 75 74 20 |goal.sta|te. Put |
|00005750| 64 69 66 66 65 72 65 6e | 74 6c 79 2c 20 68 28 6e |differen|tly, h(n|
|00005760| 29 20 69 73 20 74 68 65 | 20 66 75 6e 63 74 69 6f |) is the| functio|
|00005770| 6e 20 69 6e 20 77 68 69 | 63 68 20 74 68 65 20 72 |n in whi|ch the r|
|00005780| 65 61 6c 20 68 65 75 72 | 69 73 74 69 63 0a 6b 6e |eal heur|istic.kn|
|00005790| 6f 77 6c 65 64 67 65 20 | 69 73 20 69 6d 62 65 64 |owledge |is imbed|
|000057a0| 64 65 64 2e 20 55 73 69 | 6e 67 20 66 28 6e 29 20 |ded. Usi|ng f(n) |
|000057b0| 77 65 20 61 72 65 20 61 | 62 6c 65 20 74 6f 20 6f |we are a|ble to o|
|000057c0| 72 64 65 72 20 74 68 65 | 20 73 65 74 20 6f 66 20 |rder the| set of |
|000057d0| 6e 6f 64 65 73 20 77 61 | 69 74 69 6e 67 0a 66 6f |nodes wa|iting.fo|
|000057e0| 72 20 65 78 70 61 6e 73 | 69 6f 6e 2c 20 62 79 20 |r expans|ion, by |
|000057f0| 63 6f 6e 76 65 6e 74 69 | 6f 6e 20 74 68 69 73 20 |conventi|on this |
|00005800| 77 69 6c 6c 20 62 65 20 | 64 6f 6e 65 20 74 68 69 |will be |done thi|
|00005810| 73 20 69 6e 20 7b 5c 65 | 6d 20 69 6e 63 72 65 61 |s in {\e|m increa|
|00005820| 73 69 6e 67 5c 2c 7d 20 | 6f 72 64 65 72 2e 0a 41 |sing\,} |order..A|
|00005830| 6e 20 61 6c 67 6f 72 69 | 74 68 6d 20 63 61 6e 20 |n algori|thm can |
|00005840| 74 68 65 6e 20 62 65 20 | 75 73 65 64 20 74 6f 20 |then be |used to |
|00005850| 73 65 6c 65 63 74 20 74 | 68 65 20 6e 6f 64 65 20 |select t|he node |
|00005860| 68 61 76 69 6e 67 20 74 | 68 65 20 73 6d 61 6c 6c |having t|he small|
|00005870| 65 73 74 20 66 28 6e 29 | 20 76 61 6c 75 65 0a 6e |est f(n)| value.n|
|00005880| 65 78 74 20 66 6f 72 20 | 65 78 70 61 6e 73 69 6f |ext for |expansio|
|00005890| 6e 2e 20 4f 6e 65 20 6f | 66 20 74 68 65 20 6d 65 |n. One o|f the me|
|000058a0| 74 68 6f 64 73 20 74 68 | 61 74 20 75 73 65 73 20 |thods th|at uses |
|000058b0| 74 68 69 73 20 74 65 63 | 68 6e 69 71 75 65 20 69 |this tec|hnique i|
|000058c0| 73 20 74 68 65 0a 7b 5c | 65 6d 20 62 65 73 74 2d |s the.{\|em best-|
|000058d0| 66 69 72 73 74 20 73 65 | 61 72 63 68 20 6d 65 74 |first se|arch met|
|000058e0| 68 6f 64 5c 2c 7d 20 6f | 72 20 7b 5c 65 6d 20 24 |hod\,} o|r {\em $|
|000058f0| 41 7b 5e 2a 7d 24 20 61 | 6c 67 6f 72 69 74 68 6d |A{^*}$ a|lgorithm|
|00005900| 5c 2c 7d 2e 0a 0a 49 74 | 20 69 73 20 69 6d 70 6f |\,}...It| is impo|
|00005910| 72 74 61 6e 74 20 74 6f | 20 6b 65 65 70 20 69 6e |rtant to| keep in|
|00005920| 20 6d 69 6e 64 20 74 68 | 61 74 20 6d 6f 73 74 20 | mind th|at most |
|00005930| 68 65 75 72 69 73 74 69 | 63 73 20 61 72 65 20 69 |heuristi|cs are i|
|00005940| 6d 70 65 72 66 65 63 74 | 20 61 6e 64 20 74 68 61 |mperfect| and tha|
|00005950| 74 2c 0a 69 6e 65 76 69 | 74 61 62 6c 79 2c 20 74 |t,.inevi|tably, t|
|00005960| 68 65 20 73 65 61 72 63 | 68 20 70 72 6f 63 65 73 |he searc|h proces|
|00005970| 73 20 77 69 6c 6c 20 62 | 65 20 61 66 66 65 63 74 |s will b|e affect|
|00005980| 65 64 20 62 79 20 74 68 | 69 73 2e 20 49 6e 20 67 |ed by th|is. In g|
|00005990| 65 6e 65 72 61 6c 2c 20 | 61 20 73 65 61 72 63 68 |eneral, |a search|
|000059a0| 0a 61 6c 67 6f 72 69 74 | 68 6d 20 69 73 20 63 61 |.algorit|hm is ca|
|000059b0| 6c 6c 65 64 20 7b 5c 65 | 6d 20 61 64 6d 69 73 73 |lled {\e|m admiss|
|000059c0| 69 62 6c 65 5c 2c 7d 20 | 69 66 20 66 6f 72 20 61 |ible\,} |if for a|
|000059d0| 6e 79 20 67 72 61 70 68 | 20 69 74 20 74 65 72 6d |ny graph| it term|
|000059e0| 69 6e 61 74 65 73 20 69 | 6e 20 61 6e 0a 6f 70 74 |inates i|n an.opt|
|000059f0| 69 6d 61 6c 20 70 61 74 | 68 20 74 6f 20 61 20 67 |imal pat|h to a g|
|00005a00| 6f 61 6c 20 77 68 65 6e | 65 76 65 72 20 61 20 70 |oal when|ever a p|
|00005a10| 61 74 68 20 65 78 69 73 | 74 73 2e 20 55 73 69 6e |ath exis|ts. Usin|
|00005a20| 67 20 61 20 68 65 75 72 | 69 73 74 69 63 20 66 75 |g a heur|istic fu|
|00005a30| 6e 63 74 69 6f 6e 0a 74 | 6f 20 63 6f 6e 64 75 63 |nction.t|o conduc|
|00005a40| 74 20 74 68 65 20 73 65 | 61 72 63 68 20 70 72 6f |t the se|arch pro|
|00005a50| 63 65 73 73 20 77 65 20 | 63 61 6e 6e 6f 74 20 61 |cess we |cannot a|
|00005a60| 6c 77 61 79 73 20 6d 61 | 6b 65 20 74 68 69 73 20 |lways ma|ke this |
|00005a70| 63 6c 61 69 6d 20 62 65 | 63 61 75 73 65 20 74 68 |claim be|cause th|
|00005a80| 65 0a 62 65 68 61 76 69 | 6f 75 72 20 6f 66 20 74 |e.behavi|our of t|
|00005a90| 68 65 20 73 65 61 72 63 | 68 20 77 69 6c 6c 20 64 |he searc|h will d|
|00005aa0| 65 70 65 6e 64 20 6f 6e | 20 68 6f 77 20 61 63 63 |epend on| how acc|
|00005ab0| 75 72 61 74 65 6c 79 20 | 74 68 65 20 66 75 6e 63 |urately |the func|
|00005ac0| 74 69 6f 6e 20 65 76 61 | 6c 75 61 74 65 73 0a 6e |tion eva|luates.n|
|00005ad0| 6f 64 65 73 2e 20 49 66 | 20 77 65 20 75 73 65 20 |odes. If| we use |
|00005ae0| 61 20 70 65 72 66 65 63 | 74 20 68 65 75 72 69 73 |a perfec|t heuris|
|00005af0| 74 69 63 20 66 75 6e 63 | 74 69 6f 6e 20 77 65 20 |tic func|tion we |
|00005b00| 61 72 65 20 67 75 61 72 | 61 6e 74 65 65 64 20 74 |are guar|anteed t|
|00005b10| 6f 20 66 69 6e 64 20 61 | 6e 0a 6f 70 74 69 6d 61 |o find a|n.optima|
|00005b20| 6c 20 73 6f 6c 75 74 69 | 6f 6e 2c 20 62 75 74 20 |l soluti|on, but |
|00005b30| 68 65 75 72 69 73 74 69 | 63 73 20 68 61 76 69 6e |heuristi|cs havin|
|00005b40| 67 20 74 68 69 73 20 70 | 72 6f 70 65 72 74 79 20 |g this p|roperty |
|00005b50| 61 72 65 20 68 61 72 64 | 20 74 6f 20 66 69 6e 64 |are hard| to find|
|00005b60| 2e 0a 46 75 72 74 68 65 | 72 6d 6f 72 65 2c 20 74 |..Furthe|rmore, t|
|00005b70| 68 65 20 64 69 66 66 69 | 63 75 6c 74 79 20 6f 66 |he diffi|culty of|
|00005b80| 20 63 6f 6d 70 75 74 69 | 6e 67 20 74 68 65 20 66 | computi|ng the f|
|00005b90| 75 6e 63 74 69 6f 6e 27 | 73 20 72 65 73 75 6c 74 |unction'|s result|
|00005ba0| 20 61 66 66 65 63 74 73 | 20 74 68 65 0a 74 6f 74 | affects| the.tot|
|00005bb0| 61 6c 20 63 6f 6d 70 75 | 74 61 74 69 6f 6e 61 6c |al compu|tational|
|00005bc0| 20 65 66 66 6f 72 74 20 | 6f 66 20 74 68 65 20 73 | effort |of the s|
|00005bd0| 65 61 72 63 68 20 70 72 | 6f 63 65 73 73 2e 20 41 |earch pr|ocess. A|
|00005be0| 6c 73 6f 2c 20 69 74 20 | 6d 61 79 20 62 65 20 6c |lso, it |may be l|
|00005bf0| 65 73 73 0a 69 6d 70 6f | 72 74 61 6e 74 20 74 6f |ess.impo|rtant to|
|00005c00| 20 66 69 6e 64 20 61 20 | 73 6f 6c 75 74 69 6f 6e | find a |solution|
|00005c10| 20 77 68 6f 73 65 20 63 | 6f 73 74 20 69 73 20 61 | whose c|ost is a|
|00005c20| 62 73 6f 6c 75 74 65 6c | 79 20 6d 69 6e 69 6d 61 |bsolutel|y minima|
|00005c30| 6c 20 74 68 61 6e 20 74 | 6f 20 66 69 6e 64 20 61 |l than t|o find a|
|00005c40| 0a 73 6f 6c 75 74 69 6f | 6e 20 6f 66 20 72 65 61 |.solutio|n of rea|
|00005c50| 73 6f 6e 61 62 6c 65 20 | 63 6f 73 74 20 77 69 74 |sonable |cost wit|
|00005c60| 68 69 6e 20 61 20 72 65 | 61 73 6f 6e 61 62 6c 65 |hin a re|asonable|
|00005c70| 20 61 6d 6f 75 6e 74 20 | 6f 66 20 74 69 6d 65 2e | amount |of time.|
|00005c80| 20 49 6e 20 74 68 69 73 | 20 63 61 73 65 0a 6f 6e | In this| case.on|
|00005c90| 65 20 6d 61 79 20 70 72 | 65 66 65 72 20 61 20 68 |e may pr|efer a h|
|00005ca0| 65 75 72 69 73 74 69 63 | 20 66 75 6e 63 74 69 6f |euristic| functio|
|00005cb0| 6e 20 74 68 61 74 20 65 | 76 61 6c 75 61 74 65 73 |n that e|valuates|
|00005cc0| 20 6e 6f 64 65 73 20 6d | 6f 72 65 20 61 63 63 75 | nodes m|ore accu|
|00005cd0| 72 61 74 65 6c 79 20 69 | 6e 0a 6d 6f 73 74 20 63 |rately i|n.most c|
|00005ce0| 61 73 65 73 2c 20 62 75 | 74 20 73 6f 6d 65 74 69 |ases, bu|t someti|
|00005cf0| 6d 65 73 20 6f 76 65 72 | 65 73 74 69 6d 61 74 65 |mes over|estimate|
|00005d00| 73 20 74 68 65 20 64 69 | 73 74 61 6e 63 65 20 74 |s the di|stance t|
|00005d10| 6f 20 74 68 65 20 67 6f | 61 6c 2c 20 74 68 75 73 |o the go|al, thus|
|00005d20| 20 72 65 73 75 6c 74 69 | 6e 67 0a 69 6e 20 61 6e | resulti|ng.in an|
|00005d30| 20 69 6e 61 64 6d 69 73 | 73 69 62 6c 65 20 61 6c | inadmis|sible al|
|00005d40| 67 6f 72 69 74 68 6d 2e | 20 4d 6f 73 74 20 6f 66 |gorithm.| Most of|
|00005d50| 20 74 68 65 20 74 69 6d | 65 20 77 65 20 6e 65 65 | the tim|e we nee|
|00005d60| 64 20 74 6f 20 6d 61 6b | 65 20 74 68 69 73 20 73 |d to mak|e this s|
|00005d70| 6f 72 74 20 6f 66 0a 63 | 6f 6d 70 72 6f 6d 69 73 |ort of.c|ompromis|
|00005d80| 65 3a 20 74 68 65 20 65 | 66 66 69 63 69 65 6e 63 |e: the e|fficienc|
|00005d90| 79 20 6f 66 20 74 68 65 | 20 73 65 61 72 63 68 20 |y of the| search |
|00005da0| 70 72 6f 63 65 73 73 20 | 6e 65 65 64 73 20 74 6f |process |needs to|
|00005db0| 20 62 65 20 69 6d 70 72 | 6f 76 65 64 20 61 74 20 | be impr|oved at |
|00005dc0| 74 68 65 0a 73 61 63 72 | 69 66 69 63 65 20 6f 66 |the.sacr|ifice of|
|00005dd0| 20 61 64 6d 69 73 73 69 | 62 69 6c 69 74 79 20 28 | admissi|bility (|
|00005de0| 73 65 65 20 42 61 72 72 | 28 31 39 38 31 29 2c 20 |see Barr|(1981), |
|00005df0| 70 2e 36 35 2f 36 36 2c | 20 4e 69 6c 73 73 6f 6e |p.65/66,| Nilsson|
|00005e00| 28 31 39 37 31 29 2c 20 | 70 2e 35 39 66 66 2e 29 |(1971), |p.59ff.)|
|00005e10| 0a 0a 0a 5c 73 65 63 74 | 69 6f 6e 7b 54 68 65 20 |...\sect|ion{The |
|00005e20| 73 65 61 72 63 68 20 63 | 6c 61 73 73 20 6c 69 62 |search c|lass lib|
|00005e30| 72 61 72 79 7d 0a 0a 5c | 73 75 62 73 65 63 74 69 |rary}..\|subsecti|
|00005e40| 6f 6e 7b 57 68 79 20 43 | 24 5e 7b 2b 2b 7d 24 3f |on{Why C|$^{++}$?|
|00005e50| 7d 0a 0a 4f 6e 65 20 6f | 66 20 74 68 65 20 74 68 |}..One o|f the th|
|00005e60| 69 6e 67 73 20 74 6f 20 | 62 65 20 65 78 70 6c 61 |ings to |be expla|
|00005e70| 69 6e 65 64 20 77 69 6c | 6c 20 62 65 20 74 68 65 |ined wil|l be the|
|00005e80| 20 72 65 61 73 6f 6e 20 | 77 68 79 20 77 65 20 64 | reason |why we d|
|00005e90| 65 63 69 64 65 64 20 74 | 6f 20 75 73 65 20 43 24 |ecided t|o use C$|
|00005ea0| 5e 7b 2b 2b 7d 24 0a 66 | 6f 72 20 70 72 6f 67 72 |^{++}$.f|or progr|
|00005eb0| 61 6d 6d 69 6e 67 20 61 | 6e 20 41 49 2d 74 79 70 |amming a|n AI-typ|
|00005ec0| 65 20 70 72 6f 62 6c 65 | 6d 20 77 68 69 6c 65 20 |e proble|m while |
|00005ed0| 73 6f 20 6d 61 6e 79 20 | 73 70 65 63 69 61 6c 69 |so many |speciali|
|00005ee0| 7a 65 64 20 41 49 20 70 | 72 6f 67 72 61 6d 6d 69 |zed AI p|rogrammi|
|00005ef0| 6e 67 0a 6c 61 6e 67 75 | 61 67 65 73 20 61 72 65 |ng.langu|ages are|
|00005f00| 20 61 76 61 69 6c 61 62 | 6c 65 2e 20 46 6f 72 20 | availab|le. For |
|00005f10| 6f 6e 65 20 74 68 69 6e | 67 2c 20 77 65 20 77 61 |one thin|g, we wa|
|00005f20| 6e 74 65 64 20 74 6f 20 | 6b 6e 6f 77 20 68 6f 77 |nted to |know how|
|00005f30| 20 6d 75 63 68 20 6d 6f | 72 65 20 65 66 66 6f 72 | much mo|re effor|
|00005f40| 74 0a 69 74 20 77 6f 75 | 6c 64 20 62 65 20 74 6f |t.it wou|ld be to|
|00005f50| 20 75 73 65 20 61 20 6c | 6f 77 65 72 20 6c 65 76 | use a l|ower lev|
|00005f60| 65 6c 20 70 72 6f 67 72 | 61 6d 6d 69 6e 67 20 6c |el progr|amming l|
|00005f70| 61 6e 67 75 61 67 65 20 | 28 6c 6f 77 65 72 20 63 |anguage |(lower c|
|00005f80| 6f 6d 70 61 72 65 64 20 | 74 6f 20 41 49 0a 70 72 |ompared |to AI.pr|
|00005f90| 6f 67 72 61 6d 6d 69 6e | 67 20 6c 61 6e 67 75 61 |ogrammin|g langua|
|00005fa0| 67 65 73 20 6c 69 6b 65 | 20 50 72 6f 6c 6f 67 2c |ges like| Prolog,|
|00005fb0| 20 74 68 61 74 20 69 73 | 29 20 74 6f 20 70 72 6f | that is|) to pro|
|00005fc0| 67 72 61 6d 20 74 68 69 | 73 20 74 79 70 65 20 6f |gram thi|s type o|
|00005fd0| 66 20 70 72 6f 62 6c 65 | 6d 2e 0a 43 24 5e 7b 2b |f proble|m..C$^{+|
|00005fe0| 2b 7d 24 20 73 65 65 6d | 65 64 20 65 78 63 65 6c |+}$ seem|ed excel|
|00005ff0| 6c 65 6e 74 20 66 6f 72 | 20 74 68 69 73 20 6a 6f |lent for| this jo|
|00006000| 62 20 62 65 63 61 75 73 | 65 20 69 74 20 69 73 20 |b becaus|e it is |
|00006010| 62 61 73 65 64 20 6f 6e | 20 43 2c 20 61 20 74 68 |based on| C, a th|
|00006020| 69 72 64 0a 67 65 6e 65 | 72 61 74 69 6f 6e 20 70 |ird.gene|ration p|
|00006030| 72 6f 67 72 61 6d 6d 69 | 6e 67 20 6c 61 6e 67 75 |rogrammi|ng langu|
|00006040| 61 67 65 2c 20 61 6e 64 | 20 61 6c 73 6f 20 62 65 |age, and| also be|
|00006050| 63 61 75 73 65 20 69 74 | 20 66 6f 6c 6c 6f 77 73 |cause it| follows|
|00006060| 20 74 68 65 20 6f 62 6a | 65 63 74 0a 6f 72 69 65 | the obj|ect.orie|
|00006070| 6e 74 65 64 20 70 61 72 | 61 64 69 67 6d 2c 20 6d |nted par|adigm, m|
|00006080| 65 61 6e 69 6e 67 20 74 | 68 61 74 20 69 74 20 73 |eaning t|hat it s|
|00006090| 75 70 70 6f 72 74 73 20 | 61 20 68 69 67 68 65 72 |upports |a higher|
|000060a0| 20 6c 65 76 65 6c 20 6f | 66 20 61 62 73 74 72 61 | level o|f abstra|
|000060b0| 63 74 69 6f 6e 2c 20 69 | 6e 0a 74 68 65 20 63 61 |ction, i|n.the ca|
|000060c0| 73 65 20 6f 66 20 4f 4f | 50 3a 20 74 68 65 20 63 |se of OO|P: the c|
|000060d0| 6f 6d 62 69 6e 61 74 69 | 6f 6e 20 6f 66 20 70 72 |ombinati|on of pr|
|000060e0| 6f 63 65 64 75 72 61 6c | 20 61 6e 64 20 64 61 74 |ocedural| and dat|
|000060f0| 61 20 61 62 73 74 72 61 | 63 74 69 6f 6e 2e 20 42 |a abstra|ction. B|
|00006100| 75 74 20 74 68 65 0a 6d | 61 69 6e 20 72 65 61 73 |ut the.m|ain reas|
|00006110| 6f 6e 20 77 68 79 20 77 | 65 20 64 65 63 69 64 65 |on why w|e decide|
|00006120| 64 20 74 6f 20 75 73 65 | 20 43 24 5e 7b 2b 2b 7d |d to use| C$^{++}|
|00006130| 24 20 69 73 20 74 68 61 | 74 20 69 74 20 73 75 70 |$ is tha|t it sup|
|00006140| 70 6f 72 74 73 20 7b 5c | 65 6d 20 69 6e 68 65 72 |ports {\|em inher|
|00006150| 69 74 61 6e 63 65 5c 2c | 7d 2e 0a 54 68 69 73 20 |itance\,|}..This |
|00006160| 66 65 61 74 75 72 65 20 | 6d 61 6b 65 73 20 69 74 |feature |makes it|
|00006170| 20 70 6f 73 73 69 62 6c | 65 20 74 6f 20 65 61 73 | possibl|e to eas|
|00006180| 69 6c 79 20 6d 61 6b 65 | 20 75 73 65 20 6f 66 20 |ily make| use of |
|00006190| 65 78 69 73 74 69 6e 67 | 20 73 6f 66 74 77 61 72 |existing| softwar|
|000061a0| 65 20 77 68 65 6e 0a 64 | 65 76 65 6c 6f 70 69 6e |e when.d|evelopin|
|000061b0| 67 20 6e 65 77 20 61 70 | 70 6c 69 63 61 74 69 6f |g new ap|plicatio|
|000061c0| 6e 73 2e 20 43 6f 6d 62 | 69 6e 65 64 20 77 69 74 |ns. Comb|ined wit|
|000061d0| 68 20 74 68 65 20 70 6f | 73 73 69 62 69 6c 69 74 |h the po|ssibilit|
|000061e0| 79 20 74 6f 20 64 65 66 | 69 6e 65 20 7b 5c 65 6d |y to def|ine {\em|
|000061f0| 20 76 69 72 74 75 61 6c | 5c 2c 7d 0a 66 75 6e 63 | virtual|\,}.func|
|00006200| 74 69 6f 6e 73 20 74 68 | 69 73 20 6d 61 6b 65 73 |tions th|is makes|
|00006210| 20 69 74 20 70 6f 73 73 | 69 62 6c 65 20 74 6f 20 | it poss|ible to |
|00006220| 64 65 73 69 67 6e 20 66 | 6f 75 6e 64 61 74 69 6f |design f|oundatio|
|00006230| 6e 20 63 6c 61 73 73 65 | 73 20 74 68 61 74 20 61 |n classe|s that a|
|00006240| 72 65 20 6f 66 20 6e 6f | 0a 75 73 65 20 69 6e 20 |re of no|.use in |
|00006250| 74 68 65 6d 73 65 6c 76 | 65 73 2c 20 62 75 74 20 |themselv|es, but |
|00006260| 63 61 6e 20 62 65 20 65 | 61 73 69 6c 79 20 65 78 |can be e|asily ex|
|00006270| 74 65 6e 64 65 64 20 66 | 6f 72 20 72 65 61 6c 20 |tended f|or real |
|00006280| 61 70 70 6c 69 63 61 74 | 69 6f 6e 73 2e 0a 0a 54 |applicat|ions...T|
|00006290| 68 65 20 6d 61 69 6e 20 | 6f 62 6a 65 63 74 69 76 |he main |objectiv|
|000062a0| 65 20 77 61 73 20 74 6f | 20 73 65 70 65 72 61 74 |e was to| seperat|
|000062b0| 65 20 74 68 65 20 70 72 | 6f 62 6c 65 6d 2d 73 6f |e the pr|oblem-so|
|000062c0| 6c 76 69 6e 67 20 70 72 | 6f 63 65 73 73 20 74 68 |lving pr|ocess th|
|000062d0| 61 74 20 77 65 0a 64 65 | 73 63 72 69 62 65 64 20 |at we.de|scribed |
|000062e0| 61 62 6f 76 65 20 61 6e | 64 20 74 68 65 20 72 65 |above an|d the re|
|000062f0| 70 72 65 73 65 6e 74 61 | 74 69 6f 6e 20 6f 66 20 |presenta|tion of |
|00006300| 74 68 65 20 70 72 6f 62 | 6c 65 6d 20 69 74 73 65 |the prob|lem itse|
|00006310| 6c 66 2e 20 49 6e 20 63 | 68 61 70 74 65 72 20 32 |lf. In c|hapter 2|
|00006320| 20 77 65 0a 73 68 6f 77 | 65 64 20 74 68 61 74 20 | we.show|ed that |
|00006330| 61 20 6c 6f 74 20 6f 66 | 20 70 72 6f 62 6c 65 6d |a lot of| problem|
|00006340| 73 20 63 61 6e 20 62 65 | 20 73 6f 6c 76 65 64 20 |s can be| solved |
|00006350| 75 73 69 6e 67 20 73 74 | 61 6e 64 61 72 64 20 74 |using st|andard t|
|00006360| 65 63 68 6e 69 71 75 65 | 73 2c 20 65 2e 67 2e 2c |echnique|s, e.g.,|
|00006370| 0a 74 68 65 20 73 74 61 | 74 65 20 73 70 61 63 65 |.the sta|te space|
|00006380| 20 72 65 70 72 65 73 65 | 6e 74 61 74 69 6f 6e 20 | represe|ntation |
|00006390| 61 6e 64 20 73 65 61 72 | 63 68 2e 20 49 74 20 73 |and sear|ch. It s|
|000063a0| 65 65 6d 65 64 20 75 73 | 65 66 75 6c 20 74 68 65 |eemed us|eful the|
|000063b0| 72 65 66 6f 72 65 2c 20 | 74 6f 0a 64 65 76 65 6c |refore, |to.devel|
|000063c0| 6f 70 20 73 6f 6d 65 20 | 62 61 73 69 63 20 72 6f |op some |basic ro|
|000063d0| 75 74 69 6e 65 73 20 6f | 66 66 65 72 69 6e 67 20 |utines o|ffering |
|000063e0| 61 20 6e 75 6d 62 65 72 | 20 6f 66 20 73 65 61 72 |a number| of sear|
|000063f0| 63 68 20 6d 65 74 68 6f | 64 73 20 74 68 61 74 20 |ch metho|ds that |
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.