home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was processed as: LaTeX Document
(document/latex).
You can browse this item here: search.tex
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| LaTeX Document (document/latex)
| magic
| Supported |
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)
|
|
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 5c 73 70 65 | 63 69 61 6c 7b 65 6d 3a |0mm.\spe|cial{em:|
|00001e50| 6c 69 6e 65 77 69 64 74 | 68 20 30 2e 34 70 74 7d |linewidt|h 0.4pt}|
|00001e60| 0a 5c 6c 69 6e 65 74 68 | 69 63 6b 6e 65 73 73 7b |.\lineth|ickness{|
|00001e70| 30 2e 34 70 74 7d 0a 5c | 62 65 67 69 6e 7b 70 69 |0.4pt}.\|begin{pi|
|00001e80| 63 74 75 72 65 7d 28 37 | 35 2e 30 30 2c 35 35 2e |cture}(7|5.00,55.|
|00001e90| 30 30 29 0a 5c 70 75 74 | 28 31 30 2e 30 30 2c 31 |00).\put|(10.00,1|
|00001ea0| 30 2e 30 30 29 7b 5c 63 | 69 72 63 6c 65 7b 30 2e |0.00){\c|ircle{0.|
|00001eb0| 30 30 7d 7d 0a 5c 70 75 | 74 28 31 30 2e 30 30 2c |00}}.\pu|t(10.00,|
|00001ec0| 31 30 2e 30 30 29 7b 5c | 63 69 72 63 6c 65 7b 31 |10.00){\|circle{1|
|00001ed0| 30 2e 30 30 7d 7d 0a 5c | 70 75 74 28 33 30 2e 30 |0.00}}.\|put(30.0|
|00001ee0| 30 2c 31 30 2e 30 30 29 | 7b 5c 63 69 72 63 6c 65 |0,10.00)|{\circle|
|00001ef0| 7b 31 30 2e 30 30 7d 7d | 0a 5c 70 75 74 28 35 30 |{10.00}}|.\put(50|
|00001f00| 2e 30 30 2c 31 30 2e 30 | 30 29 7b 5c 63 69 72 63 |.00,10.0|0){\circ|
|00001f10| 6c 65 7b 31 30 2e 32 30 | 7d 7d 0a 5c 70 75 74 28 |le{10.20|}}.\put(|
|00001f20| 37 30 2e 30 30 2c 31 30 | 2e 30 30 29 7b 5c 63 69 |70.00,10|.00){\ci|
|00001f30| 72 63 6c 65 7b 31 30 2e | 30 30 7d 7d 0a 5c 70 75 |rcle{10.|00}}.\pu|
|00001f40| 74 28 32 30 2e 30 30 2c | 33 30 2e 30 30 29 7b 5c |t(20.00,|30.00){\|
|00001f50| 63 69 72 63 6c 65 7b 31 | 30 2e 30 30 7d 7d 0a 5c |circle{1|0.00}}.\|
|00001f60| 70 75 74 28 36 30 2e 30 | 30 2c 33 30 2e 30 30 29 |put(60.0|0,30.00)|
|00001f70| 7b 5c 63 69 72 63 6c 65 | 7b 31 30 2e 30 30 7d 7d |{\circle|{10.00}}|
|00001f80| 0a 5c 70 75 74 28 34 30 | 2e 30 30 2c 35 30 2e 30 |.\put(40|.00,50.0|
|00001f90| 30 29 7b 5c 63 69 72 63 | 6c 65 7b 31 30 2e 30 30 |0){\circ|le{10.00|
|00001fa0| 7d 7d 0a 5c 70 75 74 28 | 33 37 2e 30 30 2c 34 36 |}}.\put(|37.00,46|
|00001fb0| 2e 30 30 29 7b 5c 6c 69 | 6e 65 28 2d 33 2c 2d 32 |.00){\li|ne(-3,-2|
|00001fc0| 29 7b 31 37 2e 30 30 7d | 7d 0a 5c 70 75 74 28 34 |){17.00}|}.\put(4|
|00001fd0| 33 2e 30 30 2c 34 36 2e | 30 30 29 7b 5c 6c 69 6e |3.00,46.|00){\lin|
|00001fe0| 65 28 33 2c 2d 32 29 7b | 31 37 2e 30 30 7d 7d 0a |e(3,-2){|17.00}}.|
|00001ff0| 5c 70 75 74 28 31 37 2e | 30 30 2c 32 36 2e 30 30 |\put(17.|00,26.00|
|00002000| 29 7b 5c 6c 69 6e 65 28 | 2d 32 2c 2d 33 29 7b 37 |){\line(|-2,-3){7|
|00002010| 2e 33 33 7d 7d 0a 5c 70 | 75 74 28 32 33 2e 30 30 |.33}}.\p|ut(23.00|
|00002020| 2c 32 36 2e 30 30 29 7b | 5c 6c 69 6e 65 28 32 2c |,26.00){|\line(2,|
|00002030| 2d 33 29 7b 37 2e 33 33 | 7d 7d 0a 5c 70 75 74 28 |-3){7.33|}}.\put(|
|00002040| 35 37 2e 30 30 2c 32 36 | 2e 30 30 29 7b 5c 6c 69 |57.00,26|.00){\li|
|00002050| 6e 65 28 2d 32 2c 2d 33 | 29 7b 37 2e 33 33 7d 7d |ne(-2,-3|){7.33}}|
|00002060| 0a 5c 70 75 74 28 36 33 | 2e 30 30 2c 32 36 2e 30 |.\put(63|.00,26.0|
|00002070| 30 29 7b 5c 6c 69 6e 65 | 28 32 2c 2d 33 29 7b 37 |0){\line|(2,-3){7|
|00002080| 2e 33 33 7d 7d 0a 5c 70 | 75 74 28 34 30 2e 30 30 |.33}}.\p|ut(40.00|
|00002090| 2c 35 30 2e 30 30 29 7b | 5c 6d 61 6b 65 62 6f 78 |,50.00){|\makebox|
|000020a0| 28 30 2c 30 29 5b 63 63 | 5d 7b 61 7d 7d 0a 5c 70 |(0,0)[cc|]{a}}.\p|
|000020b0| 75 74 28 32 30 2e 30 30 | 2c 33 30 2e 30 30 29 7b |ut(20.00|,30.00){|
|000020c0| 5c 6d 61 6b 65 62 6f 78 | 28 30 2c 30 29 5b 63 63 |\makebox|(0,0)[cc|
|000020d0| 5d 7b 62 7d 7d 0a 5c 70 | 75 74 28 36 30 2e 30 30 |]{b}}.\p|ut(60.00|
|000020e0| 2c 33 30 2e 30 30 29 7b | 5c 6d 61 6b 65 62 6f 78 |,30.00){|\makebox|
|000020f0| 28 30 2c 30 29 5b 63 63 | 5d 7b 63 7d 7d 0a 5c 70 |(0,0)[cc|]{c}}.\p|
|00002100| 75 74 28 31 30 2e 30 30 | 2c 31 30 2e 30 30 29 7b |ut(10.00|,10.00){|
|00002110| 5c 6d 61 6b 65 62 6f 78 | 28 30 2c 30 29 5b 63 63 |\makebox|(0,0)[cc|
|00002120| 5d 7b 64 7d 7d 0a 5c 70 | 75 74 28 33 30 2e 30 30 |]{d}}.\p|ut(30.00|
|00002130| 2c 31 30 2e 30 30 29 7b | 5c 6d 61 6b 65 62 6f 78 |,10.00){|\makebox|
|00002140| 28 30 2c 30 29 5b 63 63 | 5d 7b 65 7d 7d 0a 5c 70 |(0,0)[cc|]{e}}.\p|
|00002150| 75 74 28 35 30 2e 30 30 | 2c 31 30 2e 30 30 29 7b |ut(50.00|,10.00){|
|00002160| 5c 6d 61 6b 65 62 6f 78 | 28 30 2c 30 29 5b 63 63 |\makebox|(0,0)[cc|
|00002170| 5d 7b 66 7d 7d 0a 5c 70 | 75 74 28 37 30 2e 30 30 |]{f}}.\p|ut(70.00|
|00002180| 2c 31 30 2e 30 30 29 7b | 5c 6d 61 6b 65 62 6f 78 |,10.00){|\makebox|
|00002190| 28 30 2c 30 29 5b 63 63 | 5d 7b 67 7d 7d 0a 5c 65 |(0,0)[cc|]{g}}.\e|
|000021a0| 6e 64 7b 70 69 63 74 75 | 72 65 7d 0a 20 20 20 20 |nd{pictu|re}. |
|000021b0| 5c 63 61 70 74 69 6f 6e | 7b 53 74 61 72 74 20 6f |\caption|{Start o|
|000021c0| 66 20 61 20 73 65 61 72 | 63 68 20 74 72 65 65 7d |f a sear|ch tree}|
|000021d0| 5c 6c 61 62 65 6c 7b 66 | 69 67 74 72 65 65 7d 0a |\label{f|igtree}.|
|000021e0| 5c 65 6e 64 7b 63 65 6e | 74 65 72 7d 0a 5c 65 6e |\end{cen|ter}.\en|
|000021f0| 64 7b 66 69 67 75 72 65 | 7d 0a 49 6e 20 74 68 69 |d{figure|}.In thi|
|00002200| 73 20 72 65 70 72 65 73 | 65 6e 74 61 74 69 6f 6e |s repres|entation|
|00002210| 20 65 76 65 72 79 20 6c | 65 61 66 20 6e 6f 64 65 | every l|eaf node|
|00002220| 20 63 6f 72 72 65 73 70 | 6f 6e 64 73 20 74 6f 20 | corresp|onds to |
|00002230| 61 20 73 74 61 74 65 2c | 20 77 69 74 68 20 74 68 |a state,| with th|
|00002240| 65 20 72 6f 6f 74 0a 6e | 6f 64 65 20 72 65 70 72 |e root.n|ode repr|
|00002250| 65 73 65 6e 74 69 6e 67 | 20 74 68 65 20 69 6e 69 |esenting| the ini|
|00002260| 74 69 61 6c 20 73 74 61 | 74 65 2e 20 45 61 63 68 |tial sta|te. Each|
|00002270| 20 6f 70 65 72 61 74 6f | 72 20 61 70 70 6c 69 63 | operato|r applic|
|00002280| 61 74 69 6f 6e 20 69 73 | 20 72 65 70 72 65 73 65 |ation is| represe|
|00002290| 6e 74 65 64 20 62 79 0a | 61 20 63 6f 6e 6e 65 63 |nted by.|a connec|
|000022a0| 74 69 6f 6e 20 62 65 74 | 77 65 65 6e 20 74 77 6f |tion bet|ween two|
|000022b0| 20 6e 6f 64 65 73 2e 0a | 0a 54 72 65 65 73 20 61 | nodes..|.Trees a|
|000022c0| 72 65 20 61 20 73 70 65 | 63 69 61 6c 20 63 61 73 |re a spe|cial cas|
|000022d0| 65 20 6f 66 20 61 20 6d | 6f 72 65 20 67 65 6e 65 |e of a m|ore gene|
|000022e0| 72 61 6c 20 73 74 72 75 | 63 74 75 72 65 20 63 61 |ral stru|cture ca|
|000022f0| 6c 6c 65 64 20 61 20 7b | 5c 65 6d 20 67 72 61 70 |lled a {|\em grap|
|00002300| 68 5c 2c 7d 0a 5c 66 6f | 6f 74 6e 6f 74 65 7b 53 |h\,}.\fo|otnote{S|
|00002310| 65 65 20 4e 69 6c 73 73 | 6f 6e 28 31 39 37 31 29 |ee Nilss|on(1971)|
|00002320| 2c 20 70 2e 32 32 2c 20 | 42 61 72 72 28 31 39 38 |, p.22, |Barr(198|
|00002330| 31 29 2c 20 70 2e 32 35 | 2f 32 36 2c 20 52 69 74 |1), p.25|/26, Rit|
|00002340| 63 68 28 31 39 38 33 29 | 2c 20 70 2e 36 33 7d 2e |ch(1983)|, p.63}.|
|00002350| 0a 41 20 74 72 65 65 20 | 69 73 20 61 20 67 72 61 |.A tree |is a gra|
|00002360| 70 68 20 65 61 63 68 20 | 6f 66 20 77 68 6f 73 65 |ph each |of whose|
|00002370| 20 6e 6f 64 65 73 20 68 | 61 73 20 61 20 75 6e 69 | nodes h|as a uni|
|00002380| 71 75 65 20 70 61 72 65 | 6e 74 20 28 65 78 63 65 |que pare|nt (exce|
|00002390| 70 74 20 66 6f 72 20 74 | 68 65 20 72 6f 6f 74 0a |pt for t|he root.|
|000023a0| 6e 6f 64 65 2c 20 77 68 | 69 63 68 20 68 61 73 20 |node, wh|ich has |
|000023b0| 6e 6f 20 70 61 72 65 6e | 74 29 2e 20 53 65 61 72 |no paren|t). Sear|
|000023c0| 63 68 69 6e 67 20 61 20 | 74 72 65 65 20 69 73 20 |ching a |tree is |
|000023d0| 65 61 73 69 65 72 20 74 | 68 61 6e 20 73 65 61 72 |easier t|han sear|
|000023e0| 63 68 69 6e 67 20 61 20 | 67 72 61 70 68 2c 0a 62 |ching a |graph,.b|
|000023f0| 65 63 61 75 73 65 20 77 | 68 65 6e 20 61 20 6e 65 |ecause w|hen a ne|
|00002400| 77 20 6e 6f 64 65 20 69 | 73 20 67 65 6e 65 72 61 |w node i|s genera|
|00002410| 74 65 64 20 69 6e 20 74 | 68 65 20 74 72 65 65 20 |ted in t|he tree |
|00002420| 77 65 20 63 61 6e 20 62 | 65 20 73 75 72 65 20 69 |we can b|e sure i|
|00002430| 74 20 68 61 73 20 6e 6f | 74 0a 62 65 65 6e 20 67 |t has no|t.been g|
|00002440| 65 6e 65 72 61 74 65 64 | 20 62 65 66 6f 72 65 2e |enerated| before.|
|00002450| 20 54 68 69 73 20 69 73 | 20 74 72 75 65 20 62 65 | This is| true be|
|00002460| 63 61 75 73 65 20 65 76 | 65 72 79 20 6e 6f 64 65 |cause ev|ery node|
|00002470| 20 68 61 73 20 6f 6e 6c | 79 20 6f 6e 65 20 70 61 | has onl|y one pa|
|00002480| 72 65 6e 74 2c 20 73 6f | 0a 74 68 65 72 65 20 63 |rent, so|.there c|
|00002490| 61 6e 6e 6f 74 20 62 65 | 20 74 77 6f 20 6f 72 20 |annot be| two or |
|000024a0| 6d 6f 72 65 20 64 69 66 | 66 65 72 65 6e 74 20 70 |more dif|ferent p|
|000024b0| 61 74 68 73 20 6c 65 61 | 64 69 6e 67 20 74 6f 20 |aths lea|ding to |
|000024c0| 74 68 65 20 73 61 6d 65 | 20 6e 6f 64 65 2e 20 49 |the same| node. I|
|000024d0| 6e 20 61 0a 67 72 61 70 | 68 2c 20 68 6f 77 65 76 |n a.grap|h, howev|
|000024e0| 65 72 2c 20 6e 6f 64 65 | 73 20 75 73 75 61 6c 6c |er, node|s usuall|
|000024f0| 79 20 68 61 76 65 20 6d | 6f 72 65 20 74 68 61 6e |y have m|ore than|
|00002500| 20 6f 6e 65 20 70 61 72 | 65 6e 74 2e 20 20 54 68 | one par|ent. Th|
|00002510| 65 72 65 66 6f 72 65 2c | 20 77 68 65 6e 0a 73 65 |erefore,| when.se|
|00002520| 61 72 63 68 69 6e 67 20 | 61 20 67 72 61 70 68 20 |arching |a graph |
|00002530| 6f 6e 65 20 73 68 6f 75 | 6c 64 20 6d 61 6b 65 20 |one shou|ld make |
|00002540| 70 72 6f 76 69 73 69 6f | 6e 73 20 74 6f 20 64 65 |provisio|ns to de|
|00002550| 61 6c 20 77 69 74 68 20 | 74 68 65 73 65 20 73 69 |al with |these si|
|00002560| 74 75 61 74 69 6f 6e 73 | 2e 0a 53 61 79 69 6e 67 |tuations|..Saying|
|00002570| 20 74 68 61 74 20 61 20 | 6e 6f 64 65 20 68 61 73 | that a |node has|
|00002580| 20 6d 6f 72 65 20 74 68 | 61 6e 20 6f 6e 65 20 70 | more th|an one p|
|00002590| 61 72 65 6e 74 20 6d 65 | 61 6e 73 20 74 68 61 74 |arent me|ans that|
|000025a0| 20 74 68 65 20 6e 6f 64 | 65 20 69 73 20 67 65 6e | the nod|e is gen|
|000025b0| 65 72 61 74 65 64 0a 62 | 79 20 61 20 64 69 66 66 |erated.b|y a diff|
|000025c0| 65 72 65 6e 74 20 73 65 | 71 75 65 6e 63 65 20 6f |erent se|quence o|
|000025d0| 66 20 74 68 65 20 73 61 | 6d 65 20 6f 70 65 72 61 |f the sa|me opera|
|000025e0| 74 6f 72 73 2e 20 54 68 | 61 74 20 69 73 2c 20 74 |tors. Th|at is, t|
|000025f0| 68 65 20 73 61 6d 65 20 | 6e 6f 64 65 20 6d 61 79 |he same |node may|
|00002600| 20 62 65 0a 70 61 72 74 | 20 6f 66 20 73 65 76 65 | be.part| of seve|
|00002610| 72 61 6c 20 70 61 74 68 | 73 2c 20 61 6e 64 20 63 |ral path|s, and c|
|00002620| 6f 6e 74 69 6e 75 69 6e | 67 20 74 68 65 20 70 72 |ontinuin|g the pr|
|00002630| 6f 63 65 73 73 69 6e 67 | 20 6f 66 20 62 6f 74 68 |ocessing| of both|
|00002640| 20 74 68 65 73 65 20 6e | 6f 64 65 73 20 28 77 68 | these n|odes (wh|
|00002650| 69 63 68 20 61 72 65 0a | 72 65 61 6c 6c 79 20 74 |ich are.|really t|
|00002660| 68 65 20 73 61 6d 65 20 | 6e 6f 64 65 29 20 77 6f |he same |node) wo|
|00002670| 75 6c 64 20 62 65 20 72 | 65 64 75 6e 64 61 6e 74 |uld be r|edundant|
|00002680| 20 61 6e 64 20 61 20 77 | 61 73 74 65 20 6f 66 20 | and a w|aste of |
|00002690| 65 66 66 6f 72 74 2e 20 | 54 68 69 73 20 63 61 6e |effort. |This can|
|000026a0| 20 62 65 0a 61 76 6f 69 | 64 65 64 20 61 74 20 74 | be.avoi|ded at t|
|000026b0| 68 65 20 70 72 69 63 65 | 20 6f 66 20 61 64 64 69 |he price| of addi|
|000026c0| 74 69 6f 6e 61 6c 20 62 | 6f 6f 6b 6b 65 65 70 69 |tional b|ookkeepi|
|000026d0| 6e 67 2e 20 49 6e 73 74 | 65 61 64 20 6f 66 20 74 |ng. Inst|ead of t|
|000026e0| 72 61 76 65 72 73 69 6e | 67 20 61 20 74 72 65 65 |raversin|g a tree|
|000026f0| 20 77 65 0a 74 72 61 76 | 65 72 73 65 20 61 20 7b | we.trav|erse a {|
|00002700| 5c 65 6d 20 64 69 72 65 | 63 74 65 64 20 67 72 61 |\em dire|cted gra|
|00002710| 70 68 5c 2c 7d 5c 66 6f | 6f 74 6e 6f 74 65 7b 4b |ph\,}\fo|otnote{K|
|00002720| 6e 75 74 68 28 31 39 37 | 39 29 2c 20 70 2e 33 37 |nuth(197|9), p.37|
|00002730| 31 2e 7d 3a 20 65 76 65 | 72 79 20 74 69 6d 65 20 |1.}: eve|ry time |
|00002740| 61 0a 6e 6f 64 65 20 69 | 73 20 67 65 6e 65 72 61 |a.node i|s genera|
|00002750| 74 65 64 20 77 65 20 65 | 78 61 6d 69 6e 65 20 74 |ted we e|xamine t|
|00002760| 68 65 20 73 65 74 20 6f | 66 20 6e 6f 64 65 73 20 |he set o|f nodes |
|00002770| 67 65 6e 65 72 61 74 65 | 64 20 73 6f 20 66 61 72 |generate|d so far|
|00002780| 20 74 6f 20 73 65 65 20 | 69 66 20 74 68 69 73 0a | to see |if this.|
|00002790| 6e 6f 64 65 20 61 6c 72 | 65 61 64 79 20 65 78 69 |node alr|eady exi|
|000027a0| 73 74 73 20 69 6e 20 74 | 68 65 20 67 72 61 70 68 |sts in t|he graph|
|000027b0| 2e 20 49 66 20 69 74 20 | 64 6f 65 73 2c 20 77 65 |. If it |does, we|
|000027c0| 20 74 68 72 6f 77 20 69 | 74 20 61 77 61 79 20 28 | throw i|t away (|
|000027d0| 6e 6f 74 65 3a 20 73 65 | 65 0a 70 61 67 65 7e 5c |note: se|e.page~\|
|000027e0| 70 61 67 65 72 65 66 7b | 67 72 61 70 68 2d 6b 65 |pageref{|graph-ke|
|000027f0| 65 70 7d 20 66 6f 72 20 | 65 78 63 65 70 74 69 6f |ep} for |exceptio|
|00002800| 6e 73 20 74 6f 20 74 68 | 69 73 20 72 75 6c 65 29 |ns to th|is rule)|
|00002810| 2c 20 69 66 20 6e 6f 74 | 2c 20 77 65 20 61 64 64 |, if not|, we add|
|00002820| 20 69 74 20 74 6f 0a 74 | 68 65 20 67 72 61 70 68 | it to.t|he graph|
|00002830| 2e 0a 0a 54 68 69 73 20 | 77 61 79 20 77 65 20 77 |...This |way we w|
|00002840| 69 6c 6c 20 61 6c 73 6f | 20 61 76 6f 69 64 20 61 |ill also| avoid a|
|00002850| 20 72 65 6c 61 74 65 64 | 20 70 72 6f 62 6c 65 6d | related| problem|
|00002860| 3a 20 69 66 20 77 65 20 | 64 69 64 20 6e 6f 74 20 |: if we |did not |
|00002870| 63 68 65 63 6b 0a 77 68 | 65 74 68 65 72 20 61 20 |check.wh|ether a |
|00002880| 6e 6f 64 65 20 68 61 64 | 20 62 65 65 6e 20 67 65 |node had| been ge|
|00002890| 6e 65 72 61 74 65 64 20 | 62 65 66 6f 72 65 2c 20 |nerated |before, |
|000028a0| 74 68 65 20 73 65 61 72 | 63 68 20 70 72 6f 63 65 |the sear|ch proce|
|000028b0| 73 73 20 77 6f 75 6c 64 | 20 76 65 72 79 20 6c 69 |ss would| very li|
|000028c0| 6b 65 6c 79 0a 65 6e 64 | 20 75 70 20 69 6e 20 61 |kely.end| up in a|
|000028d0| 20 7b 5c 65 6d 20 63 79 | 63 6c 65 5c 2c 7d 2c 20 | {\em cy|cle\,}, |
|000028e0| 69 6e 20 77 68 69 63 68 | 20 74 68 65 20 73 61 6d |in which| the sam|
|000028f0| 65 20 73 65 74 20 6f 66 | 20 6e 6f 64 65 73 20 69 |e set of| nodes i|
|00002900| 73 20 67 65 6e 65 72 61 | 74 65 64 20 6f 76 65 72 |s genera|ted over|
|00002910| 20 61 6e 64 20 6f 76 65 | 72 0a 61 67 61 69 6e 2e | and ove|r.again.|
|00002920| 20 46 6f 72 20 69 6e 73 | 74 61 6e 63 65 2c 20 77 | For ins|tance, w|
|00002930| 68 65 6e 20 77 65 20 61 | 70 70 6c 79 20 6f 70 65 |hen we a|pply ope|
|00002940| 72 61 74 6f 72 20 27 6d | 6f 76 65 20 65 6d 70 74 |rator 'm|ove empt|
|00002950| 79 20 74 69 6c 65 20 6c | 65 66 74 27 2c 20 6e 65 |y tile l|eft', ne|
|00002960| 78 74 20 27 6d 6f 76 65 | 0a 65 6d 70 74 79 20 72 |xt 'move|.empty r|
|00002970| 69 67 68 74 27 20 61 6e | 64 20 6e 65 78 74 20 6d |ight' an|d next m|
|00002980| 6f 76 65 20 27 65 6d 70 | 74 79 20 74 69 6c 65 20 |ove 'emp|ty tile |
|00002990| 6c 65 66 74 27 20 65 74 | 63 2e 20 74 6f 20 74 68 |left' et|c. to th|
|000029a0| 65 20 38 2d 70 75 7a 7a | 6c 65 2c 20 74 68 65 0a |e 8-puzz|le, the.|
|000029b0| 70 72 6f 62 6c 65 6d 2d | 73 6f 6c 76 69 6e 67 20 |problem-|solving |
|000029c0| 70 72 6f 63 65 73 73 20 | 77 6f 75 6c 64 20 67 6f |process |would go|
|000029d0| 20 6f 6e 20 70 72 6f 64 | 75 63 69 6e 67 20 74 68 | on prod|ucing th|
|000029e0| 65 20 73 61 6d 65 20 6e | 6f 64 65 73 20 77 69 74 |e same n|odes wit|
|000029f0| 68 6f 75 74 20 65 6e 64 | 2e 20 57 68 65 6e 0a 77 |hout end|. When.w|
|00002a00| 65 20 6d 6f 64 69 66 79 | 20 74 68 65 20 73 65 61 |e modify| the sea|
|00002a10| 72 63 68 20 70 72 6f 63 | 65 64 75 72 65 20 61 73 |rch proc|edure as|
|00002a20| 20 64 65 73 63 72 69 62 | 65 64 20 61 62 6f 76 65 | describ|ed above|
|00002a30| 2c 20 74 68 69 73 20 73 | 69 74 75 61 74 69 6f 6e |, this s|ituation|
|00002a40| 20 77 69 6c 6c 20 6e 65 | 76 65 72 0a 61 72 69 73 | will ne|ver.aris|
|00002a50| 65 2c 20 62 65 63 61 75 | 73 65 20 77 65 20 74 72 |e, becau|se we tr|
|00002a60| 79 20 74 6f 20 6c 6f 6f | 6b 20 75 70 20 65 76 65 |y to loo|k up eve|
|00002a70| 72 79 20 6e 6f 64 65 20 | 74 68 61 74 20 69 73 20 |ry node |that is |
|00002a80| 67 65 6e 65 72 61 74 65 | 64 2c 20 62 65 66 6f 72 |generate|d, befor|
|00002a90| 65 20 69 74 20 69 73 0a | 61 64 64 65 64 20 74 6f |e it is.|added to|
|00002aa0| 20 74 68 65 20 67 72 61 | 70 68 2e 0a 0a 41 20 73 | the gra|ph...A s|
|00002ab0| 70 65 63 69 61 6c 20 6b | 69 6e 64 20 6f 66 20 67 |pecial k|ind of g|
|00002ac0| 72 61 70 68 20 69 73 20 | 74 68 65 20 7b 5c 65 6d |raph is |the {\em|
|00002ad0| 20 41 4e 44 2f 4f 52 20 | 67 72 61 70 68 5c 2c 7d | AND/OR |graph\,}|
|00002ae0| 5c 6c 61 62 65 6c 7b 61 | 6e 64 6f 72 67 72 61 70 |\label{a|ndorgrap|
|00002af0| 68 7d 20 74 68 61 74 20 | 69 73 20 75 73 65 64 20 |h} that |is used |
|00002b00| 69 6e 0a 70 72 6f 62 6c | 65 6d 2d 73 6f 6c 76 69 |in.probl|em-solvi|
|00002b10| 6e 67 20 6d 65 74 68 6f | 64 73 20 69 6e 76 6f 6c |ng metho|ds invol|
|00002b20| 76 69 6e 67 20 70 72 6f | 62 6c 65 6d 20 72 65 64 |ving pro|blem red|
|00002b30| 75 63 74 69 6f 6e 2e 20 | 49 6e 20 74 68 65 20 63 |uction. |In the c|
|00002b40| 61 73 65 20 6f 66 20 61 | 20 6e 6f 72 6d 61 6c 0a |ase of a| normal.|
|00002b50| 67 72 61 70 68 2c 20 65 | 61 63 68 20 6e 6f 64 65 |graph, e|ach node|
|00002b60| 20 72 65 70 72 65 73 65 | 6e 74 73 20 61 20 64 69 | represe|nts a di|
|00002b70| 66 66 65 72 65 6e 74 20 | 61 6c 74 65 72 6e 61 74 |fferent |alternat|
|00002b80| 69 76 65 20 73 74 61 74 | 65 20 74 6f 20 62 65 20 |ive stat|e to be |
|00002b90| 63 68 6f 73 65 6e 20 6e | 65 78 74 20 61 6e 64 0a |chosen n|ext and.|
|00002ba0| 74 68 65 20 73 65 61 72 | 63 68 20 70 72 6f 63 65 |the sear|ch proce|
|00002bb0| 73 73 20 6d 61 79 20 63 | 6f 6e 74 69 6e 75 65 20 |ss may c|ontinue |
|00002bc0| 61 6c 6f 6e 67 20 6f 6e | 65 20 6f 66 20 74 68 65 |along on|e of the|
|00002bd0| 73 65 20 6e 6f 64 65 73 | 20 61 72 62 69 74 72 61 |se nodes| arbitra|
|00002be0| 74 69 6c 79 2e 20 49 6e | 20 61 0a 70 72 6f 62 6c |tily. In| a.probl|
|00002bf0| 65 6d 2d 72 65 64 75 63 | 74 69 6f 6e 20 72 65 70 |em-reduc|tion rep|
|00002c00| 72 65 73 65 6e 74 61 74 | 69 6f 6e 2c 20 68 6f 77 |resentat|ion, how|
|00002c10| 65 76 65 72 2c 20 77 65 | 20 61 6c 73 6f 20 6e 65 |ever, we| also ne|
|00002c20| 65 64 20 74 6f 20 64 65 | 61 6c 20 77 69 74 68 20 |ed to de|al with |
|00002c30| 6f 70 65 72 61 74 6f 72 | 73 0a 74 68 61 74 20 64 |operator|s.that d|
|00002c40| 69 76 69 64 65 20 74 68 | 65 20 6f 72 69 67 69 6e |ivide th|e origin|
|00002c50| 61 6c 20 70 72 6f 62 6c | 65 6d 20 69 6e 74 6f 20 |al probl|em into |
|00002c60| 61 20 73 65 74 20 6f 66 | 20 73 75 62 2d 70 72 6f |a set of| sub-pro|
|00002c70| 62 6c 65 6d 73 20 7b 5c | 65 6d 20 65 61 63 68 5c |blems {\|em each\|
|00002c80| 2c 7d 20 6f 66 20 77 68 | 69 63 68 0a 6e 65 65 64 |,} of wh|ich.need|
|00002c90| 20 74 6f 20 62 65 20 73 | 6f 6c 76 65 64 2c 20 69 | to be s|olved, i|
|00002ca0| 6e 73 74 65 61 64 20 6f | 66 20 61 6e 79 20 6f 66 |nstead o|f any of|
|00002cb0| 20 74 68 65 6d 2e 20 46 | 6f 72 20 65 78 61 6d 70 | them. F|or examp|
|00002cc0| 6c 65 2c 20 73 75 70 70 | 6f 73 65 20 70 72 6f 62 |le, supp|ose prob|
|00002cd0| 6c 65 6d 20 41 20 63 61 | 6e 20 62 65 20 73 6f 6c |lem A ca|n be sol|
|00002ce0| 76 65 64 0a 65 69 74 68 | 65 72 20 62 79 20 73 6f |ved.eith|er by so|
|00002cf0| 6c 76 69 6e 67 20 70 72 | 6f 62 6c 65 6d 73 20 42 |lving pr|oblems B|
|00002d00| 20 61 6e 64 20 43 20 6f | 72 20 62 79 20 73 6f 6c | and C o|r by sol|
|00002d10| 76 69 6e 67 20 70 72 6f | 62 6c 65 6d 73 20 44 20 |ving pro|blems D |
|00002d20| 61 6e 64 20 45 20 6f 72 | 20 62 79 20 73 6f 6c 76 |and E or| by solv|
|00002d30| 69 6e 67 0a 70 72 6f 62 | 6c 65 6d 20 46 2e 20 54 |ing.prob|lem F. T|
|00002d40| 68 69 73 20 73 69 74 75 | 61 74 69 6f 6e 20 69 73 |his situ|ation is|
|00002d50| 20 64 65 70 69 63 74 65 | 64 20 69 6e 20 66 69 67 | depicte|d in fig|
|00002d60| 2e 7e 5c 72 65 66 7b 66 | 69 67 74 72 65 65 5f 32 |.~\ref{f|igtree_2|
|00002d70| 7d 2e 0a 5c 62 65 67 69 | 6e 7b 66 69 67 75 72 65 |}..\begi|n{figure|
|00002d80| 7d 0a 5c 62 65 67 69 6e | 7b 63 65 6e 74 65 72 7d |}.\begin|{center}|
|00002d90| 0a 5c 75 6e 69 74 6c 65 | 6e 67 74 68 3d 30 2e 37 |.\unitle|ngth=0.7|
|00002da0| 30 6d 6d 0a 5c 73 70 65 | 63 69 61 6c 7b 65 6d 3a |0mm.\spe|cial{em:|
|00002db0| 6c 69 6e 65 77 69 64 74 | 68 20 30 2e 34 70 74 7d |linewidt|h 0.4pt}|
|00002dc0| 0a 5c 6c 69 6e 65 74 68 | 69 63 6b 6e 65 73 73 7b |.\lineth|ickness{|
|00002dd0| 30 2e 34 70 74 7d 0a 5c | 62 65 67 69 6e 7b 70 69 |0.4pt}.\|begin{pi|
|00002de0| 63 74 75 72 65 7d 28 37 | 35 2e 30 30 2c 35 35 2e |cture}(7|5.00,55.|
|00002df0| 30 30 29 0a 5c 70 75 74 | 28 31 30 2e 30 30 2c 31 |00).\put|(10.00,1|
|00002e00| 30 2e 30 30 29 7b 5c 63 | 69 72 63 6c 65 7b 31 30 |0.00){\c|ircle{10|
|00002e10| 2e 30 30 7d 7d 0a 5c 70 | 75 74 28 32 35 2e 30 30 |.00}}.\p|ut(25.00|
|00002e20| 2c 31 30 2e 30 30 29 7b | 5c 63 69 72 63 6c 65 7b |,10.00){|\circle{|
|00002e30| 31 30 2e 30 30 7d 7d 0a | 5c 70 75 74 28 34 30 2e |10.00}}.|\put(40.|
|00002e40| 30 30 2c 31 30 2e 30 30 | 29 7b 5c 63 69 72 63 6c |00,10.00|){\circl|
|00002e50| 65 7b 31 30 2e 30 30 7d | 7d 0a 5c 70 75 74 28 35 |e{10.00}|}.\put(5|
|00002e60| 35 2e 30 30 2c 31 30 2e | 30 30 29 7b 5c 63 69 72 |5.00,10.|00){\cir|
|00002e70| 63 6c 65 7b 31 30 2e 30 | 30 7d 7d 0a 5c 70 75 74 |cle{10.0|0}}.\put|
|00002e80| 28 37 30 2e 30 30 2c 31 | 30 2e 30 30 29 7b 5c 63 |(70.00,1|0.00){\c|
|00002e90| 69 72 63 6c 65 7b 31 30 | 2e 30 30 7d 7d 0a 5c 70 |ircle{10|.00}}.\p|
|00002ea0| 75 74 28 34 30 2e 30 30 | 2c 35 30 2e 30 30 29 7b |ut(40.00|,50.00){|
|00002eb0| 5c 63 69 72 63 6c 65 7b | 31 30 2e 30 30 7d 7d 0a |\circle{|10.00}}.|
|00002ec0| 5c 70 75 74 28 33 36 2e | 30 30 2c 34 37 2e 30 30 |\put(36.|00,47.00|
|00002ed0| 29 7b 5c 6c 69 6e 65 28 | 2d 33 2c 2d 34 29 7b 32 |){\line(|-3,-4){2|
|00002ee0| 34 2e 30 30 7d 7d 0a 5c | 70 75 74 28 33 39 2e 30 |4.00}}.\|put(39.0|
|00002ef0| 30 2c 34 35 2e 30 30 29 | 7b 5c 6c 69 6e 65 28 30 |0,45.00)|{\line(0|
|00002f00| 2c 2d 31 29 7b 33 30 2e | 30 30 7d 7d 0a 5c 70 75 |,-1){30.|00}}.\pu|
|00002f10| 74 28 34 32 2e 30 30 2c | 34 35 2e 30 30 29 7b 5c |t(42.00,|45.00){\|
|00002f20| 6c 69 6e 65 28 32 2c 2d | 35 29 7b 31 32 2e 30 30 |line(2,-|5){12.00|
|00002f30| 7d 7d 0a 5c 70 75 74 28 | 34 30 2e 30 30 2c 35 30 |}}.\put(|40.00,50|
|00002f40| 2e 30 30 29 7b 5c 6d 61 | 6b 65 62 6f 78 28 30 2c |.00){\ma|kebox(0,|
|00002f50| 30 29 5b 63 63 5d 7b 61 | 7d 7d 0a 5c 70 75 74 28 |0)[cc]{a|}}.\put(|
|00002f60| 31 30 2e 30 30 2c 31 30 | 2e 30 30 29 7b 5c 6d 61 |10.00,10|.00){\ma|
|00002f70| 6b 65 62 6f 78 28 30 2c | 30 29 5b 63 63 5d 7b 62 |kebox(0,|0)[cc]{b|
|00002f80| 7d 7d 0a 5c 70 75 74 28 | 32 35 2e 30 30 2c 31 30 |}}.\put(|25.00,10|
|00002f90| 2e 30 30 29 7b 5c 6d 61 | 6b 65 62 6f 78 28 30 2c |.00){\ma|kebox(0,|
|00002fa0| 30 29 5b 63 63 5d 7b 63 | 7d 7d 0a 5c 70 75 74 28 |0)[cc]{c|}}.\put(|
|00002fb0| 34 30 2e 30 30 2c 31 30 | 2e 30 30 29 7b 5c 6d 61 |40.00,10|.00){\ma|
|00002fc0| 6b 65 62 6f 78 28 30 2c | 30 29 5b 63 63 5d 7b 64 |kebox(0,|0)[cc]{d|
|00002fd0| 7d 7d 0a 5c 70 75 74 28 | 35 35 2e 30 30 2c 31 30 |}}.\put(|55.00,10|
|00002fe0| 2e 30 30 29 7b 5c 6d 61 | 6b 65 62 6f 78 28 30 2c |.00){\ma|kebox(0,|
|00002ff0| 30 29 5b 63 63 5d 7b 65 | 7d 7d 0a 5c 70 75 74 28 |0)[cc]{e|}}.\put(|
|00003000| 37 30 2e 30 30 2c 31 30 | 2e 30 30 29 7b 5c 6d 61 |70.00,10|.00){\ma|
|00003010| 6b 65 62 6f 78 28 30 2c | 30 29 5b 63 63 5d 7b 66 |kebox(0,|0)[cc]{f|
|00003020| 7d 7d 0a 5c 70 75 74 28 | 34 30 2e 30 30 2c 33 33 |}}.\put(|40.00,33|
|00003030| 2e 30 30 29 7b 5c 6c 69 | 6e 65 28 36 2c 31 29 7b |.00){\li|ne(6,1){|
|00003040| 36 2e 30 30 7d 7d 0a 5c | 70 75 74 28 33 37 2e 30 |6.00}}.\|put(37.0|
|00003050| 30 2c 34 35 2e 30 30 29 | 7b 5c 6c 69 6e 65 28 2d |0,45.00)|{\line(-|
|00003060| 31 2c 2d 33 29 7b 31 30 | 2e 30 30 7d 7d 0a 5c 70 |1,-3){10|.00}}.\p|
|00003070| 75 74 28 34 34 2e 30 30 | 2c 34 37 2e 30 30 29 7b |ut(44.00|,47.00){|
|00003080| 5c 6c 69 6e 65 28 34 2c | 2d 35 29 7b 32 35 2e 36 |\line(4,|-5){25.6|
|00003090| 37 7d 7d 0a 5c 70 75 74 | 28 32 36 2e 30 30 2c 33 |7}}.\put|(26.00,3|
|000030a0| 35 2e 30 30 29 7b 5c 6c | 69 6e 65 28 36 2c 2d 35 |5.00){\l|ine(6,-5|
|000030b0| 29 7b 37 2e 30 30 7d 7d | 0a 5c 65 6e 64 7b 70 69 |){7.00}}|.\end{pi|
|000030c0| 63 74 75 72 65 7d 0a 20 | 20 20 20 5c 63 61 70 74 |cture}. | \capt|
|000030d0| 69 6f 6e 7b 41 20 73 74 | 72 75 63 74 75 72 65 20 |ion{A st|ructure |
|000030e0| 73 68 6f 77 69 6e 67 20 | 61 6c 74 65 72 6e 61 74 |showing |alternat|
|000030f0| 69 76 65 20 73 65 74 73 | 20 6f 66 20 73 75 62 70 |ive sets| of subp|
|00003100| 72 6f 62 6c 65 6d 73 20 | 66 6f 72 20 41 2e 7d 5c |roblems |for A.}\|
|00003110| 6c 61 62 65 6c 7b 66 69 | 67 74 72 65 65 5f 32 7d |label{fi|gtree_2}|
|00003120| 0a 5c 65 6e 64 7b 63 65 | 6e 74 65 72 7d 0a 5c 65 |.\end{ce|nter}.\e|
|00003130| 6e 64 7b 66 69 67 75 72 | 65 7d 0a 49 6e 20 66 69 |nd{figur|e}.In fi|
|00003140| 67 2e 7e 5c 72 65 66 7b | 66 69 67 74 72 65 65 5f |g.~\ref{|figtree_|
|00003150| 32 7d 20 74 68 65 20 6e | 6f 64 65 73 20 77 68 69 |2} the n|odes whi|
|00003160| 63 68 20 66 6f 72 6d 20 | 61 20 73 65 74 20 74 68 |ch form |a set th|
|00003170| 61 74 20 68 61 73 20 74 | 6f 20 62 65 20 73 6f 6c |at has t|o be sol|
|00003180| 76 65 64 0a 65 6e 74 69 | 72 65 6c 79 20 61 72 65 |ved.enti|rely are|
|00003190| 20 69 6e 64 69 63 61 74 | 65 64 20 62 79 20 61 20 | indicat|ed by a |
|000031a0| 73 70 65 63 69 61 6c 20 | 6d 61 72 6b 20 6c 69 6e |special |mark lin|
|000031b0| 6b 69 6e 67 20 74 68 65 | 69 72 20 69 6e 63 6f 6d |king the|ir incom|
|000031c0| 69 6e 67 20 61 72 63 73 | 2e 20 49 74 20 69 73 0a |ing arcs|. It is.|
|000031d0| 75 73 75 61 6c 2c 20 68 | 6f 77 65 76 65 72 2c 20 |usual, h|owever, |
|000031e0| 74 6f 20 69 6e 74 72 6f | 64 75 63 65 20 73 6f 6d |to intro|duce som|
|000031f0| 65 20 65 78 74 72 61 20 | 6e 6f 64 65 73 20 69 6e |e extra |nodes in|
|00003200| 74 6f 20 74 68 65 20 73 | 74 72 75 63 74 75 72 65 |to the s|tructure|
|00003210| 20 73 6f 20 74 68 61 74 | 20 65 61 63 68 0a 73 65 | so that| each.se|
|00003220| 74 20 63 6f 6e 74 61 69 | 6e 69 6e 67 20 6d 6f 72 |t contai|ning mor|
|00003230| 65 20 74 68 61 6e 20 6f | 6e 65 20 73 75 63 63 65 |e than o|ne succe|
|00003240| 73 73 6f 72 20 70 72 6f | 62 6c 65 6d 20 69 73 20 |ssor pro|blem is |
|00003250| 67 72 6f 75 70 65 64 20 | 62 65 6c 6f 77 20 69 74 |grouped |below it|
|00003260| 73 20 6f 77 6e 0a 70 61 | 72 65 6e 74 20 6e 6f 64 |s own.pa|rent nod|
|00003270| 65 2e 20 57 69 74 68 20 | 74 68 69 73 20 63 6f 6e |e. With |this con|
|00003280| 76 65 6e 74 69 6f 6e 20 | 74 68 65 20 73 74 72 75 |vention |the stru|
|00003290| 63 74 75 72 65 20 6f 66 | 20 66 69 67 2e 7e 5c 72 |cture of| fig.~\r|
|000032a0| 65 66 7b 66 69 67 74 72 | 65 65 5f 32 7d 0a 62 65 |ef{figtr|ee_2}.be|
|000032b0| 63 6f 6d 65 73 20 61 73 | 20 73 68 6f 77 6e 20 69 |comes as| shown i|
|000032c0| 6e 20 66 69 67 2e 7e 5c | 72 65 66 7b 66 69 67 74 |n fig.~\|ref{figt|
|000032d0| 72 65 65 5f 33 7d 2e 20 | 49 6e 20 74 68 69 73 20 |ree_3}. |In this |
|000032e0| 66 69 67 75 72 65 20 74 | 68 65 20 61 64 64 65 64 |figure t|he added|
|000032f0| 20 6e 6f 64 65 73 0a 6c | 61 62 65 6c 6c 65 64 20 | nodes.l|abelled |
|00003300| 4e 20 61 6e 64 20 4d 20 | 73 65 72 76 65 20 61 73 |N and M |serve as|
|00003310| 20 65 78 63 6c 75 73 69 | 76 65 20 70 61 72 65 6e | exclusi|ve paren|
|00003320| 74 73 20 66 6f 72 20 73 | 65 74 73 20 5c 7b 42 2c |ts for s|ets \{B,|
|00003330| 43 5c 7d 20 61 6e 64 20 | 5c 7b 44 2c 45 5c 7d 2c |C\} and |\{D,E\},|
|00003340| 20 72 65 73 70 65 63 74 | 69 76 65 6c 79 2e 0a 54 | respect|ively..T|
|00003350| 68 69 73 20 77 61 79 20 | 6f 6e 65 20 63 61 6e 20 |his way |one can |
|00003360| 74 68 69 6e 6b 20 6f 66 | 20 4e 20 61 6e 64 20 4d |think of| N and M|
|00003370| 20 61 6e 64 20 46 20 61 | 73 20 7b 5c 65 6d 20 4f | and F a|s {\em O|
|00003380| 52 5c 2c 7d 20 6e 6f 64 | 65 73 2c 20 62 65 63 61 |R\,} nod|es, beca|
|00003390| 75 73 65 20 61 6e 79 20 | 6f 66 20 74 68 65 6d 0a |use any |of them.|
|000033a0| 6d 61 79 20 62 65 20 73 | 6f 6c 76 65 64 20 74 6f |may be s|olved to|
|000033b0| 20 73 6f 6c 76 65 20 6e | 6f 64 65 20 41 2e 20 50 | solve n|ode A. P|
|000033c0| 72 6f 62 6c 65 6d 20 4e | 2c 20 68 6f 77 65 76 65 |roblem N|, howeve|
|000033d0| 72 2c 20 69 73 20 72 65 | 64 75 63 65 64 20 74 6f |r, is re|duced to|
|000033e0| 20 61 20 73 69 6e 67 6c | 65 0a 73 65 74 20 6f 66 | a singl|e.set of|
|000033f0| 20 73 75 62 2d 70 72 6f | 62 6c 65 6d 73 20 42 20 | sub-pro|blems B |
|00003400| 61 6e 64 20 43 2c 20 61 | 6e 64 20 7b 5c 65 6d 20 |and C, a|nd {\em |
|00003410| 65 61 63 68 5c 2c 7d 20 | 6f 66 20 74 68 65 73 65 |each\,} |of these|
|00003420| 20 73 75 62 2d 70 72 6f | 62 6c 65 6d 73 20 6d 75 | sub-pro|blems mu|
|00003430| 73 74 0a 62 65 20 73 6f | 6c 76 65 64 20 74 6f 20 |st.be so|lved to |
|00003440| 73 6f 6c 76 65 20 4e 2e | 20 46 6f 72 20 74 68 69 |solve N.| For thi|
|00003450| 73 20 72 65 61 73 6f 6e | 20 6e 6f 64 65 73 20 42 |s reason| nodes B|
|00003460| 2c 20 43 2c 20 44 20 61 | 6e 64 20 45 20 61 72 65 |, C, D a|nd E are|
|00003470| 20 63 61 6c 6c 65 64 20 | 7b 5c 65 6d 20 41 4e 44 | called |{\em AND|
|00003480| 5c 2c 7d 0a 6e 6f 64 65 | 73 2e 20 49 6e 20 66 69 |\,}.node|s. In fi|
|00003490| 67 2e 7e 5c 72 65 66 7b | 66 69 67 74 72 65 65 5f |g.~\ref{|figtree_|
|000034a0| 33 7d 20 41 4e 44 20 6e | 6f 64 65 73 20 61 72 65 |3} AND n|odes are|
|000034b0| 20 69 6e 64 69 63 61 74 | 65 64 20 62 79 20 61 20 | indicat|ed by a |
|000034c0| 6d 61 72 6b 20 6f 6e 20 | 74 68 65 69 72 0a 69 6e |mark on |their.in|
|000034d0| 63 6f 6d 69 6e 67 20 61 | 72 63 73 2e 0a 5c 62 65 |coming a|rcs..\be|
|000034e0| 67 69 6e 7b 66 69 67 75 | 72 65 7d 0a 5c 62 65 67 |gin{figu|re}.\beg|
|000034f0| 69 6e 7b 63 65 6e 74 65 | 72 7d 0a 5c 75 6e 69 74 |in{cente|r}.\unit|
|00003500| 6c 65 6e 67 74 68 3d 30 | 2e 37 30 6d 6d 0a 5c 73 |length=0|.70mm.\s|
|00003510| 70 65 63 69 61 6c 7b 65 | 6d 3a 6c 69 6e 65 77 69 |pecial{e|m:linewi|
|00003520| 64 74 68 20 30 2e 34 70 | 74 7d 0a 5c 6c 69 6e 65 |dth 0.4p|t}.\line|
|00003530| 74 68 69 63 6b 6e 65 73 | 73 7b 30 2e 34 70 74 7d |thicknes|s{0.4pt}|
|00003540| 0a 5c 62 65 67 69 6e 7b | 70 69 63 74 75 72 65 7d |.\begin{|picture}|
|00003550| 28 38 30 2e 30 30 2c 36 | 35 2e 30 30 29 0a 5c 70 |(80.00,6|5.00).\p|
|00003560| 75 74 28 31 30 2e 30 30 | 2c 31 30 2e 30 30 29 7b |ut(10.00|,10.00){|
|00003570| 5c 63 69 72 63 6c 65 7b | 31 30 2e 30 30 7d 7d 0a |\circle{|10.00}}.|
|00003580| 5c 70 75 74 28 32 35 2e | 30 30 2c 31 30 2e 30 30 |\put(25.|00,10.00|
|00003590| 29 7b 5c 63 69 72 63 6c | 65 7b 31 30 2e 30 30 7d |){\circl|e{10.00}|
|000035a0| 7d 0a 5c 70 75 74 28 34 | 30 2e 30 30 2c 31 30 2e |}.\put(4|0.00,10.|
|000035b0| 30 30 29 7b 5c 63 69 72 | 63 6c 65 7b 31 30 2e 30 |00){\cir|cle{10.0|
|000035c0| 30 7d 7d 0a 5c 70 75 74 | 28 35 35 2e 30 30 2c 31 |0}}.\put|(55.00,1|
|000035d0| 30 2e 30 30 29 7b 5c 63 | 69 72 63 6c 65 7b 31 30 |0.00){\c|ircle{10|
|000035e0| 2e 30 30 7d 7d 0a 5c 70 | 75 74 28 31 38 2e 30 30 |.00}}.\p|ut(18.00|
|000035f0| 2c 33 30 2e 30 30 29 7b | 5c 63 69 72 63 6c 65 7b |,30.00){|\circle{|
|00003600| 31 30 2e 30 30 7d 7d 0a | 5c 70 75 74 28 34 38 2e |10.00}}.|\put(48.|
|00003610| 30 30 2c 33 30 2e 30 30 | 29 7b 5c 63 69 72 63 6c |00,30.00|){\circl|
|00003620| 65 7b 31 30 2e 30 30 7d | 7d 0a 5c 70 75 74 28 37 |e{10.00}|}.\put(7|
|00003630| 35 2e 30 30 2c 33 30 2e | 30 30 29 7b 5c 63 69 72 |5.00,30.|00){\cir|
|00003640| 63 6c 65 7b 31 30 2e 30 | 30 7d 7d 0a 5c 70 75 74 |cle{10.0|0}}.\put|
|00003650| 28 34 38 2e 30 30 2c 36 | 30 2e 30 30 29 7b 5c 63 |(48.00,6|0.00){\c|
|00003660| 69 72 63 6c 65 7b 31 30 | 2e 30 30 7d 7d 0a 5c 70 |ircle{10|.00}}.\p|
|00003670| 75 74 28 34 38 2e 30 30 | 2c 35 35 2e 30 30 29 7b |ut(48.00|,55.00){|
|00003680| 5c 6c 69 6e 65 28 30 2c | 2d 31 29 7b 31 39 2e 30 |\line(0,|-1){19.0|
|00003690| 30 7d 7d 0a 5c 70 75 74 | 28 31 30 2e 30 30 2c 31 |0}}.\put|(10.00,1|
|000036a0| 30 2e 30 30 29 7b 5c 6d | 61 6b 65 62 6f 78 28 30 |0.00){\m|akebox(0|
|000036b0| 2c 30 29 5b 63 63 5d 7b | 62 7d 7d 0a 5c 70 75 74 |,0)[cc]{|b}}.\put|
|000036c0| 28 32 35 2e 30 30 2c 31 | 30 2e 30 30 29 7b 5c 6d |(25.00,1|0.00){\m|
|000036d0| 61 6b 65 62 6f 78 28 30 | 2c 30 29 5b 63 63 5d 7b |akebox(0|,0)[cc]{|
|000036e0| 63 7d 7d 0a 5c 70 75 74 | 28 34 30 2e 30 30 2c 31 |c}}.\put|(40.00,1|
|000036f0| 30 2e 30 30 29 7b 5c 6d | 61 6b 65 62 6f 78 28 30 |0.00){\m|akebox(0|
|00003700| 2c 30 29 5b 63 63 5d 7b | 64 7d 7d 0a 5c 70 75 74 |,0)[cc]{|d}}.\put|
|00003710| 28 35 35 2e 30 30 2c 31 | 30 2e 30 30 29 7b 5c 6d |(55.00,1|0.00){\m|
|00003720| 61 6b 65 62 6f 78 28 30 | 2c 30 29 5b 63 63 5d 7b |akebox(0|,0)[cc]{|
|00003730| 65 7d 7d 0a 5c 70 75 74 | 28 31 35 2e 30 30 2c 32 |e}}.\put|(15.00,2|
|00003740| 35 2e 30 30 29 7b 5c 6c | 69 6e 65 28 2d 31 2c 2d |5.00){\l|ine(-1,-|
|00003750| 32 29 7b 35 2e 30 30 7d | 7d 0a 5c 70 75 74 28 32 |2){5.00}|}.\put(2|
|00003760| 30 2e 30 30 2c 32 35 2e | 30 30 29 7b 5c 6c 69 6e |0.00,25.|00){\lin|
|00003770| 65 28 31 2c 2d 32 29 7b | 35 2e 30 30 7d 7d 0a 5c |e(1,-2){|5.00}}.\|
|00003780| 70 75 74 28 35 30 2e 30 | 30 2c 32 35 2e 30 30 29 |put(50.0|0,25.00)|
|00003790| 7b 5c 72 75 6c 65 7b 31 | 2e 30 30 5c 75 6e 69 74 |{\rule{1|.00\unit|
|000037a0| 6c 65 6e 67 74 68 7d 7b | 30 2e 30 30 5c 75 6e 69 |length}{|0.00\uni|
|000037b0| 74 6c 65 6e 67 74 68 7d | 7d 0a 5c 70 75 74 28 34 |tlength}|}.\put(4|
|000037c0| 35 2e 30 30 2c 32 35 2e | 30 30 29 7b 5c 6c 69 6e |5.00,25.|00){\lin|
|000037d0| 65 28 2d 31 2c 2d 32 29 | 7b 35 2e 30 30 7d 7d 0a |e(-1,-2)|{5.00}}.|
|000037e0| 5c 70 75 74 28 35 30 2e | 30 30 2c 32 35 2e 30 30 |\put(50.|00,25.00|
|000037f0| 29 7b 5c 6c 69 6e 65 28 | 31 2c 2d 32 29 7b 35 2e |){\line(|1,-2){5.|
|00003800| 30 30 7d 7d 0a 5c 70 75 | 74 28 34 35 2e 30 30 2c |00}}.\pu|t(45.00,|
|00003810| 35 36 2e 30 30 29 7b 5c | 6c 69 6e 65 28 2d 36 2c |56.00){\|line(-6,|
|00003820| 2d 35 29 7b 32 35 2e 30 | 30 7d 7d 0a 5c 70 75 74 |-5){25.0|0}}.\put|
|00003830| 28 35 31 2e 30 30 2c 35 | 35 2e 30 30 29 7b 5c 6c |(51.00,5|5.00){\l|
|00003840| 69 6e 65 28 36 2c 2d 35 | 29 7b 32 34 2e 30 30 7d |ine(6,-5|){24.00}|
|00003850| 7d 0a 5c 70 75 74 28 34 | 38 2e 30 30 2c 36 30 2e |}.\put(4|8.00,60.|
|00003860| 30 30 29 7b 5c 6d 61 6b | 65 62 6f 78 28 30 2c 30 |00){\mak|ebox(0,0|
|00003870| 29 5b 63 63 5d 7b 61 7d | 7d 0a 5c 70 75 74 28 31 |)[cc]{a}|}.\put(1|
|00003880| 38 2e 30 30 2c 33 30 2e | 30 30 29 7b 5c 6d 61 6b |8.00,30.|00){\mak|
|00003890| 65 62 6f 78 28 30 2c 30 | 29 5b 63 63 5d 7b 6e 7d |ebox(0,0|)[cc]{n}|
|000038a0| 7d 0a 5c 70 75 74 28 34 | 38 2e 30 30 2c 33 30 2e |}.\put(4|8.00,30.|
|000038b0| 30 30 29 7b 5c 6d 61 6b | 65 62 6f 78 28 30 2c 30 |00){\mak|ebox(0,0|
|000038c0| 29 5b 63 63 5d 7b 6d 7d | 7d 0a 5c 70 75 74 28 37 |)[cc]{m}|}.\put(7|
|000038d0| 35 2e 30 30 2c 33 30 2e | 30 30 29 7b 5c 6d 61 6b |5.00,30.|00){\mak|
|000038e0| 65 62 6f 78 28 30 2c 30 | 29 5b 63 63 5d 7b 66 7d |ebox(0,0|)[cc]{f}|
|000038f0| 7d 0a 5c 70 75 74 28 31 | 33 2e 30 30 2c 32 31 2e |}.\put(1|3.00,21.|
|00003900| 30 30 29 7b 5c 6c 69 6e | 65 28 31 2c 30 29 7b 39 |00){\lin|e(1,0){9|
|00003910| 2e 30 30 7d 7d 0a 5c 70 | 75 74 28 34 33 2e 30 30 |.00}}.\p|ut(43.00|
|00003920| 2c 32 31 2e 30 30 29 7b | 5c 6c 69 6e 65 28 31 2c |,21.00){|\line(1,|
|00003930| 30 29 7b 31 30 2e 30 30 | 7d 7d 0a 5c 65 6e 64 7b |0){10.00|}}.\end{|
|00003940| 70 69 63 74 75 72 65 7d | 0a 20 20 20 20 5c 63 61 |picture}|. \ca|
|00003950| 70 74 69 6f 6e 7b 41 6e | 20 41 4e 44 2f 4f 52 20 |ption{An| AND/OR |
|00003960| 67 72 61 70 68 7d 5c 6c | 61 62 65 6c 7b 66 69 67 |graph}\l|abel{fig|
|00003970| 74 72 65 65 5f 33 7d 0a | 5c 65 6e 64 7b 63 65 6e |tree_3}.|\end{cen|
|00003980| 74 65 72 7d 0a 5c 65 6e | 64 7b 66 69 67 75 72 65 |ter}.\en|d{figure|
|00003990| 7d 0a 0a 5c 73 75 62 73 | 65 63 74 69 6f 6e 7b 42 |}..\subs|ection{B|
|000039a0| 61 73 69 63 20 73 65 61 | 72 63 68 20 6d 65 74 68 |asic sea|rch meth|
|000039b0| 6f 64 73 20 2d 20 64 65 | 70 74 68 2d 66 69 72 73 |ods - de|pth-firs|
|000039c0| 74 2c 20 62 72 65 61 64 | 74 68 2d 66 69 72 73 74 |t, bread|th-first|
|000039d0| 7d 0a 0a 49 6e 20 73 65 | 63 74 69 6f 6e 20 32 20 |}..In se|ction 2 |
|000039e0| 77 65 20 64 65 73 63 72 | 69 62 65 64 20 74 68 65 |we descr|ibed the|
|000039f0| 20 70 72 6f 63 65 73 73 | 20 6f 66 20 67 65 6e 65 | process| of gene|
|00003a00| 72 61 74 69 6e 67 20 61 | 20 73 65 61 72 63 68 20 |rating a| search |
|00003a10| 74 72 65 65 2c 20 69 6e | 20 74 68 69 73 0a 73 65 |tree, in| this.se|
|00003a20| 63 74 69 6f 6e 20 77 65 | 20 77 69 6c 6c 20 67 69 |ction we| will gi|
|00003a30| 76 65 20 61 20 6d 6f 72 | 65 20 70 72 65 63 69 73 |ve a mor|e precis|
|00003a40| 65 20 64 65 73 63 72 69 | 70 74 69 6f 6e 20 6f 66 |e descri|ption of|
|00003a50| 20 74 68 69 73 20 70 72 | 6f 63 65 73 73 2e 0a 5c | this pr|ocess..\|
|00003a60| 62 65 67 69 6e 7b 69 74 | 65 6d 69 7a 65 7d 0a 20 |begin{it|emize}. |
|00003a70| 20 20 20 5c 69 74 65 6d | 20 41 20 73 74 61 72 74 | \item| A start|
|00003a80| 20 6e 6f 64 65 20 69 73 | 20 61 73 73 6f 63 69 61 | node is| associa|
|00003a90| 74 65 64 20 77 69 74 68 | 20 74 68 65 20 69 6e 69 |ted with| the ini|
|00003aa0| 74 69 61 6c 20 73 74 61 | 74 65 20 64 65 73 63 72 |tial sta|te descr|
|00003ab0| 69 70 74 69 6f 6e 2e 0a | 0a 20 20 20 20 5c 69 74 |iption..|. \it|
|00003ac0| 65 6d 20 54 68 65 20 73 | 75 63 63 65 73 73 6f 72 |em The s|uccessor|
|00003ad0| 73 20 6f 66 20 61 20 6e | 6f 64 65 20 61 72 65 20 |s of a n|ode are |
|00003ae0| 67 65 6e 65 72 61 74 65 | 64 20 62 79 20 61 70 70 |generate|d by app|
|00003af0| 6c 79 69 6e 67 20 61 6c | 6c 20 6f 66 20 74 68 65 |lying al|l of the|
|00003b00| 0a 20 20 20 20 61 70 70 | 6c 69 63 61 62 6c 65 20 |. app|licable |
|00003b10| 6f 70 65 72 61 74 6f 72 | 73 20 74 6f 20 74 68 65 |operator|s to the|
|00003b20| 20 73 74 61 74 65 20 64 | 65 73 63 72 69 70 74 69 | state d|escripti|
|00003b30| 6f 6e 20 61 73 73 6f 63 | 69 61 74 65 64 20 77 69 |on assoc|iated wi|
|00003b40| 74 68 20 74 68 65 20 6e | 6f 64 65 2e 0a 20 20 20 |th the n|ode.. |
|00003b50| 20 57 65 20 77 69 6c 6c | 20 63 61 6c 6c 20 74 68 | We will| call th|
|00003b60| 69 73 20 70 72 6f 63 65 | 64 75 72 65 20 74 68 65 |is proce|dure the|
|00003b70| 20 7b 5c 65 6d 20 65 78 | 70 61 6e 73 69 6f 6e 5c | {\em ex|pansion\|
|00003b80| 2c 7d 20 6f 66 20 61 20 | 6e 6f 64 65 2e 0a 0a 20 |,} of a |node... |
|00003b90| 20 20 20 5c 69 74 65 6d | 20 50 6f 69 6e 74 65 72 | \item| Pointer|
|00003ba0| 73 20 61 72 65 20 73 65 | 74 75 70 20 66 72 6f 6d |s are se|tup from|
|00003bb0| 20 65 61 63 68 20 73 75 | 63 63 65 73 73 6f 72 20 | each su|ccessor |
|00003bc0| 62 61 63 6b 20 74 6f 20 | 69 74 73 20 70 61 72 65 |back to |its pare|
|00003bd0| 6e 74 20 6e 6f 64 65 2e | 0a 20 20 20 20 54 68 65 |nt node.|. The|
|00003be0| 73 65 20 70 6f 69 6e 74 | 65 72 73 20 69 6e 64 69 |se point|ers indi|
|00003bf0| 63 61 74 65 20 74 68 65 | 20 73 6f 6c 75 74 69 6f |cate the| solutio|
|00003c00| 6e 20 70 61 74 68 20 69 | 6e 20 74 68 65 20 67 61 |n path i|n the ga|
|00003c10| 6d 65 20 74 72 65 65 2c | 20 6c 65 61 64 69 6e 67 |me tree,| leading|
|00003c20| 20 66 72 6f 6d 0a 20 20 | 20 20 74 68 65 20 67 6f | from. | the go|
|00003c30| 61 6c 20 6e 6f 64 65 2c | 20 6f 6e 63 65 20 69 74 |al node,| once it|
|00003c40| 20 69 73 20 66 69 6e 61 | 6c 6c 79 20 66 6f 75 6e | is fina|lly foun|
|00003c50| 64 2c 20 62 61 63 6b 20 | 74 6f 20 74 68 65 20 73 |d, back |to the s|
|00003c60| 74 61 72 74 2e 0a 0a 20 | 20 20 20 5c 69 74 65 6d |tart... | \item|
|00003c70| 20 45 76 65 72 79 20 73 | 75 63 63 65 73 73 6f 72 | Every s|uccessor|
|00003c80| 20 6e 6f 64 65 20 69 73 | 20 63 68 65 63 6b 65 64 | node is| checked|
|00003c90| 20 74 6f 20 73 65 65 20 | 69 66 20 69 74 20 69 73 | to see |if it is|
|00003ca0| 20 61 20 67 6f 61 6c 20 | 6e 6f 64 65 2e 20 57 68 | a goal |node. Wh|
|00003cb0| 65 6e 20 61 0a 20 20 20 | 20 67 6f 61 6c 20 6e 6f |en a. | goal no|
|00003cc0| 64 65 20 68 61 73 20 62 | 65 65 6e 20 66 6f 75 6e |de has b|een foun|
|00003cd0| 64 20 74 68 65 20 70 72 | 6f 63 65 73 73 20 6f 66 |d the pr|ocess of|
|00003ce0| 20 65 78 70 61 6e 64 69 | 6e 67 20 6e 6f 64 65 73 | expandi|ng nodes|
|00003cf0| 20 66 69 6e 69 73 68 65 | 73 20 61 6e 64 20 77 65 | finishe|s and we|
|00003d00| 20 74 72 61 63 65 0a 20 | 20 20 20 62 61 63 6b 20 | trace. | back |
|00003d10| 74 68 65 20 73 6f 6c 75 | 74 69 6f 6e 20 70 61 74 |the solu|tion pat|
|00003d20| 68 20 74 68 72 6f 75 67 | 68 20 74 68 65 20 70 6f |h throug|h the po|
|00003d30| 69 6e 74 65 72 73 2e 0a | 5c 65 6e 64 7b 69 74 65 |inters..|\end{ite|
|00003d40| 6d 69 7a 65 7d 0a 0a 5c | 62 69 67 73 6b 69 70 5c |mize}..\|bigskip\|
|00003d50| 6e 6f 69 6e 64 65 6e 74 | 0a 54 68 65 73 65 20 61 |noindent|.These a|
|00003d60| 72 65 20 74 68 65 20 62 | 61 73 69 63 20 65 6c 65 |re the b|asic ele|
|00003d70| 6d 65 6e 74 73 20 6f 66 | 20 61 20 70 72 6f 62 6c |ments of| a probl|
|00003d80| 65 6d 2d 73 6f 6c 76 69 | 6e 67 20 70 72 6f 63 65 |em-solvi|ng proce|
|00003d90| 73 73 2c 20 62 75 74 20 | 74 68 65 20 6f 72 64 65 |ss, but |the orde|
|00003da0| 72 20 69 6e 0a 77 68 69 | 63 68 20 6e 6f 64 65 73 |r in.whi|ch nodes|
|00003db0| 20 61 72 65 20 74 6f 20 | 62 65 20 65 78 70 61 6e | are to |be expan|
|00003dc0| 64 65 64 20 69 73 20 73 | 74 69 6c 6c 20 6c 65 66 |ded is s|till lef|
|00003dd0| 74 20 6f 70 65 6e 2e 20 | 57 65 20 6d 61 79 20 63 |t open. |We may c|
|00003de0| 68 6f 6f 73 65 2c 20 66 | 6f 72 20 69 6e 73 74 61 |hoose, f|or insta|
|00003df0| 6e 63 65 2c 0a 74 6f 20 | 73 65 61 72 63 68 20 6f |nce,.to |search o|
|00003e00| 6e 65 20 65 6e 74 69 72 | 65 20 62 72 61 6e 63 68 |ne entir|e branch|
|00003e10| 20 6f 66 20 74 68 65 20 | 74 72 65 65 20 62 65 66 | of the |tree bef|
|00003e20| 6f 72 65 20 65 78 61 6d | 69 6e 69 6e 67 20 6e 6f |ore exam|ining no|
|00003e30| 64 65 73 20 69 6e 20 74 | 68 65 20 6f 74 68 65 72 |des in t|he other|
|00003e40| 0a 62 72 61 6e 63 68 65 | 73 2e 20 41 6c 74 65 72 |.branche|s. Alter|
|00003e50| 6e 61 74 69 76 65 6c 79 | 2c 20 77 65 20 6d 61 79 |natively|, we may|
|00003e60| 20 64 65 63 69 64 65 20 | 74 6f 20 65 78 70 61 6e | decide |to expan|
|00003e70| 64 20 61 6c 6c 20 6e 6f | 64 65 73 20 74 68 61 74 |d all no|des that|
|00003e80| 20 61 72 65 20 6f 6e 20 | 74 68 65 0a 73 61 6d 65 | are on |the.same|
|00003e90| 20 6c 65 76 65 6c 2c 20 | 69 6e 20 64 69 66 66 65 | level, |in diffe|
|00003ea0| 72 65 6e 74 20 62 72 61 | 6e 63 68 65 73 2e 20 54 |rent bra|nches. T|
|00003eb0| 68 65 20 66 69 72 73 74 | 20 6f 70 74 69 6f 6e 20 |he first| option |
|00003ec0| 77 6f 75 6c 64 20 72 65 | 73 75 6c 74 20 69 6e 20 |would re|sult in |
|00003ed0| 77 68 61 74 20 69 73 0a | 63 61 6c 6c 65 64 20 61 |what is.|called a|
|00003ee0| 20 7b 5c 65 6d 20 64 65 | 70 74 68 2d 66 69 72 73 | {\em de|pth-firs|
|00003ef0| 74 5c 2c 7d 20 73 65 61 | 72 63 68 3a 20 74 68 65 |t\,} sea|rch: the|
|00003f00| 20 6d 6f 73 74 20 72 65 | 63 65 6e 74 6c 79 20 67 | most re|cently g|
|00003f10| 65 6e 65 72 61 74 65 64 | 20 6e 6f 64 65 20 67 65 |enerated| node ge|
|00003f20| 74 73 0a 65 78 70 61 6e | 64 65 64 20 66 69 72 73 |ts.expan|ded firs|
|00003f30| 74 2e 20 49 6e 20 61 20 | 7b 5c 65 6d 20 62 72 65 |t. In a |{\em bre|
|00003f40| 61 64 74 68 2d 66 69 72 | 73 74 5c 2c 7d 20 73 65 |adth-fir|st\,} se|
|00003f50| 61 72 63 68 2c 20 74 68 | 65 20 73 65 63 6f 6e 64 |arch, th|e second|
|00003f60| 20 6f 70 74 69 6f 6e 2c | 20 6e 6f 64 65 73 20 61 | option,| nodes a|
|00003f70| 72 65 0a 65 78 70 61 6e | 64 65 64 20 69 6e 20 74 |re.expan|ded in t|
|00003f80| 68 65 20 6f 72 64 65 72 | 20 69 6e 20 77 68 69 63 |he order| in whic|
|00003f90| 68 20 74 68 65 79 20 61 | 72 65 20 67 65 6e 65 72 |h they a|re gener|
|00003fa0| 61 74 65 64 2e 0a 0a 5c | 73 75 62 73 65 63 74 69 |ated...\|subsecti|
|00003fb0| 6f 6e 7b 46 69 6e 64 69 | 6e 67 20 61 6e 20 6f 70 |on{Findi|ng an op|
|00003fc0| 74 69 6d 61 6c 20 73 6f | 6c 75 74 69 6f 6e 2c 20 |timal so|lution, |
|00003fd0| 75 6e 69 66 6f 72 6d 2d | 63 6f 73 74 20 73 65 61 |uniform-|cost sea|
|00003fe0| 72 63 68 7d 0a 0a 49 74 | 20 73 68 6f 75 6c 64 20 |rch}..It| should |
|00003ff0| 62 65 20 6e 6f 74 65 64 | 20 74 68 61 74 20 66 6f |be noted| that fo|
|00004000| 72 20 73 6f 6d 65 20 70 | 72 6f 62 6c 65 6d 73 20 |r some p|roblems |
|00004010| 77 65 20 61 72 65 20 6e | 6f 74 20 69 6e 74 65 72 |we are n|ot inter|
|00004020| 65 73 74 65 64 20 69 6e | 20 66 69 6e 64 69 6e 67 |ested in| finding|
|00004030| 0a 7b 5c 65 6d 20 61 6e | 79 5c 2c 7d 20 73 6f 6c |.{\em an|y\,} sol|
|00004040| 75 74 69 6f 6e 2c 20 62 | 75 74 20 72 61 74 68 65 |ution, b|ut rathe|
|00004050| 72 20 74 68 65 20 7b 5c | 65 6d 20 6f 70 74 69 6d |r the {\|em optim|
|00004060| 61 6c 5c 2c 7d 20 6f 72 | 20 7b 5c 65 6d 20 62 65 |al\,} or| {\em be|
|00004070| 73 74 5c 2c 7d 20 6f 6e | 65 2e 20 57 68 61 74 0a |st\,} on|e. What.|
|00004080| 27 62 65 73 74 27 20 6d | 65 61 6e 73 20 64 65 70 |'best' m|eans dep|
|00004090| 65 6e 64 73 20 6f 6e 20 | 74 68 65 20 70 72 6f 62 |ends on |the prob|
|000040a0| 6c 65 6d 20 61 74 20 68 | 61 6e 64 2c 20 62 75 74 |lem at h|and, but|
|000040b0| 20 66 6f 72 20 6e 6f 77 | 20 77 65 20 77 69 6c 6c | for now| we will|
|000040c0| 20 63 61 6c 6c 20 61 0a | 73 6f 6c 75 74 69 6f 6e | call a.|solution|
|000040d0| 20 70 61 74 68 20 6f 70 | 74 69 6d 61 6c 20 69 66 | path op|timal if|
|000040e0| 20 69 74 20 63 6f 6e 74 | 61 69 6e 73 20 74 68 65 | it cont|ains the|
|000040f0| 20 6c 65 61 73 74 20 70 | 6f 73 73 69 62 6c 65 20 | least p|ossible |
|00004100| 6e 75 6d 62 65 72 20 6f | 66 20 6e 6f 64 65 73 20 |number o|f nodes |
|00004110| 6c 65 61 64 69 6e 67 0a | 74 6f 20 74 68 65 20 67 |leading.|to the g|
|00004120| 6f 61 6c 20 6e 6f 64 65 | 2e 20 4c 61 74 65 72 20 |oal node|. Later |
|00004130| 6f 6e 20 77 65 20 77 69 | 6c 6c 20 72 65 66 69 6e |on we wi|ll refin|
|00004140| 65 20 6f 75 72 20 64 65 | 66 69 6e 69 74 69 6f 6e |e our de|finition|
|00004150| 20 74 6f 20 69 6e 63 6c | 75 64 65 20 61 0a 64 69 | to incl|ude a.di|
|00004160| 66 66 65 72 65 6e 74 2c | 20 62 75 74 20 72 65 6c |fferent,| but rel|
|00004170| 61 74 65 64 20 74 79 70 | 65 20 6f 66 20 70 72 6f |ated typ|e of pro|
|00004180| 62 6c 65 6d 73 2e 20 49 | 6e 20 74 68 65 20 63 61 |blems. I|n the ca|
|00004190| 73 65 20 6f 66 20 61 20 | 64 65 70 74 68 2d 66 69 |se of a |depth-fi|
|000041a0| 72 73 74 20 73 65 61 72 | 63 68 20 77 65 0a 63 61 |rst sear|ch we.ca|
|000041b0| 6e 6e 6f 74 20 67 75 61 | 72 61 6e 74 65 65 20 74 |nnot gua|rantee t|
|000041c0| 68 61 74 20 74 68 65 20 | 62 65 73 74 20 73 6f 6c |hat the |best sol|
|000041d0| 75 74 69 6f 6e 20 77 69 | 6c 6c 20 62 65 20 66 6f |ution wi|ll be fo|
|000041e0| 75 6e 64 2e 20 54 68 69 | 73 20 69 73 20 62 65 63 |und. Thi|s is bec|
|000041f0| 61 75 73 65 20 65 76 65 | 72 79 0a 62 72 61 6e 63 |ause eve|ry.branc|
|00004200| 68 20 69 73 20 65 78 61 | 6d 69 6e 65 64 20 73 65 |h is exa|mined se|
|00004210| 70 65 72 61 74 65 6c 79 | 2c 20 73 6f 20 69 66 20 |perately|, so if |
|00004220| 74 68 65 20 73 65 61 72 | 63 68 20 70 72 6f 63 65 |the sear|ch proce|
|00004230| 73 73 20 66 69 6e 64 73 | 20 61 20 67 6f 61 6c 20 |ss finds| a goal |
|00004240| 6e 6f 64 65 20 69 6e 0a | 6f 6e 65 20 62 72 61 6e |node in.|one bran|
|00004250| 63 68 20 69 74 20 77 69 | 6c 6c 20 74 65 72 6d 69 |ch it wi|ll termi|
|00004260| 6e 61 74 65 2e 20 42 75 | 74 20 69 74 20 6d 61 79 |nate. Bu|t it may|
|00004270| 20 77 65 6c 6c 20 62 65 | 20 74 68 61 74 20 61 20 | well be| that a |
|00004280| 62 65 74 74 65 72 20 73 | 6f 6c 75 74 69 6f 6e 20 |better s|olution |
|00004290| 69 73 0a 6c 6f 63 61 74 | 65 64 20 69 6e 20 61 20 |is.locat|ed in a |
|000042a0| 64 69 66 66 65 72 65 6e | 74 20 62 72 61 6e 63 68 |differen|t branch|
|000042b0| 2e 20 42 72 65 61 64 74 | 68 2d 66 69 72 73 74 20 |. Breadt|h-first |
|000042c0| 73 65 61 72 63 68 20 6f | 6e 20 74 68 65 20 6f 74 |search o|n the ot|
|000042d0| 68 65 72 20 68 61 6e 64 | 20 69 73 0a 67 75 61 72 |her hand| is.guar|
|000042e0| 61 6e 74 65 65 64 20 74 | 6f 20 66 69 6e 64 20 74 |anteed t|o find t|
|000042f0| 68 65 20 73 68 6f 72 74 | 65 73 74 20 70 61 74 68 |he short|est path|
|00004300| 2c 20 62 65 63 61 75 73 | 65 20 69 74 20 65 78 70 |, becaus|e it exp|
|00004310| 61 6e 64 73 20 61 6c 6c | 20 6e 6f 64 65 73 20 6f |ands all| nodes o|
|00004320| 6e 20 6f 6e 65 0a 6c 65 | 76 65 6c 20 62 65 66 6f |n one.le|vel befo|
|00004330| 72 65 20 61 64 76 61 6e | 63 69 6e 67 20 74 6f 20 |re advan|cing to |
|00004340| 74 68 65 20 6e 65 78 74 | 2e 0a 0a 46 6f 72 20 73 |the next|...For s|
|00004350| 6f 6d 65 20 70 72 6f 62 | 6c 65 6d 73 2c 20 68 6f |ome prob|lems, ho|
|00004360| 77 65 76 65 72 2c 20 66 | 69 6e 64 69 6e 67 20 74 |wever, f|inding t|
|00004370| 68 65 20 62 65 73 74 20 | 73 6f 6c 75 74 69 6f 6e |he best |solution|
|00004380| 20 64 6f 65 73 20 6e 6f | 74 20 6d 65 61 6e 20 66 | does no|t mean f|
|00004390| 69 6e 64 69 6e 67 20 74 | 68 65 0a 73 68 6f 72 74 |inding t|he.short|
|000043a0| 65 73 74 20 70 61 74 68 | 2c 20 62 75 74 20 72 61 |est path|, but ra|
|000043b0| 74 68 65 72 20 74 68 65 | 20 7b 5c 65 6d 20 63 68 |ther the| {\em ch|
|000043c0| 65 61 70 65 73 74 5c 2c | 7d 20 70 61 74 68 2e 20 |eapest\,|} path. |
|000043d0| 54 68 69 73 20 69 73 20 | 74 72 75 65 20 66 6f 72 |This is |true for|
|000043e0| 20 69 6e 73 74 61 6e 63 | 65 0a 77 68 65 6e 20 77 | instanc|e.when w|
|000043f0| 65 20 6e 65 65 64 20 74 | 6f 20 66 69 6e 64 20 74 |e need t|o find t|
|00004400| 68 65 20 73 68 6f 72 74 | 65 73 74 20 70 61 74 68 |he short|est path|
|00004410| 20 66 72 6f 6d 20 6f 6e | 65 20 63 69 74 79 20 74 | from on|e city t|
|00004420| 6f 20 61 6e 6f 74 68 65 | 72 2e 20 49 6e 20 74 68 |o anothe|r. In th|
|00004430| 69 73 20 63 61 73 65 0a | 74 68 65 72 65 20 6d 61 |is case.|there ma|
|00004440| 79 20 62 65 20 73 65 76 | 65 72 61 6c 20 72 6f 75 |y be sev|eral rou|
|00004450| 74 65 73 20 74 68 61 74 | 20 63 61 6e 20 62 65 20 |tes that| can be |
|00004460| 75 73 65 64 20 74 6f 20 | 67 65 74 20 66 72 6f 6d |used to |get from|
|00004470| 20 63 69 74 79 20 41 20 | 74 6f 20 63 69 74 79 20 | city A |to city |
|00004480| 42 2c 0a 76 69 73 69 74 | 69 6e 67 20 6f 74 68 65 |B,.visit|ing othe|
|00004490| 72 20 63 69 74 69 65 73 | 20 61 6c 6f 6e 67 20 74 |r cities| along t|
|000044a0| 68 65 20 77 61 79 2e 20 | 4e 6f 77 20 73 75 70 70 |he way. |Now supp|
|000044b0| 6f 73 65 20 74 68 65 20 | 63 69 74 69 65 73 20 61 |ose the |cities a|
|000044c0| 72 65 20 6e 6f 64 65 73 | 20 69 6e 20 61 0a 73 65 |re nodes| in a.se|
|000044d0| 61 72 63 68 20 74 72 65 | 65 2c 20 63 6c 65 61 72 |arch tre|e, clear|
|000044e0| 6c 79 20 77 68 61 74 20 | 77 65 20 77 61 6e 74 20 |ly what |we want |
|000044f0| 69 73 20 6e 6f 74 20 74 | 68 65 20 73 6d 61 6c 6c |is not t|he small|
|00004500| 65 73 74 20 6e 75 6d 62 | 65 72 20 6f 66 20 6e 6f |est numb|er of no|
|00004510| 64 65 73 20 28 63 69 74 | 69 65 73 29 0a 74 68 61 |des (cit|ies).tha|
|00004520| 74 20 6d 61 6b 65 20 75 | 70 20 61 20 70 61 74 68 |t make u|p a path|
|00004530| 20 66 72 6f 6d 20 41 20 | 74 6f 20 42 2c 20 62 75 | from A |to B, bu|
|00004540| 74 20 74 68 65 20 73 68 | 6f 72 74 65 73 74 20 72 |t the sh|ortest r|
|00004550| 6f 75 74 65 2e 20 54 6f | 20 73 6f 6c 76 65 20 70 |oute. To| solve p|
|00004560| 72 6f 62 6c 65 6d 73 0a | 6c 69 6b 65 20 74 68 69 |roblems.|like thi|
|00004570| 73 20 6f 6e 65 20 77 65 | 20 6e 65 65 64 20 74 6f |s one we| need to|
|00004580| 20 61 73 73 6f 63 69 61 | 74 65 20 7b 5c 65 6d 20 | associa|te {\em |
|00004590| 63 6f 73 74 73 5c 2c 7d | 20 77 69 74 68 20 74 68 |costs\,}| with th|
|000045a0| 65 20 61 72 63 73 20 69 | 6e 20 74 68 65 20 74 72 |e arcs i|n the tr|
|000045b0| 65 65 20 28 69 6e 0a 74 | 68 69 73 20 63 61 73 65 |ee (in.t|his case|
|000045c0| 20 74 68 65 20 63 6f 73 | 74 73 20 77 69 6c 6c 20 | the cos|ts will |
|000045d0| 72 65 70 72 65 73 65 6e | 74 20 74 68 65 20 64 69 |represen|t the di|
|000045e0| 73 74 61 6e 63 65 73 20 | 62 65 74 77 65 65 6e 20 |stances |between |
|000045f0| 74 68 65 20 63 69 74 69 | 65 73 29 2e 20 54 68 65 |the citi|es). The|
|00004600| 0a 6f 62 6a 65 63 74 20 | 69 73 20 74 6f 20 66 69 |.object |is to fi|
|00004610| 6e 64 20 61 20 70 61 74 | 68 20 68 61 76 69 6e 67 |nd a pat|h having|
|00004620| 20 74 68 65 20 6c 65 61 | 73 74 20 63 6f 73 74 2e | the lea|st cost.|
|00004630| 0a 0a 41 20 6d 6f 72 65 | 20 67 65 6e 65 72 61 6c |..A more| general|
|00004640| 20 76 65 72 73 69 6f 6e | 20 6f 66 20 74 68 65 20 | version| of the |
|00004650| 62 72 65 61 64 74 68 2d | 66 69 72 73 74 20 6d 65 |breadth-|first me|
|00004660| 74 68 6f 64 2c 20 63 61 | 6c 6c 65 64 20 74 68 65 |thod, ca|lled the|
|00004670| 20 7b 5c 65 6d 0a 75 6e | 69 66 6f 72 6d 2d 63 6f | {\em.un|iform-co|
|00004680| 73 74 20 73 65 61 72 63 | 68 20 6d 65 74 68 6f 64 |st searc|h method|
|00004690| 5c 2c 7d 20 69 73 20 67 | 75 61 72 61 6e 74 65 65 |\,} is g|uarantee|
|000046a0| 64 20 74 6f 20 66 69 6e | 64 20 61 20 70 61 74 68 |d to fin|d a path|
|000046b0| 20 6f 66 20 6d 69 6e 69 | 6d 61 6c 20 63 6f 73 74 | of mini|mal cost|
|000046c0| 0a 66 72 6f 6d 20 74 68 | 65 20 73 74 61 72 74 20 |.from th|e start |
|000046d0| 6e 6f 64 65 20 74 6f 20 | 61 20 67 6f 61 6c 20 6e |node to |a goal n|
|000046e0| 6f 64 65 2e 20 49 6e 73 | 74 65 61 64 20 6f 66 20 |ode. Ins|tead of |
|000046f0| 65 78 70 61 6e 64 69 6e | 67 20 70 61 74 68 73 20 |expandin|g paths |
|00004700| 6f 66 20 65 71 75 61 6c | 20 6c 65 6e 67 74 68 0a |of equal| length.|
|00004710| 6c 69 6b 65 20 74 68 65 | 20 62 72 65 61 64 74 68 |like the| breadth|
|00004720| 2d 66 69 72 73 74 20 6d | 65 74 68 6f 64 2c 20 74 |-first m|ethod, t|
|00004730| 68 69 73 20 6d 65 74 68 | 6f 64 20 65 78 70 61 6e |his meth|od expan|
|00004740| 64 73 20 70 61 74 68 73 | 20 6f 66 20 65 71 75 61 |ds paths| of equa|
|00004750| 6c 20 63 6f 73 74 2e 20 | 54 6f 0a 63 6f 6d 70 75 |l cost. |To.compu|
|00004760| 74 65 20 74 68 65 20 63 | 6f 73 74 20 6f 66 20 61 |te the c|ost of a|
|00004770| 20 70 61 74 68 20 7b 5c | 65 6d 20 73 5c 2c 7d 20 | path {\|em s\,} |
|00004780| 74 6f 20 61 20 6e 6f 64 | 65 20 7b 5c 65 6d 20 6e |to a nod|e {\em n|
|00004790| 5c 2c 7d 20 77 65 20 77 | 69 6c 6c 20 75 73 65 20 |\,} we w|ill use |
|000047a0| 74 68 65 0a 66 75 6e 63 | 74 69 6f 6e 20 7b 5c 65 |the.func|tion {\e|
|000047b0| 6d 20 67 28 6e 29 5c 2c | 7d 5c 6c 61 62 65 6c 7b |m g(n)\,|}\label{|
|000047c0| 67 66 75 6e 63 7d 2e 20 | 54 68 65 20 63 6f 73 74 |gfunc}. |The cost|
|000047d0| 20 61 73 73 6f 63 69 61 | 74 65 64 20 77 69 74 68 | associa|ted with|
|000047e0| 20 61 20 6e 6f 64 65 20 | 77 69 6c 6c 20 63 6f 6e | a node |will con|
|000047f0| 73 69 73 74 0a 6f 66 20 | 74 68 65 20 63 6f 73 74 |sist.of |the cost|
|00004800| 20 61 73 73 6f 63 69 61 | 74 65 64 20 77 69 74 68 | associa|ted with|
|00004810| 20 69 74 73 20 70 61 72 | 65 6e 74 20 70 6c 75 73 | its par|ent plus|
|00004820| 20 74 68 65 20 63 6f 73 | 74 20 6f 66 20 67 65 74 | the cos|t of get|
|00004830| 74 69 6e 67 20 66 72 6f | 6d 20 74 68 65 20 70 61 |ting fro|m the pa|
|00004840| 72 65 6e 74 20 74 6f 0a | 74 68 69 73 20 6e 6f 64 |rent to.|this nod|
|00004850| 65 2e 20 55 73 69 6e 67 | 20 74 68 69 73 20 6d 65 |e. Using| this me|
|00004860| 74 68 6f 64 20 74 6f 20 | 6f 72 64 65 72 20 74 68 |thod to |order th|
|00004870| 65 20 73 65 74 20 6f 66 | 20 6e 6f 64 65 73 20 77 |e set of| nodes w|
|00004880| 65 20 61 72 65 20 73 75 | 72 65 20 74 68 65 0a 75 |e are su|re the.u|
|00004890| 6e 69 66 6f 72 6d 2d 63 | 6f 73 74 20 6d 65 74 68 |niform-c|ost meth|
|000048a0| 6f 64 20 65 78 70 61 6e | 64 73 20 6e 6f 64 65 73 |od expan|ds nodes|
|000048b0| 20 69 6e 20 6f 72 64 65 | 72 20 6f 66 20 69 6e 63 | in orde|r of inc|
|000048c0| 72 65 61 73 69 6e 67 20 | 67 28 6e 29 2e 0a 0a 4f |reasing |g(n)...O|
|000048d0| 6e 65 20 5c 6c 61 62 65 | 6c 7b 67 72 61 70 68 2d |ne \labe|l{graph-|
|000048e0| 6b 65 65 70 7d 20 73 68 | 6f 75 6c 64 20 6e 6f 74 |keep} sh|ould not|
|000048f0| 65 20 74 68 61 74 20 74 | 68 65 20 67 72 61 70 68 |e that t|he graph|
|00004900| 20 73 65 61 72 63 68 20 | 74 65 63 68 6e 69 71 75 | search |techniqu|
|00004910| 65 20 74 68 61 74 20 77 | 65 0a 64 65 73 63 72 69 |e that w|e.descri|
|00004920| 62 65 64 20 65 61 72 6c | 69 65 72 20 6d 75 73 74 |bed earl|ier must|
|00004930| 20 62 65 20 6d 6f 64 69 | 66 69 65 64 20 77 68 65 | be modi|fied whe|
|00004940| 6e 20 77 65 20 61 72 65 | 20 6c 6f 6f 6b 69 6e 67 |n we are| looking|
|00004950| 20 66 6f 72 20 61 6e 20 | 6f 70 74 69 6d 61 6c 20 | for an |optimal |
|00004960| 73 6f 6c 75 74 69 6f 6e | 2e 0a 57 65 20 73 61 69 |solution|..We sai|
|00004970| 64 20 74 68 61 74 20 64 | 75 72 69 6e 67 20 61 20 |d that d|uring a |
|00004980| 67 72 61 70 68 20 73 65 | 61 72 63 68 20 65 76 65 |graph se|arch eve|
|00004990| 72 79 20 6e 6f 64 65 20 | 74 68 61 74 20 69 73 20 |ry node |that is |
|000049a0| 67 65 6e 65 72 61 74 65 | 64 20 74 77 69 63 65 20 |generate|d twice |
|000049b0| 63 61 6e 0a 73 69 6d 70 | 6c 79 20 62 65 20 74 68 |can.simp|ly be th|
|000049c0| 72 6f 77 6e 20 61 77 61 | 79 2e 20 49 66 20 77 65 |rown awa|y. If we|
|000049d0| 20 77 6f 75 6c 64 20 75 | 73 65 20 74 68 69 73 20 | would u|se this |
|000049e0| 74 65 63 68 6e 69 71 75 | 65 20 69 6e 20 61 20 75 |techniqu|e in a u|
|000049f0| 6e 69 66 6f 72 6d 2d 63 | 6f 73 74 0a 73 65 61 72 |niform-c|ost.sear|
|00004a00| 63 68 20 77 65 20 63 6f | 75 6c 64 20 6e 65 76 65 |ch we co|uld neve|
|00004a10| 72 20 67 75 61 72 61 6e | 74 65 65 20 74 6f 20 66 |r guaran|tee to f|
|00004a20| 69 6e 64 20 74 68 65 20 | 63 68 65 61 70 65 73 74 |ind the |cheapest|
|00004a30| 20 70 61 74 68 2e 20 41 | 73 20 73 61 69 64 2c 20 | path. A|s said, |
|00004a40| 69 6e 20 61 20 67 72 61 | 70 68 0a 74 68 65 72 65 |in a gra|ph.there|
|00004a50| 20 6d 61 79 20 62 65 20 | 6d 75 6c 74 69 70 6c 65 | may be |multiple|
|00004a60| 20 70 61 74 68 73 20 6c | 65 61 64 69 6e 67 20 74 | paths l|eading t|
|00004a70| 6f 20 74 68 65 20 73 61 | 6d 65 20 6e 6f 64 65 2e |o the sa|me node.|
|00004a80| 20 42 75 74 20 65 61 63 | 68 20 6f 66 20 74 68 65 | But eac|h of the|
|00004a90| 73 65 20 68 61 73 0a 69 | 74 73 20 6f 77 6e 20 28 |se has.i|ts own (|
|00004aa0| 70 6f 73 73 69 62 6c 79 | 20 64 69 66 66 65 72 65 |possibly| differe|
|00004ab0| 6e 74 29 20 63 6f 73 74 | 2e 20 53 6f 20 69 66 20 |nt) cost|. So if |
|00004ac0| 77 65 20 74 68 72 6f 77 | 20 61 77 61 79 20 61 20 |we throw| away a |
|00004ad0| 6e 6f 64 65 20 77 69 74 | 68 6f 75 74 20 70 61 79 |node wit|hout pay|
|00004ae0| 69 6e 67 20 61 74 74 65 | 6e 74 69 6f 6e 20 74 6f |ing atte|ntion to|
|00004af0| 20 74 68 69 73 0a 66 61 | 63 74 20 77 65 20 6d 61 | this.fa|ct we ma|
|00004b00| 79 20 62 65 20 6d 69 73 | 73 69 6e 67 20 61 20 62 |y be mis|sing a b|
|00004b10| 65 74 74 65 72 20 73 6f | 6c 75 74 69 6f 6e 20 77 |etter so|lution w|
|00004b20| 69 74 68 6f 75 74 20 65 | 76 65 72 20 6e 6f 74 69 |ithout e|ver noti|
|00004b30| 63 69 6e 67 2e 20 54 68 | 65 72 65 66 6f 72 65 2c |cing. Th|erefore,|
|00004b40| 0a 74 68 65 20 67 72 61 | 70 68 20 73 65 61 72 63 |.the gra|ph searc|
|00004b50| 68 20 70 72 6f 63 65 64 | 75 72 65 20 6d 75 73 74 |h proced|ure must|
|00004b60| 20 62 65 20 6d 6f 64 69 | 66 69 65 64 20 69 6e 20 | be modi|fied in |
|00004b70| 74 68 65 20 66 6f 6c 6c | 6f 77 69 6e 67 20 77 61 |the foll|owing wa|
|00004b80| 79 3a 20 65 76 65 72 79 | 20 74 69 6d 65 0a 61 20 |y: every| time.a |
|00004b90| 6e 65 77 20 6e 6f 64 65 | 20 69 73 20 67 65 6e 65 |new node| is gene|
|00004ba0| 72 61 74 65 64 20 77 65 | 20 63 68 65 63 6b 20 77 |rated we| check w|
|00004bb0| 68 65 74 68 65 72 20 69 | 74 20 61 6c 72 65 61 64 |hether i|t alread|
|00004bc0| 79 20 65 78 69 73 74 73 | 20 69 6e 20 74 68 65 20 |y exists| in the |
|00004bd0| 67 72 61 70 68 2e 20 49 | 66 20 6e 6f 74 2c 0a 77 |graph. I|f not,.w|
|00004be0| 65 20 61 64 64 20 69 74 | 2e 20 49 66 20 69 74 20 |e add it|. If it |
|00004bf0| 64 6f 65 73 2c 20 77 65 | 20 63 6f 6d 70 61 72 65 |does, we| compare|
|00004c00| 20 74 68 65 20 63 6f 73 | 74 20 6f 66 20 74 68 65 | the cos|t of the|
|00004c10| 20 6f 6c 64 20 6e 6f 64 | 65 20 61 6e 64 20 74 68 | old nod|e and th|
|00004c20| 65 20 63 6f 73 74 20 6f | 66 20 74 68 65 0a 6e 65 |e cost o|f the.ne|
|00004c30| 77 6c 79 20 67 65 6e 65 | 72 61 74 65 64 20 6e 6f |wly gene|rated no|
|00004c40| 64 65 2e 20 49 66 20 74 | 68 65 20 6f 6c 64 20 6e |de. If t|he old n|
|00004c50| 6f 64 65 20 69 73 20 62 | 65 74 74 65 72 20 28 63 |ode is b|etter (c|
|00004c60| 68 65 61 70 65 72 29 20 | 6e 6f 74 68 69 6e 67 20 |heaper) |nothing |
|00004c70| 68 61 73 20 74 6f 20 62 | 65 0a 64 6f 6e 65 2c 20 |has to b|e.done, |
|00004c80| 69 66 20 69 74 20 69 73 | 20 77 6f 72 73 65 20 77 |if it is| worse w|
|00004c90| 65 20 63 68 61 6e 67 65 | 20 69 74 73 20 63 6f 73 |e change| its cos|
|00004ca0| 74 20 61 6e 64 20 64 69 | 72 65 63 74 20 69 74 73 |t and di|rect its|
|00004cb0| 20 70 6f 69 6e 74 65 72 | 20 74 6f 20 74 68 65 20 | pointer| to the |
|00004cc0| 70 61 72 65 6e 74 20 6f | 6e 0a 74 68 65 20 6c 65 |parent o|n.the le|
|00004cd0| 61 73 74 20 63 6f 73 74 | 6c 79 20 70 61 74 68 20 |ast cost|ly path |
|00004ce0| 74 68 61 74 20 68 61 73 | 20 6a 75 73 74 20 62 65 |that has| just be|
|00004cf0| 65 6e 20 66 6f 75 6e 64 | 2e 0a 0a 5c 73 75 62 73 |en found|...\subs|
|00004d00| 65 63 74 69 6f 6e 7b 42 | 6c 69 6e 64 20 73 65 61 |ection{B|lind sea|
|00004d10| 72 63 68 20 76 73 20 68 | 65 75 72 69 73 74 69 63 |rch vs h|euristic|
|00004d20| 20 73 65 61 72 63 68 2c | 20 62 65 73 74 2d 66 69 | search,| best-fi|
|00004d30| 72 73 74 20 73 65 61 72 | 63 68 7d 0a 0a 41 6c 6c |rst sear|ch}..All|
|00004d40| 20 6f 66 20 74 68 65 20 | 6d 65 74 68 6f 64 73 20 | of the |methods |
|00004d50| 64 65 73 63 72 69 62 65 | 64 20 73 6f 20 66 61 72 |describe|d so far|
|00004d60| 20 61 72 65 20 63 61 6c | 6c 65 64 20 7b 5c 65 6d | are cal|led {\em|
|00004d70| 20 62 6c 69 6e 64 2d 73 | 65 61 72 63 68 20 70 72 | blind-s|earch pr|
|00004d80| 6f 63 65 64 75 72 65 73 | 5c 2c 7d 20 62 65 63 61 |ocedures|\,} beca|
|00004d90| 75 73 65 20 74 68 65 79 | 0a 64 6f 20 6e 6f 74 20 |use they|.do not |
|00004da0| 75 73 65 20 61 6e 79 20 | 73 70 65 63 69 66 69 63 |use any |specific|
|00004db0| 20 69 6e 66 6f 72 6d 61 | 74 69 6f 6e 20 61 62 6f | informa|tion abo|
|00004dc0| 75 74 20 74 68 65 20 70 | 72 6f 62 6c 65 6d 20 74 |ut the p|roblem t|
|00004dd0| 6f 20 62 65 20 73 6f 6c | 76 65 64 2c 20 69 2e 65 |o be sol|ved, i.e|
|00004de0| 2c 20 74 68 65 0a 73 65 | 61 72 63 68 20 70 72 6f |, the.se|arch pro|
|00004df0| 63 65 73 73 20 6a 75 73 | 74 20 63 6f 6e 74 69 6e |cess jus|t contin|
|00004e00| 75 65 73 20 75 6e 74 69 | 6c 20 69 74 20 68 61 70 |ues unti|l it hap|
|00004e10| 70 65 6e 73 20 6f 6e 20 | 61 20 73 6f 6c 75 74 69 |pens on |a soluti|
|00004e20| 6f 6e 3a 20 69 74 20 69 | 73 20 6e 6f 74 0a 64 69 |on: it i|s not.di|
|00004e30| 72 65 63 74 65 64 20 69 | 6e 20 73 6f 6d 65 20 77 |rected i|n some w|
|00004e40| 61 79 20 74 6f 20 74 68 | 65 20 67 6f 61 6c 2e 20 |ay to th|e goal. |
|00004e50| 54 68 65 20 61 64 76 61 | 6e 74 61 67 65 20 6f 66 |The adva|ntage of|
|00004e60| 20 62 6c 69 6e 64 2d 73 | 65 61 72 63 68 20 70 72 | blind-s|earch pr|
|00004e70| 6f 63 65 64 75 72 65 73 | 20 69 73 0a 74 68 61 74 |ocedures| is.that|
|00004e80| 20 74 68 65 79 20 61 72 | 65 20 65 61 73 79 20 74 | they ar|e easy t|
|00004e90| 6f 20 69 6d 70 6c 65 6d | 65 6e 74 20 61 6e 64 20 |o implem|ent and |
|00004ea0| 6d 61 79 20 66 69 6e 64 | 20 61 20 73 6f 6c 75 74 |may find| a solut|
|00004eb0| 69 6f 6e 20 71 75 69 63 | 6b 6c 79 20 66 6f 72 20 |ion quic|kly for |
|00004ec0| 73 6d 61 6c 6c 0a 70 72 | 6f 62 6c 65 6d 73 2e 20 |small.pr|oblems. |
|00004ed0| 54 68 65 20 6f 62 76 69 | 6f 75 73 20 64 69 73 61 |The obvi|ous disa|
|00004ee0| 64 76 61 6e 74 61 67 65 | 20 6f 66 20 74 68 65 73 |dvantage| of thes|
|00004ef0| 65 20 6d 65 74 68 6f 64 | 73 20 69 73 20 74 68 61 |e method|s is tha|
|00004f00| 74 20 74 68 65 79 20 6d | 61 79 20 62 65 20 6c 65 |t they m|ay be le|
|00004f10| 64 0a 61 73 74 72 61 79 | 2c 20 65 78 70 61 6e 64 |d.astray|, expand|
|00004f20| 69 6e 67 20 61 20 6c 6f | 74 20 6f 66 20 6e 6f 64 |ing a lo|t of nod|
|00004f30| 65 73 20 74 68 61 74 20 | 61 72 65 20 6e 6f 74 20 |es that |are not |
|00004f40| 70 61 72 74 20 6f 66 20 | 74 68 65 20 73 6f 6c 75 |part of |the solu|
|00004f50| 74 69 6f 6e 20 70 61 74 | 68 2e 20 46 6f 72 0a 65 |tion pat|h. For.e|
|00004f60| 78 61 6d 70 6c 65 2c 20 | 77 68 65 6e 20 74 72 61 |xample, |when tra|
|00004f70| 76 65 72 73 69 6e 67 20 | 61 20 74 72 65 65 20 69 |versing |a tree i|
|00004f80| 6e 20 64 65 70 74 68 2d | 66 69 72 73 74 20 6f 72 |n depth-|first or|
|00004f90| 64 65 72 20 77 65 20 64 | 69 76 65 20 69 6e 74 6f |der we d|ive into|
|00004fa0| 20 74 68 65 0a 6c 65 66 | 74 20 6d 6f 73 74 20 62 | the.lef|t most b|
|00004fb0| 72 61 6e 63 68 2c 20 74 | 68 69 73 20 69 73 20 66 |ranch, t|his is f|
|00004fc0| 69 6e 65 20 69 66 20 77 | 65 20 68 61 70 70 65 6e |ine if w|e happen|
|00004fd0| 20 74 6f 20 66 69 6e 64 | 20 61 20 73 6f 6c 75 74 | to find| a solut|
|00004fe0| 69 6f 6e 20 74 68 65 72 | 65 2e 20 42 75 74 20 73 |ion ther|e. But s|
|00004ff0| 75 70 70 6f 73 65 0a 74 | 68 65 20 67 6f 61 6c 20 |uppose.t|he goal |
|00005000| 6e 6f 64 65 20 69 73 20 | 6c 6f 63 61 74 65 64 20 |node is |located |
|00005010| 69 6e 20 61 20 64 69 66 | 66 65 72 65 6e 74 20 70 |in a dif|ferent p|
|00005020| 61 72 74 20 6f 66 20 74 | 68 65 20 74 72 65 65 2c |art of t|he tree,|
|00005030| 20 65 2e 67 2e 2c 20 61 | 74 20 74 68 65 20 72 69 | e.g., a|t the ri|
|00005040| 67 68 74 20 6d 6f 73 74 | 0a 62 72 61 6e 63 68 2e |ght most|.branch.|
|00005050| 20 49 6e 20 74 68 69 73 | 20 63 61 73 65 20 77 65 | In this| case we|
|00005060| 20 77 69 6c 6c 20 68 61 | 76 65 20 73 65 61 72 63 | will ha|ve searc|
|00005070| 68 65 64 20 74 68 65 20 | 65 6e 74 69 72 65 20 74 |hed the |entire t|
|00005080| 72 65 65 20 62 65 66 6f | 72 65 20 67 65 74 74 69 |ree befo|re getti|
|00005090| 6e 67 0a 6f 6e 20 74 68 | 65 20 72 69 67 68 74 20 |ng.on th|e right |
|000050a0| 74 72 61 63 6b 2e 20 49 | 74 20 77 6f 75 6c 64 20 |track. I|t would |
|000050b0| 68 61 76 65 20 62 65 65 | 6e 20 6d 75 63 68 20 62 |have bee|n much b|
|000050c0| 65 74 74 65 72 20 69 66 | 20 77 65 20 68 61 64 20 |etter if| we had |
|000050d0| 6b 6e 6f 77 6e 20 69 6e | 20 61 64 76 61 6e 63 65 |known in| advance|
|000050e0| 0a 77 68 69 63 68 20 77 | 61 79 20 74 6f 20 67 6f |.which w|ay to go|
|000050f0| 2e 20 42 75 74 20 6f 66 | 20 63 6f 75 72 73 65 2c |. But of| course,|
|00005100| 20 74 68 69 73 20 69 73 | 20 69 6d 70 6f 73 73 69 | this is| impossi|
|00005110| 62 6c 65 3b 20 69 66 20 | 77 65 20 68 61 64 20 6b |ble; if |we had k|
|00005120| 6e 6f 77 6e 20 74 68 69 | 73 0a 77 65 20 77 6f 75 |nown thi|s.we wou|
|00005130| 6c 64 20 6e 65 76 65 72 | 20 68 61 76 65 20 74 6f |ld never| have to|
|00005140| 20 7b 5c 65 6d 20 73 65 | 61 72 63 68 5c 2c 7d 20 | {\em se|arch\,} |
|00005150| 66 6f 72 20 61 20 73 6f | 6c 75 74 69 6f 6e 2e 20 |for a so|lution. |
|00005160| 53 74 69 6c 6c 2c 20 74 | 68 65 72 65 20 6d 61 79 |Still, t|here may|
|00005170| 20 62 65 0a 73 69 74 75 | 61 74 69 6f 6e 73 20 77 | be.situ|ations w|
|00005180| 68 65 72 65 20 77 65 20 | 64 6f 20 6e 6f 74 20 6b |here we |do not k|
|00005190| 6e 6f 77 20 65 78 61 63 | 74 6c 79 20 77 68 65 72 |now exac|tly wher|
|000051a0| 65 20 74 6f 20 67 6f 2c | 20 62 75 74 20 63 61 6e |e to go,| but can|
|000051b0| 20 67 69 76 65 20 61 6e | 20 65 73 74 69 6d 61 74 | give an| estimat|
|000051c0| 65 0a 6f 66 20 68 6f 77 | 20 66 61 72 20 61 20 6e |e.of how| far a n|
|000051d0| 6f 64 65 20 69 73 20 72 | 65 6d 6f 76 65 64 20 66 |ode is r|emoved f|
|000051e0| 72 6f 6d 20 74 68 65 20 | 67 6f 61 6c 20 6e 6f 64 |rom the |goal nod|
|000051f0| 65 20 61 6e 64 20 68 65 | 6e 63 65 20 64 65 74 65 |e and he|nce dete|
|00005200| 72 6d 69 6e 65 20 69 66 | 20 69 74 20 69 73 20 6f |rmine if| it is o|
|00005210| 6e 0a 74 68 65 20 28 62 | 65 73 74 29 20 73 6f 6c |n.the (b|est) sol|
|00005220| 75 74 69 6f 6e 20 70 61 | 74 68 2e 20 55 73 69 6e |ution pa|th. Usin|
|00005230| 67 20 74 68 69 73 20 69 | 6e 66 6f 72 6d 61 74 69 |g this i|nformati|
|00005240| 6f 6e 20 69 74 20 69 73 | 20 70 6f 73 73 69 62 6c |on it is| possibl|
|00005250| 65 20 74 6f 20 69 6d 70 | 72 6f 76 65 20 74 68 65 |e to imp|rove the|
|00005260| 0a 65 66 66 69 63 69 65 | 6e 63 79 20 6f 66 20 74 |.efficie|ncy of t|
|00005270| 68 65 20 73 65 61 72 63 | 68 20 70 72 6f 63 65 73 |he searc|h proces|
|00005280| 73 2e 20 48 65 72 65 2c | 20 77 65 20 68 61 76 65 |s. Here,| we have|
|00005290| 20 69 6e 74 72 6f 64 75 | 63 65 64 20 74 68 65 20 | introdu|ced the |
|000052a0| 69 64 65 61 20 6f 66 20 | 75 73 69 6e 67 20 61 0a |idea of |using a.|
|000052b0| 7b 5c 65 6d 20 68 65 75 | 72 69 73 74 69 63 5c 2c |{\em heu|ristic\,|
|000052c0| 7d 2e 0a 0a 41 20 68 65 | 75 72 69 73 74 69 63 20 |}...A he|uristic |
|000052d0| 69 73 20 61 20 72 75 6c | 65 20 6f 66 20 74 68 75 |is a rul|e of thu|
|000052e0| 6d 62 2c 20 61 20 74 65 | 63 68 6e 69 71 75 65 20 |mb, a te|chnique |
|000052f0| 74 68 61 74 20 69 6d 70 | 72 6f 76 65 73 20 74 68 |that imp|roves th|
|00005300| 65 20 65 66 66 69 63 69 | 65 6e 63 79 20 6f 66 20 |e effici|ency of |
|00005310| 61 0a 73 65 61 72 63 68 | 20 70 72 6f 63 65 73 73 |a.search| process|
|00005320| 2c 20 70 6f 73 73 69 62 | 6c 79 20 62 79 20 73 61 |, possib|ly by sa|
|00005330| 63 72 69 66 69 63 69 6e | 67 20 63 6c 61 69 6d 73 |crificin|g claims|
|00005340| 20 74 6f 20 63 6f 6d 70 | 6c 65 74 65 6e 65 73 73 | to comp|leteness|
|00005350| 0a 5b 52 69 63 68 20 31 | 39 38 33 2c 20 33 35 5d |.[Rich 1|983, 35]|
|00005360| 2e 20 54 68 69 73 20 6d | 65 61 6e 73 20 74 68 61 |. This m|eans tha|
|00005370| 74 2c 20 6c 69 6b 65 20 | 61 6c 6c 20 72 75 6c 65 |t, like |all rule|
|00005380| 73 20 6f 66 20 74 68 75 | 6d 62 2c 20 68 65 75 72 |s of thu|mb, heur|
|00005390| 69 73 74 69 63 73 20 6d | 61 79 20 6c 65 61 64 0a |istics m|ay lead.|
|000053a0| 74 68 65 20 73 65 61 72 | 63 68 20 69 6e 20 74 68 |the sear|ch in th|
|000053b0| 65 20 6d 6f 73 74 20 70 | 72 6f 6d 69 73 69 6e 67 |e most p|romising|
|000053c0| 20 77 61 79 2c 20 66 69 | 6e 64 69 6e 67 20 61 20 | way, fi|nding a |
|000053d0| 73 6f 6c 75 74 69 6f 6e | 20 71 75 69 63 6b 6c 79 |solution| quickly|
|000053e0| 2c 20 62 75 74 20 61 6c | 73 6f 0a 74 68 61 74 20 |, but al|so.that |
|000053f0| 74 68 65 79 20 6d 61 79 | 20 74 61 6b 65 20 61 20 |they may| take a |
|00005400| 77 72 6f 6e 67 20 74 75 | 72 6e 20 28 62 75 74 20 |wrong tu|rn (but |
|00005410| 73 74 69 6c 6c 20 6c 65 | 61 64 69 6e 67 20 74 6f |still le|ading to|
|00005420| 20 74 68 65 20 67 6f 61 | 6c 29 20 6f 72 20 6c 65 | the goa|l) or le|
|00005430| 61 64 20 74 6f 0a 64 65 | 61 64 65 6e 64 73 2e 20 |ad to.de|adends. |
|00005440| 41 20 67 6f 6f 64 20 77 | 61 79 20 74 6f 20 75 73 |A good w|ay to us|
|00005450| 65 20 68 65 75 72 69 73 | 74 69 63 20 69 6e 66 6f |e heuris|tic info|
|00005460| 72 6d 61 74 69 6f 6e 20 | 69 73 20 62 79 20 6d 65 |rmation |is by me|
|00005470| 61 6e 73 20 6f 66 20 61 | 20 7b 5c 65 6d 20 68 65 |ans of a| {\em he|
|00005480| 75 72 69 73 74 69 63 0a | 66 75 6e 63 74 69 6f 6e |uristic.|function|
|00005490| 5c 2c 7d 20 74 68 61 74 | 20 65 76 61 6c 75 61 74 |\,} that| evaluat|
|000054a0| 65 73 20 65 76 65 72 79 | 20 6e 6f 64 65 20 74 68 |es every| node th|
|000054b0| 61 74 20 69 73 20 62 65 | 69 6e 67 20 67 65 6e 65 |at is be|ing gene|
|000054c0| 72 61 74 65 64 2c 20 69 | 2e 65 2e 20 74 68 61 74 |rated, i|.e. that|
|000054d0| 20 64 65 74 65 72 6d 69 | 6e 65 73 0a 74 68 65 20 | determi|nes.the |
|000054e0| 67 6f 6f 64 6e 65 73 73 | 20 6f 72 20 62 61 64 6e |goodness| or badn|
|000054f0| 65 73 73 20 6f 66 20 61 | 20 6e 6f 64 65 2e 20 55 |ess of a| node. U|
|00005500| 73 69 6e 67 20 61 20 68 | 65 75 72 69 73 74 69 63 |sing a h|euristic|
|00005510| 20 66 75 6e 63 74 69 6f | 6e 20 69 74 20 77 69 6c | functio|n it wil|
|00005520| 6c 20 62 65 0a 70 6f 73 | 73 69 62 6c 65 20 74 6f |l be.pos|sible to|
|00005530| 20 63 6f 6e 64 75 63 74 | 20 74 68 65 20 73 65 61 | conduct| the sea|
|00005540| 72 63 68 20 69 6e 20 74 | 68 65 20 6d 6f 73 74 20 |rch in t|he most |
|00005550| 70 72 6f 66 69 74 61 62 | 6c 65 20 64 69 72 65 63 |profitab|le direc|
|00005560| 74 69 6f 6e 2c 20 62 79 | 20 73 75 67 67 65 73 74 |tion, by| suggest|
|00005570| 69 6e 67 0a 77 68 69 63 | 68 20 70 61 74 68 20 74 |ing.whic|h path t|
|00005580| 6f 20 66 6f 6c 6c 6f 77 | 20 66 69 72 73 74 20 77 |o follow| first w|
|00005590| 68 65 6e 20 6d 6f 72 65 | 20 74 68 61 6e 20 6f 6e |hen more| than on|
|000055a0| 65 20 69 73 20 61 76 61 | 69 6c 61 62 6c 65 2e 0a |e is ava|ilable..|
|000055b0| 0a 57 65 20 77 69 6c 6c | 20 64 65 66 69 6e 65 20 |.We will| define |
|000055c0| 61 20 68 65 75 72 69 73 | 74 69 63 20 66 75 6e 63 |a heuris|tic func|
|000055d0| 74 69 6f 6e 20 7b 5c 65 | 6d 20 66 28 6e 29 5c 2c |tion {\e|m f(n)\,|
|000055e0| 7d 5c 6c 61 62 65 6c 7b | 66 66 75 6e 63 7d 20 62 |}\label{|ffunc} b|
|000055f0| 65 69 6e 67 20 74 68 65 | 20 73 75 6d 20 6f 66 20 |eing the| sum of |
|00005600| 74 77 6f 20 63 6f 6d 70 | 6f 6e 65 6e 74 73 0a 7b |two comp|onents.{|
|00005610| 5c 65 6d 20 67 28 6e 29 | 5c 2c 7d 20 61 6e 64 20 |\em g(n)|\,} and |
|00005620| 7b 5c 65 6d 20 68 28 6e | 29 5c 2c 7d 3a 0a 20 20 |{\em h(n|)\,}:. |
|00005630| 20 20 5c 5b 20 66 28 6e | 29 20 3d 20 67 28 6e 29 | \[ f(n|) = g(n)|
|00005640| 20 2b 20 68 28 6e 29 20 | 5c 5d 0a 46 75 6e 63 74 | + h(n) |\].Funct|
|00005650| 69 6f 6e 20 67 28 6e 29 | 20 69 73 20 74 68 65 20 |ion g(n)| is the |
|00005660| 73 61 6d 65 20 61 73 20 | 74 68 65 20 6f 6e 65 20 |same as |the one |
|00005670| 64 65 73 63 72 69 62 65 | 64 20 69 6e 20 73 65 63 |describe|d in sec|
|00005680| 74 69 6f 6e 7e 5c 72 65 | 66 7b 67 66 75 6e 63 7d |tion~\re|f{gfunc}|
|00005690| 3a 20 61 20 6d 65 61 73 | 75 72 65 20 6f 66 20 74 |: a meas|ure of t|
|000056a0| 68 65 20 63 6f 73 74 0a | 6f 66 20 67 65 74 74 69 |he cost.|of getti|
|000056b0| 6e 67 20 66 72 6f 6d 20 | 74 68 65 20 69 6e 69 74 |ng from |the init|
|000056c0| 69 61 6c 20 73 74 61 74 | 65 20 74 6f 20 74 68 65 |ial stat|e to the|
|000056d0| 20 63 75 72 72 65 6e 74 | 20 6e 6f 64 65 2e 20 54 | current| node. T|
|000056e0| 68 65 20 66 75 6e 63 74 | 69 6f 6e 20 68 28 6e 29 |he funct|ion h(n)|
|000056f0| 20 69 73 20 61 6e 0a 65 | 73 74 69 6d 61 74 65 20 | is an.e|stimate |
|00005700| 6f 66 20 74 68 65 20 61 | 64 64 69 74 69 6f 6e 61 |of the a|dditiona|
|00005710| 6c 20 63 6f 73 74 20 6f | 66 20 67 65 74 74 69 6e |l cost o|f gettin|
|00005720| 67 20 66 72 6f 6d 20 74 | 68 65 20 63 75 72 72 65 |g from t|he curre|
|00005730| 6e 74 20 6e 6f 64 65 20 | 74 6f 20 61 20 67 6f 61 |nt node |to a goa|
|00005740| 6c 0a 73 74 61 74 65 2e | 20 50 75 74 20 64 69 66 |l.state.| Put dif|
|00005750| 66 65 72 65 6e 74 6c 79 | 2c 20 68 28 6e 29 20 69 |ferently|, h(n) i|
|00005760| 73 20 74 68 65 20 66 75 | 6e 63 74 69 6f 6e 20 69 |s the fu|nction i|
|00005770| 6e 20 77 68 69 63 68 20 | 74 68 65 20 72 65 61 6c |n which |the real|
|00005780| 20 68 65 75 72 69 73 74 | 69 63 0a 6b 6e 6f 77 6c | heurist|ic.knowl|
|00005790| 65 64 67 65 20 69 73 20 | 69 6d 62 65 64 64 65 64 |edge is |imbedded|
|000057a0| 2e 20 55 73 69 6e 67 20 | 66 28 6e 29 20 77 65 20 |. Using |f(n) we |
|000057b0| 61 72 65 20 61 62 6c 65 | 20 74 6f 20 6f 72 64 65 |are able| to orde|
|000057c0| 72 20 74 68 65 20 73 65 | 74 20 6f 66 20 6e 6f 64 |r the se|t of nod|
|000057d0| 65 73 20 77 61 69 74 69 | 6e 67 0a 66 6f 72 20 65 |es waiti|ng.for e|
|000057e0| 78 70 61 6e 73 69 6f 6e | 2c 20 62 79 20 63 6f 6e |xpansion|, by con|
|000057f0| 76 65 6e 74 69 6f 6e 20 | 74 68 69 73 20 77 69 6c |vention |this wil|
|00005800| 6c 20 62 65 20 64 6f 6e | 65 20 74 68 69 73 20 69 |l be don|e this i|
|00005810| 6e 20 7b 5c 65 6d 20 69 | 6e 63 72 65 61 73 69 6e |n {\em i|ncreasin|
|00005820| 67 5c 2c 7d 20 6f 72 64 | 65 72 2e 0a 41 6e 20 61 |g\,} ord|er..An a|
|00005830| 6c 67 6f 72 69 74 68 6d | 20 63 61 6e 20 74 68 65 |lgorithm| can the|
|00005840| 6e 20 62 65 20 75 73 65 | 64 20 74 6f 20 73 65 6c |n be use|d to sel|
|00005850| 65 63 74 20 74 68 65 20 | 6e 6f 64 65 20 68 61 76 |ect the |node hav|
|00005860| 69 6e 67 20 74 68 65 20 | 73 6d 61 6c 6c 65 73 74 |ing the |smallest|
|00005870| 20 66 28 6e 29 20 76 61 | 6c 75 65 0a 6e 65 78 74 | f(n) va|lue.next|
|00005880| 20 66 6f 72 20 65 78 70 | 61 6e 73 69 6f 6e 2e 20 | for exp|ansion. |
|00005890| 4f 6e 65 20 6f 66 20 74 | 68 65 20 6d 65 74 68 6f |One of t|he metho|
|000058a0| 64 73 20 74 68 61 74 20 | 75 73 65 73 20 74 68 69 |ds that |uses thi|
|000058b0| 73 20 74 65 63 68 6e 69 | 71 75 65 20 69 73 20 74 |s techni|que is t|
|000058c0| 68 65 0a 7b 5c 65 6d 20 | 62 65 73 74 2d 66 69 72 |he.{\em |best-fir|
|000058d0| 73 74 20 73 65 61 72 63 | 68 20 6d 65 74 68 6f 64 |st searc|h method|
|000058e0| 5c 2c 7d 20 6f 72 20 7b | 5c 65 6d 20 24 41 7b 5e |\,} or {|\em $A{^|
|000058f0| 2a 7d 24 20 61 6c 67 6f | 72 69 74 68 6d 5c 2c 7d |*}$ algo|rithm\,}|
|00005900| 2e 0a 0a 49 74 20 69 73 | 20 69 6d 70 6f 72 74 61 |...It is| importa|
|00005910| 6e 74 20 74 6f 20 6b 65 | 65 70 20 69 6e 20 6d 69 |nt to ke|ep in mi|
|00005920| 6e 64 20 74 68 61 74 20 | 6d 6f 73 74 20 68 65 75 |nd that |most heu|
|00005930| 72 69 73 74 69 63 73 20 | 61 72 65 20 69 6d 70 65 |ristics |are impe|
|00005940| 72 66 65 63 74 20 61 6e | 64 20 74 68 61 74 2c 0a |rfect an|d that,.|
|00005950| 69 6e 65 76 69 74 61 62 | 6c 79 2c 20 74 68 65 20 |inevitab|ly, the |
|00005960| 73 65 61 72 63 68 20 70 | 72 6f 63 65 73 73 20 77 |search p|rocess w|
|00005970| 69 6c 6c 20 62 65 20 61 | 66 66 65 63 74 65 64 20 |ill be a|ffected |
|00005980| 62 79 20 74 68 69 73 2e | 20 49 6e 20 67 65 6e 65 |by this.| In gene|
|00005990| 72 61 6c 2c 20 61 20 73 | 65 61 72 63 68 0a 61 6c |ral, a s|earch.al|
|000059a0| 67 6f 72 69 74 68 6d 20 | 69 73 20 63 61 6c 6c 65 |gorithm |is calle|
|000059b0| 64 20 7b 5c 65 6d 20 61 | 64 6d 69 73 73 69 62 6c |d {\em a|dmissibl|
|000059c0| 65 5c 2c 7d 20 69 66 20 | 66 6f 72 20 61 6e 79 20 |e\,} if |for any |
|000059d0| 67 72 61 70 68 20 69 74 | 20 74 65 72 6d 69 6e 61 |graph it| termina|
|000059e0| 74 65 73 20 69 6e 20 61 | 6e 0a 6f 70 74 69 6d 61 |tes in a|n.optima|
|000059f0| 6c 20 70 61 74 68 20 74 | 6f 20 61 20 67 6f 61 6c |l path t|o a goal|
|00005a00| 20 77 68 65 6e 65 76 65 | 72 20 61 20 70 61 74 68 | wheneve|r a path|
|00005a10| 20 65 78 69 73 74 73 2e | 20 55 73 69 6e 67 20 61 | exists.| Using a|
|00005a20| 20 68 65 75 72 69 73 74 | 69 63 20 66 75 6e 63 74 | heurist|ic funct|
|00005a30| 69 6f 6e 0a 74 6f 20 63 | 6f 6e 64 75 63 74 20 74 |ion.to c|onduct t|
|00005a40| 68 65 20 73 65 61 72 63 | 68 20 70 72 6f 63 65 73 |he searc|h proces|
|00005a50| 73 20 77 65 20 63 61 6e | 6e 6f 74 20 61 6c 77 61 |s we can|not alwa|
|00005a60| 79 73 20 6d 61 6b 65 20 | 74 68 69 73 20 63 6c 61 |ys make |this cla|
|00005a70| 69 6d 20 62 65 63 61 75 | 73 65 20 74 68 65 0a 62 |im becau|se the.b|
|00005a80| 65 68 61 76 69 6f 75 72 | 20 6f 66 20 74 68 65 20 |ehaviour| of the |
|00005a90| 73 65 61 72 63 68 20 77 | 69 6c 6c 20 64 65 70 65 |search w|ill depe|
|00005aa0| 6e 64 20 6f 6e 20 68 6f | 77 20 61 63 63 75 72 61 |nd on ho|w accura|
|00005ab0| 74 65 6c 79 20 74 68 65 | 20 66 75 6e 63 74 69 6f |tely the| functio|
|00005ac0| 6e 20 65 76 61 6c 75 61 | 74 65 73 0a 6e 6f 64 65 |n evalua|tes.node|
|00005ad0| 73 2e 20 49 66 20 77 65 | 20 75 73 65 20 61 20 70 |s. If we| use a p|
|00005ae0| 65 72 66 65 63 74 20 68 | 65 75 72 69 73 74 69 63 |erfect h|euristic|
|00005af0| 20 66 75 6e 63 74 69 6f | 6e 20 77 65 20 61 72 65 | functio|n we are|
|00005b00| 20 67 75 61 72 61 6e 74 | 65 65 64 20 74 6f 20 66 | guarant|eed to f|
|00005b10| 69 6e 64 20 61 6e 0a 6f | 70 74 69 6d 61 6c 20 73 |ind an.o|ptimal s|
|00005b20| 6f 6c 75 74 69 6f 6e 2c | 20 62 75 74 20 68 65 75 |olution,| but heu|
|00005b30| 72 69 73 74 69 63 73 20 | 68 61 76 69 6e 67 20 74 |ristics |having t|
|00005b40| 68 69 73 20 70 72 6f 70 | 65 72 74 79 20 61 72 65 |his prop|erty are|
|00005b50| 20 68 61 72 64 20 74 6f | 20 66 69 6e 64 2e 0a 46 | hard to| find..F|
|00005b60| 75 72 74 68 65 72 6d 6f | 72 65 2c 20 74 68 65 20 |urthermo|re, the |
|00005b70| 64 69 66 66 69 63 75 6c | 74 79 20 6f 66 20 63 6f |difficul|ty of co|
|00005b80| 6d 70 75 74 69 6e 67 20 | 74 68 65 20 66 75 6e 63 |mputing |the func|
|00005b90| 74 69 6f 6e 27 73 20 72 | 65 73 75 6c 74 20 61 66 |tion's r|esult af|
|00005ba0| 66 65 63 74 73 20 74 68 | 65 0a 74 6f 74 61 6c 20 |fects th|e.total |
|00005bb0| 63 6f 6d 70 75 74 61 74 | 69 6f 6e 61 6c 20 65 66 |computat|ional ef|
|00005bc0| 66 6f 72 74 20 6f 66 20 | 74 68 65 20 73 65 61 72 |fort of |the sear|
|00005bd0| 63 68 20 70 72 6f 63 65 | 73 73 2e 20 41 6c 73 6f |ch proce|ss. Also|
|00005be0| 2c 20 69 74 20 6d 61 79 | 20 62 65 20 6c 65 73 73 |, it may| be less|
|00005bf0| 0a 69 6d 70 6f 72 74 61 | 6e 74 20 74 6f 20 66 69 |.importa|nt to fi|
|00005c00| 6e 64 20 61 20 73 6f 6c | 75 74 69 6f 6e 20 77 68 |nd a sol|ution wh|
|00005c10| 6f 73 65 20 63 6f 73 74 | 20 69 73 20 61 62 73 6f |ose cost| is abso|
|00005c20| 6c 75 74 65 6c 79 20 6d | 69 6e 69 6d 61 6c 20 74 |lutely m|inimal t|
|00005c30| 68 61 6e 20 74 6f 20 66 | 69 6e 64 20 61 0a 73 6f |han to f|ind a.so|
|00005c40| 6c 75 74 69 6f 6e 20 6f | 66 20 72 65 61 73 6f 6e |lution o|f reason|
|00005c50| 61 62 6c 65 20 63 6f 73 | 74 20 77 69 74 68 69 6e |able cos|t within|
|00005c60| 20 61 20 72 65 61 73 6f | 6e 61 62 6c 65 20 61 6d | a reaso|nable am|
|00005c70| 6f 75 6e 74 20 6f 66 20 | 74 69 6d 65 2e 20 49 6e |ount of |time. In|
|00005c80| 20 74 68 69 73 20 63 61 | 73 65 0a 6f 6e 65 20 6d | this ca|se.one m|
|00005c90| 61 79 20 70 72 65 66 65 | 72 20 61 20 68 65 75 72 |ay prefe|r a heur|
|00005ca0| 69 73 74 69 63 20 66 75 | 6e 63 74 69 6f 6e 20 74 |istic fu|nction t|
|00005cb0| 68 61 74 20 65 76 61 6c | 75 61 74 65 73 20 6e 6f |hat eval|uates no|
|00005cc0| 64 65 73 20 6d 6f 72 65 | 20 61 63 63 75 72 61 74 |des more| accurat|
|00005cd0| 65 6c 79 20 69 6e 0a 6d | 6f 73 74 20 63 61 73 65 |ely in.m|ost case|
|00005ce0| 73 2c 20 62 75 74 20 73 | 6f 6d 65 74 69 6d 65 73 |s, but s|ometimes|
|00005cf0| 20 6f 76 65 72 65 73 74 | 69 6d 61 74 65 73 20 74 | overest|imates t|
|00005d00| 68 65 20 64 69 73 74 61 | 6e 63 65 20 74 6f 20 74 |he dista|nce to t|
|00005d10| 68 65 20 67 6f 61 6c 2c | 20 74 68 75 73 20 72 65 |he goal,| thus re|
|00005d20| 73 75 6c 74 69 6e 67 0a | 69 6e 20 61 6e 20 69 6e |sulting.|in an in|
|00005d30| 61 64 6d 69 73 73 69 62 | 6c 65 20 61 6c 67 6f 72 |admissib|le algor|
|00005d40| 69 74 68 6d 2e 20 4d 6f | 73 74 20 6f 66 20 74 68 |ithm. Mo|st of th|
|00005d50| 65 20 74 69 6d 65 20 77 | 65 20 6e 65 65 64 20 74 |e time w|e need t|
|00005d60| 6f 20 6d 61 6b 65 20 74 | 68 69 73 20 73 6f 72 74 |o make t|his sort|
|00005d70| 20 6f 66 0a 63 6f 6d 70 | 72 6f 6d 69 73 65 3a 20 | of.comp|romise: |
|00005d80| 74 68 65 20 65 66 66 69 | 63 69 65 6e 63 79 20 6f |the effi|ciency o|
|00005d90| 66 20 74 68 65 20 73 65 | 61 72 63 68 20 70 72 6f |f the se|arch pro|
|00005da0| 63 65 73 73 20 6e 65 65 | 64 73 20 74 6f 20 62 65 |cess nee|ds to be|
|00005db0| 20 69 6d 70 72 6f 76 65 | 64 20 61 74 20 74 68 65 | improve|d at the|
|00005dc0| 0a 73 61 63 72 69 66 69 | 63 65 20 6f 66 20 61 64 |.sacrifi|ce of ad|
|00005dd0| 6d 69 73 73 69 62 69 6c | 69 74 79 20 28 73 65 65 |missibil|ity (see|
|00005de0| 20 42 61 72 72 28 31 39 | 38 31 29 2c 20 70 2e 36 | Barr(19|81), p.6|
|00005df0| 35 2f 36 36 2c 20 4e 69 | 6c 73 73 6f 6e 28 31 39 |5/66, Ni|lsson(19|
|00005e00| 37 31 29 2c 20 70 2e 35 | 39 66 66 2e 29 0a 0a 0a |71), p.5|9ff.)...|
|00005e10| 5c 73 65 63 74 69 6f 6e | 7b 54 68 65 20 73 65 61 |\section|{The sea|
|00005e20| 72 63 68 20 63 6c 61 73 | 73 20 6c 69 62 72 61 72 |rch clas|s librar|
|00005e30| 79 7d 0a 0a 5c 73 75 62 | 73 65 63 74 69 6f 6e 7b |y}..\sub|section{|
|00005e40| 57 68 79 20 43 24 5e 7b | 2b 2b 7d 24 3f 7d 0a 0a |Why C$^{|++}$?}..|
|00005e50| 4f 6e 65 20 6f 66 20 74 | 68 65 20 74 68 69 6e 67 |One of t|he thing|
|00005e60| 73 20 74 6f 20 62 65 20 | 65 78 70 6c 61 69 6e 65 |s to be |explaine|
|00005e70| 64 20 77 69 6c 6c 20 62 | 65 20 74 68 65 20 72 65 |d will b|e the re|
|00005e80| 61 73 6f 6e 20 77 68 79 | 20 77 65 20 64 65 63 69 |ason why| we deci|
|00005e90| 64 65 64 20 74 6f 20 75 | 73 65 20 43 24 5e 7b 2b |ded to u|se C$^{+|
|00005ea0| 2b 7d 24 0a 66 6f 72 20 | 70 72 6f 67 72 61 6d 6d |+}$.for |programm|
|00005eb0| 69 6e 67 20 61 6e 20 41 | 49 2d 74 79 70 65 20 70 |ing an A|I-type p|
|00005ec0| 72 6f 62 6c 65 6d 20 77 | 68 69 6c 65 20 73 6f 20 |roblem w|hile so |
|00005ed0| 6d 61 6e 79 20 73 70 65 | 63 69 61 6c 69 7a 65 64 |many spe|cialized|
|00005ee0| 20 41 49 20 70 72 6f 67 | 72 61 6d 6d 69 6e 67 0a | AI prog|ramming.|
|00005ef0| 6c 61 6e 67 75 61 67 65 | 73 20 61 72 65 20 61 76 |language|s are av|
|00005f00| 61 69 6c 61 62 6c 65 2e | 20 46 6f 72 20 6f 6e 65 |ailable.| For one|
|00005f10| 20 74 68 69 6e 67 2c 20 | 77 65 20 77 61 6e 74 65 | thing, |we wante|
|00005f20| 64 20 74 6f 20 6b 6e 6f | 77 20 68 6f 77 20 6d 75 |d to kno|w how mu|
|00005f30| 63 68 20 6d 6f 72 65 20 | 65 66 66 6f 72 74 0a 69 |ch more |effort.i|
|00005f40| 74 20 77 6f 75 6c 64 20 | 62 65 20 74 6f 20 75 73 |t would |be to us|
|00005f50| 65 20 61 20 6c 6f 77 65 | 72 20 6c 65 76 65 6c 20 |e a lowe|r level |
|00005f60| 70 72 6f 67 72 61 6d 6d | 69 6e 67 20 6c 61 6e 67 |programm|ing lang|
|00005f70| 75 61 67 65 20 28 6c 6f | 77 65 72 20 63 6f 6d 70 |uage (lo|wer comp|
|00005f80| 61 72 65 64 20 74 6f 20 | 41 49 0a 70 72 6f 67 72 |ared to |AI.progr|
|00005f90| 61 6d 6d 69 6e 67 20 6c | 61 6e 67 75 61 67 65 73 |amming l|anguages|
|00005fa0| 20 6c 69 6b 65 20 50 72 | 6f 6c 6f 67 2c 20 74 68 | like Pr|olog, th|
|00005fb0| 61 74 20 69 73 29 20 74 | 6f 20 70 72 6f 67 72 61 |at is) t|o progra|
|00005fc0| 6d 20 74 68 69 73 20 74 | 79 70 65 20 6f 66 20 70 |m this t|ype of p|
|00005fd0| 72 6f 62 6c 65 6d 2e 0a | 43 24 5e 7b 2b 2b 7d 24 |roblem..|C$^{++}$|
|00005fe0| 20 73 65 65 6d 65 64 20 | 65 78 63 65 6c 6c 65 6e | seemed |excellen|
|00005ff0| 74 20 66 6f 72 20 74 68 | 69 73 20 6a 6f 62 20 62 |t for th|is job b|
|00006000| 65 63 61 75 73 65 20 69 | 74 20 69 73 20 62 61 73 |ecause i|t is bas|
|00006010| 65 64 20 6f 6e 20 43 2c | 20 61 20 74 68 69 72 64 |ed on C,| a third|
|00006020| 0a 67 65 6e 65 72 61 74 | 69 6f 6e 20 70 72 6f 67 |.generat|ion prog|
|00006030| 72 61 6d 6d 69 6e 67 20 | 6c 61 6e 67 75 61 67 65 |ramming |language|
|00006040| 2c 20 61 6e 64 20 61 6c | 73 6f 20 62 65 63 61 75 |, and al|so becau|
|00006050| 73 65 20 69 74 20 66 6f | 6c 6c 6f 77 73 20 74 68 |se it fo|llows th|
|00006060| 65 20 6f 62 6a 65 63 74 | 0a 6f 72 69 65 6e 74 65 |e object|.oriente|
|00006070| 64 20 70 61 72 61 64 69 | 67 6d 2c 20 6d 65 61 6e |d paradi|gm, mean|
|00006080| 69 6e 67 20 74 68 61 74 | 20 69 74 20 73 75 70 70 |ing that| it supp|
|00006090| 6f 72 74 73 20 61 20 68 | 69 67 68 65 72 20 6c 65 |orts a h|igher le|
|000060a0| 76 65 6c 20 6f 66 20 61 | 62 73 74 72 61 63 74 69 |vel of a|bstracti|
|000060b0| 6f 6e 2c 20 69 6e 0a 74 | 68 65 20 63 61 73 65 20 |on, in.t|he case |
|000060c0| 6f 66 20 4f 4f 50 3a 20 | 74 68 65 20 63 6f 6d 62 |of OOP: |the comb|
|000060d0| 69 6e 61 74 69 6f 6e 20 | 6f 66 20 70 72 6f 63 65 |ination |of proce|
|000060e0| 64 75 72 61 6c 20 61 6e | 64 20 64 61 74 61 20 61 |dural an|d data a|
|000060f0| 62 73 74 72 61 63 74 69 | 6f 6e 2e 20 42 75 74 20 |bstracti|on. But |
|00006100| 74 68 65 0a 6d 61 69 6e | 20 72 65 61 73 6f 6e 20 |the.main| reason |
|00006110| 77 68 79 20 77 65 20 64 | 65 63 69 64 65 64 20 74 |why we d|ecided t|
|00006120| 6f 20 75 73 65 20 43 24 | 5e 7b 2b 2b 7d 24 20 69 |o use C$|^{++}$ i|
|00006130| 73 20 74 68 61 74 20 69 | 74 20 73 75 70 70 6f 72 |s that i|t suppor|
|00006140| 74 73 20 7b 5c 65 6d 20 | 69 6e 68 65 72 69 74 61 |ts {\em |inherita|
|00006150| 6e 63 65 5c 2c 7d 2e 0a | 54 68 69 73 20 66 65 61 |nce\,}..|This fea|
|00006160| 74 75 72 65 20 6d 61 6b | 65 73 20 69 74 20 70 6f |ture mak|es it po|
|00006170| 73 73 69 62 6c 65 20 74 | 6f 20 65 61 73 69 6c 79 |ssible t|o easily|
|00006180| 20 6d 61 6b 65 20 75 73 | 65 20 6f 66 20 65 78 69 | make us|e of exi|
|00006190| 73 74 69 6e 67 20 73 6f | 66 74 77 61 72 65 20 77 |sting so|ftware w|
|000061a0| 68 65 6e 0a 64 65 76 65 | 6c 6f 70 69 6e 67 20 6e |hen.deve|loping n|
|000061b0| 65 77 20 61 70 70 6c 69 | 63 61 74 69 6f 6e 73 2e |ew appli|cations.|
|000061c0| 20 43 6f 6d 62 69 6e 65 | 64 20 77 69 74 68 20 74 | Combine|d with t|
|000061d0| 68 65 20 70 6f 73 73 69 | 62 69 6c 69 74 79 20 74 |he possi|bility t|
|000061e0| 6f 20 64 65 66 69 6e 65 | 20 7b 5c 65 6d 20 76 69 |o define| {\em vi|
|000061f0| 72 74 75 61 6c 5c 2c 7d | 0a 66 75 6e 63 74 69 6f |rtual\,}|.functio|
|00006200| 6e 73 20 74 68 69 73 20 | 6d 61 6b 65 73 20 69 74 |ns this |makes it|
|00006210| 20 70 6f 73 73 69 62 6c | 65 20 74 6f 20 64 65 73 | possibl|e to des|
|00006220| 69 67 6e 20 66 6f 75 6e | 64 61 74 69 6f 6e 20 63 |ign foun|dation c|
|00006230| 6c 61 73 73 65 73 20 74 | 68 61 74 20 61 72 65 20 |lasses t|hat are |
|00006240| 6f 66 20 6e 6f 0a 75 73 | 65 20 69 6e 20 74 68 65 |of no.us|e in the|
|00006250| 6d 73 65 6c 76 65 73 2c | 20 62 75 74 20 63 61 6e |mselves,| but can|
|00006260| 20 62 65 20 65 61 73 69 | 6c 79 20 65 78 74 65 6e | be easi|ly exten|
|00006270| 64 65 64 20 66 6f 72 20 | 72 65 61 6c 20 61 70 70 |ded for |real app|
|00006280| 6c 69 63 61 74 69 6f 6e | 73 2e 0a 0a 54 68 65 20 |lication|s...The |
|00006290| 6d 61 69 6e 20 6f 62 6a | 65 63 74 69 76 65 20 77 |main obj|ective w|
|000062a0| 61 73 20 74 6f 20 73 65 | 70 65 72 61 74 65 20 74 |as to se|perate t|
|000062b0| 68 65 20 70 72 6f 62 6c | 65 6d 2d 73 6f 6c 76 69 |he probl|em-solvi|
|000062c0| 6e 67 20 70 72 6f 63 65 | 73 73 20 74 68 61 74 20 |ng proce|ss that |
|000062d0| 77 65 0a 64 65 73 63 72 | 69 62 65 64 20 61 62 6f |we.descr|ibed abo|
|000062e0| 76 65 20 61 6e 64 20 74 | 68 65 20 72 65 70 72 65 |ve and t|he repre|
|000062f0| 73 65 6e 74 61 74 69 6f | 6e 20 6f 66 20 74 68 65 |sentatio|n of the|
|00006300| 20 70 72 6f 62 6c 65 6d | 20 69 74 73 65 6c 66 2e | problem| itself.|
|00006310| 20 49 6e 20 63 68 61 70 | 74 65 72 20 32 20 77 65 | In chap|ter 2 we|
|00006320| 0a 73 68 6f 77 65 64 20 | 74 68 61 74 20 61 20 6c |.showed |that a l|
|00006330| 6f 74 20 6f 66 20 70 72 | 6f 62 6c 65 6d 73 20 63 |ot of pr|oblems c|
|00006340| 61 6e 20 62 65 20 73 6f | 6c 76 65 64 20 75 73 69 |an be so|lved usi|
|00006350| 6e 67 20 73 74 61 6e 64 | 61 72 64 20 74 65 63 68 |ng stand|ard tech|
|00006360| 6e 69 71 75 65 73 2c 20 | 65 2e 67 2e 2c 0a 74 68 |niques, |e.g.,.th|
|00006370| 65 20 73 74 61 74 65 20 | 73 70 61 63 65 20 72 65 |e state |space re|
|00006380| 70 72 65 73 65 6e 74 61 | 74 69 6f 6e 20 61 6e 64 |presenta|tion and|
|00006390| 20 73 65 61 72 63 68 2e | 20 49 74 20 73 65 65 6d | search.| It seem|
|000063a0| 65 64 20 75 73 65 66 75 | 6c 20 74 68 65 72 65 66 |ed usefu|l theref|
|000063b0| 6f 72 65 2c 20 74 6f 0a | 64 65 76 65 6c 6f 70 20 |ore, to.|develop |
|000063c0| 73 6f 6d 65 20 62 61 73 | 69 63 20 72 6f 75 74 69 |some bas|ic routi|
|000063d0| 6e 65 73 20 6f 66 66 65 | 72 69 6e 67 20 61 20 6e |nes offe|ring a n|
|000063e0| 75 6d 62 65 72 20 6f 66 | 20 73 65 61 72 63 68 20 |umber of| search |
|000063f0| 6d 65 74 68 6f 64 73 20 | 74 68 61 74 20 63 6f 75 |methods |that cou|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.