home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 2 / Amiga Tools 2.iso / tex / macros / source / contrib / newalg / newalg.dtx next >
LaTeX Document  |  1995-03-10  |  13.8 KB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: LaTeX Document (document/latex).

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert LaTeX Document (document/latex) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file LaTeX 2e document text default
99% file LaTeX document text default
98% 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% detectItEasy Format: plain text[LF] default (weak)



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 25 20 5c 69 66 66 61 6c | 73 65 0a 25 3c 2a 64 72 |% \iffal|se.%<*dr|
|00000010| 69 76 65 72 3e 0a 5c 64 | 6f 63 75 6d 65 6e 74 63 |iver>.\d|ocumentc|
|00000020| 6c 61 73 73 7b 6c 74 78 | 64 6f 63 7d 0a 5c 75 73 |lass{ltx|doc}.\us|
|00000030| 65 70 61 63 6b 61 67 65 | 7b 6e 65 77 61 6c 67 7d |epackage|{newalg}|
|00000040| 0a 20 25 5c 45 6e 61 62 | 6c 65 43 72 6f 73 73 72 |. %\Enab|leCrossr|
|00000050| 65 66 73 20 20 20 20 20 | 20 20 20 20 0a 20 5c 44 |efs | . \D|
|00000060| 69 73 61 62 6c 65 43 72 | 6f 73 73 72 65 66 73 20 |isableCr|ossrefs |
|00000070| 25 20 53 61 79 20 5c 44 | 69 73 61 62 6c 65 43 72 |% Say \D|isableCr|
|00000080| 6f 73 73 72 65 66 73 20 | 69 66 20 69 6e 64 65 78 |ossrefs |if index|
|00000090| 20 69 73 20 72 65 61 64 | 79 0a 5c 52 65 63 6f 72 | is read|y.\Recor|
|000000a0| 64 43 68 61 6e 67 65 73 | 20 20 20 20 20 20 20 20 |dChanges| |
|000000b0| 20 20 20 20 20 20 20 20 | 20 20 25 20 47 61 74 68 | | % Gath|
|000000c0| 65 72 20 75 70 64 61 74 | 65 20 69 6e 66 6f 72 6d |er updat|e inform|
|000000d0| 61 74 69 6f 6e 0a 20 5c | 4f 6e 6c 79 44 65 73 63 |ation. \|OnlyDesc|
|000000e0| 72 69 70 74 69 6f 6e 20 | 20 25 20 63 6f 6d 6d 65 |ription | % comme|
|000000f0| 6e 74 20 6f 75 74 20 66 | 6f 72 20 69 6d 70 6c 65 |nt out f|or imple|
|00000100| 6d 65 6e 74 61 74 69 6f | 6e 20 64 65 74 61 69 6c |mentatio|n detail|
|00000110| 73 0a 20 25 5c 4f 6c 64 | 4d 61 6b 65 69 6e 64 65 |s. %\Old|Makeinde|
|00000120| 78 20 20 20 20 20 25 20 | 75 73 65 20 69 66 20 79 |x % |use if y|
|00000130| 6f 75 72 20 4d 61 6b 65 | 49 6e 64 65 78 20 69 73 |our Make|Index is|
|00000140| 20 70 72 65 2d 76 32 2e | 39 0a 5c 62 65 67 69 6e | pre-v2.|9.\begin|
|00000150| 7b 64 6f 63 75 6d 65 6e | 74 7d 0a 20 20 20 5c 44 |{documen|t}. \D|
|00000160| 6f 63 49 6e 70 75 74 7b | 6e 65 77 61 6c 67 2e 64 |ocInput{|newalg.d|
|00000170| 74 78 7d 0a 5c 65 6e 64 | 7b 64 6f 63 75 6d 65 6e |tx}.\end|{documen|
|00000180| 74 7d 0a 25 3c 2f 64 72 | 69 76 65 72 3e 0a 25 3c |t}.%</dr|iver>.%<|
|00000190| 70 61 63 6b 61 67 65 3e | 5c 4e 65 65 64 73 54 65 |package>|\NeedsTe|
|000001a0| 58 46 6f 72 6d 61 74 7b | 4c 61 54 65 58 32 65 7d |XFormat{|LaTeX2e}|
|000001b0| 5b 31 39 39 34 2f 30 36 | 2f 30 31 5d 0a 25 3c 70 |[1994/06|/01].%<p|
|000001c0| 61 63 6b 61 67 65 3e 5c | 50 72 6f 76 69 64 65 73 |ackage>\|Provides|
|000001d0| 50 61 63 6b 61 67 65 7b | 6e 65 77 61 6c 67 7d 5b |Package{|newalg}[|
|000001e0| 31 39 39 34 2f 31 32 2f | 31 35 20 46 6f 72 6d 61 |1994/12/|15 Forma|
|000001f0| 74 20 63 6f 64 65 20 61 | 6c 67 6f 72 69 74 68 6d |t code a|lgorithm|
|00000200| 73 20 6e 69 63 65 6c 79 | 5d 0a 25 20 5c 66 69 0a |s nicely|].% \fi.|
|00000210| 25 0a 25 20 5c 74 69 74 | 6c 65 7b 54 68 65 20 5c |%.% \tit|le{The \|
|00000220| 74 65 78 74 74 74 7b 6e | 65 77 61 6c 67 7d 20 50 |texttt{n|ewalg} P|
|00000230| 61 63 6b 61 67 65 7d 0a | 25 20 5c 61 75 74 68 6f |ackage}.|% \autho|
|00000240| 72 7b 52 69 63 6b 20 46 | 61 72 6e 62 61 63 68 5c |r{Rick F|arnbach\|
|00000250| 74 68 61 6e 6b 73 7b 45 | 6d 61 69 6c 3a 20 20 72 |thanks{E|mail: r|
|00000260| 69 63 6b 5c 5f 66 61 72 | 6e 62 61 63 68 40 6d 65 |ick\_far|nbach@me|
|00000270| 6e 74 6f 72 67 2e 63 6f | 6d 7d 20 5c 5c 0a 25 20 |ntorg.co|m} \\.% |
|00000280| 20 20 20 20 20 20 20 50 | 61 75 6c 20 46 75 72 6e | P|aul Furn|
|00000290| 61 6e 7a 5c 74 68 61 6e | 6b 73 7b 45 6d 61 69 6c |anz\than|ks{Email|
|000002a0| 3a 20 20 70 61 75 6c 5c | 5f 66 75 72 6e 61 6e 7a |: paul\|_furnanz|
|000002b0| 40 6d 65 6e 74 72 6f 67 | 2e 63 6f 6d 7d 7d 0a 25 |@mentrog|.com}}.%|
|000002c0| 20 5c 6d 61 6b 65 74 69 | 74 6c 65 0a 25 0a 25 20 | \maketi|tle.%.% |
|000002d0| 5c 62 65 67 69 6e 7b 61 | 62 73 74 72 61 63 74 7d |\begin{a|bstract}|
|000002e0| 0a 25 20 20 20 54 68 65 | 20 70 61 63 6b 61 67 65 |.% The| package|
|000002f0| 20 63 6f 6e 74 61 69 6e | 73 20 74 68 65 20 64 65 | contain|s the de|
|00000300| 66 69 6e 69 74 69 6f 6e | 73 20 74 68 61 74 20 61 |finition|s that a|
|00000310| 72 65 20 6e 65 65 64 65 | 64 20 74 6f 20 74 79 70 |re neede|d to typ|
|00000320| 65 73 65 74 20 63 6f 64 | 65 0a 25 20 20 20 61 6c |eset cod|e.% al|
|00000330| 67 6f 72 69 74 68 6d 73 | 20 69 6e 20 61 20 70 72 |gorithms| in a pr|
|00000340| 65 74 74 79 20 77 61 79 | 2e 20 20 54 68 65 20 46 |etty way|. The F|
|00000350| 6f 72 6d 61 74 74 65 64 | 20 61 6c 67 6f 72 69 74 |ormatted| algorit|
|00000360| 68 6d 73 20 66 6f 6c 6c | 6f 77 20 74 68 65 20 73 |hms foll|ow the s|
|00000370| 74 79 6c 65 0a 25 20 20 | 20 73 65 74 20 66 6f 72 |tyle.% | set for|
|00000380| 74 68 20 69 6e 20 74 68 | 65 20 62 6f 6f 6b 20 60 |th in th|e book `|
|00000390| 60 49 6e 74 72 6f 64 75 | 63 74 69 6f 6e 20 74 6f |`Introdu|ction to|
|000003a0| 20 41 6c 67 6f 72 69 74 | 68 6d 73 27 27 20 62 79 | Algorit|hms'' by|
|000003b0| 20 43 6f 72 6d 61 6e 2c | 0a 25 20 20 20 4c 65 69 | Corman,|.% Lei|
|000003c0| 73 65 72 73 6f 6e 20 61 | 6e 64 20 52 69 76 65 73 |serson a|nd Rives|
|000003d0| 74 2e 0a 25 20 5c 65 6e | 64 7b 61 62 73 74 72 61 |t..% \en|d{abstra|
|000003e0| 63 74 7d 0a 25 20 5c 6e | 65 77 69 66 5c 69 66 6d |ct}.% \n|ewif\ifm|
|000003f0| 75 6c 74 69 63 6f 6c 73 | 0a 25 20 5c 49 66 46 69 |ulticols|.% \IfFi|
|00000400| 6c 65 45 78 69 73 74 73 | 7b 6d 75 6c 74 69 63 6f |leExists|{multico|
|00000410| 6c 2e 73 74 79 7d 7b 5c | 6d 75 6c 74 69 63 6f 6c |l.sty}{\|multicol|
|00000420| 73 74 72 75 65 7d 7b 7d | 0a 25 0a 25 20 5c 74 61 |strue}{}|.%.% \ta|
|00000430| 62 6c 65 6f 66 63 6f 6e | 74 65 6e 74 73 0a 25 0a |bleofcon|tents.%.|
|00000440| 25 20 5c 73 65 63 74 69 | 6f 6e 7b 49 6e 74 72 6f |% \secti|on{Intro|
|00000450| 64 75 63 74 69 6f 6e 7d | 0a 25 0a 25 20 54 68 65 |duction}|.%.% The|
|00000460| 20 5c 4c 61 54 65 58 7b | 7d 20 6d 61 63 72 6f 73 | \LaTeX{|} macros|
|00000470| 20 77 68 69 63 68 20 61 | 72 65 20 64 65 73 63 72 | which a|re descr|
|00000480| 69 62 65 64 20 68 65 72 | 65 20 61 6c 6c 6f 77 20 |ibed her|e allow |
|00000490| 64 65 73 63 72 69 70 74 | 69 6f 6e 73 20 6f 66 0a |descript|ions of.|
|000004a0| 25 20 61 6c 67 6f 72 69 | 74 68 6d 73 20 74 6f 20 |% algori|thms to |
|000004b0| 62 65 20 74 79 70 65 73 | 65 74 20 69 6e 20 61 20 |be types|et in a |
|000004c0| 70 72 65 74 74 79 20 77 | 61 79 2e 20 20 54 68 69 |pretty w|ay. Thi|
|000004d0| 73 20 69 73 20 76 65 72 | 79 20 75 73 65 66 75 6c |s is ver|y useful|
|000004e0| 20 66 6f 72 0a 25 20 66 | 75 6e 63 74 69 6f 6e 61 | for.% f|unctiona|
|000004f0| 6c 20 73 70 65 63 69 66 | 69 63 61 74 69 6f 6e 73 |l specif|ications|
|00000500| 20 66 6f 72 20 61 20 73 | 6f 66 74 77 61 72 65 20 | for a s|oftware |
|00000510| 70 72 6f 6a 65 63 74 20 | 6f 72 20 74 6f 20 64 6f |project |or to do|
|00000520| 63 75 6d 65 6e 74 20 61 | 6e 0a 25 20 61 6c 67 6f |cument a|n.% algo|
|00000530| 72 69 74 68 6d 20 66 6f | 72 20 61 20 77 68 69 74 |rithm fo|r a whit|
|00000540| 65 20 70 61 70 65 72 2e | 0a 25 0a 25 20 54 68 65 |e paper.|.%.% The|
|00000550| 20 69 64 65 61 20 66 6f | 72 20 74 68 69 73 20 6d | idea fo|r this m|
|00000560| 61 63 72 6f 20 70 61 63 | 6b 61 67 65 20 63 6f 6d |acro pac|kage com|
|00000570| 65 73 20 66 72 6f 6d 20 | 74 68 65 20 62 6f 6f 6b |es from |the book|
|00000580| 20 60 60 49 6e 74 72 6f | 64 75 63 74 69 6f 6e 20 | ``Intro|duction |
|00000590| 74 6f 0a 25 20 41 6c 67 | 6f 72 69 74 68 6d 73 27 |to.% Alg|orithms'|
|000005a0| 27 20 62 79 20 43 6f 72 | 6d 65 6e 2c 20 4c 65 69 |' by Cor|men, Lei|
|000005b0| 73 65 72 73 6f 6e 2c 20 | 61 6e 64 20 52 69 76 65 |serson, |and Rive|
|000005c0| 73 74 2e 20 20 41 6e 79 | 20 65 78 61 6d 70 6c 65 |st. Any| example|
|000005d0| 73 20 69 6e 20 74 68 69 | 73 0a 25 20 64 6f 63 75 |s in thi|s.% docu|
|000005e0| 6d 65 6e 74 20 63 6f 6d | 65 20 64 69 72 65 63 74 |ment com|e direct|
|000005f0| 6c 79 20 66 72 6f 6d 20 | 74 68 61 74 20 62 6f 6f |ly from |that boo|
|00000600| 6b 20 61 6e 64 20 73 68 | 6f 75 6c 64 20 6e 6f 74 |k and sh|ould not|
|00000610| 20 62 65 20 72 65 70 72 | 6f 64 75 63 65 64 0a 25 | be repr|oduced.%|
|00000620| 20 77 69 74 68 6f 75 74 | 20 70 72 6f 70 65 72 20 | without| proper |
|00000630| 61 74 74 72 69 62 75 74 | 69 6f 6e 2e 0a 25 0a 25 |attribut|ion..%.%|
|00000640| 20 5c 73 65 63 74 69 6f | 6e 7b 55 73 65 72 20 49 | \sectio|n{User I|
|00000650| 6e 74 65 72 66 61 63 65 | 7d 0a 25 0a 25 20 5c 73 |nterface|}.%.% \s|
|00000660| 75 62 73 65 63 74 69 6f | 6e 7b 54 68 65 20 5c 74 |ubsectio|n{The \t|
|00000670| 65 78 74 73 66 7b 61 6c | 67 6f 72 69 74 68 6d 7d |extsf{al|gorithm}|
|00000680| 20 65 6e 76 69 72 6f 6e | 6d 65 6e 74 7d 0a 25 0a | environ|ment}.%.|
|00000690| 25 20 5c 44 65 73 63 72 | 69 62 65 45 6e 76 7b 61 |% \Descr|ibeEnv{a|
|000006a0| 6c 67 6f 72 69 74 68 6d | 7d 0a 25 20 55 73 65 20 |lgorithm|}.% Use |
|000006b0| 74 68 65 20 5c 74 65 78 | 74 73 66 7b 61 6c 67 6f |the \tex|tsf{algo|
|000006c0| 72 69 74 68 6d 7d 20 65 | 6e 76 69 72 6f 6e 6d 65 |rithm} e|nvironme|
|000006d0| 6e 74 20 74 6f 20 74 79 | 70 65 73 65 74 20 61 6c |nt to ty|peset al|
|000006e0| 67 6f 72 69 74 68 6d 20 | 63 6f 64 65 2e 0a 25 20 |gorithm |code..% |
|000006f0| 54 68 69 73 20 65 6e 76 | 69 72 6f 6e 6d 65 6e 74 |This env|ironment|
|00000700| 20 6d 61 6b 65 73 20 73 | 65 76 65 72 61 6c 20 6e | makes s|everal n|
|00000710| 65 77 20 63 6f 6d 6d 61 | 6e 64 73 20 61 76 61 69 |ew comma|nds avai|
|00000720| 6c 61 62 6c 65 20 74 68 | 61 74 20 68 65 6c 70 20 |lable th|at help |
|00000730| 69 6e 0a 25 20 74 79 70 | 65 73 65 74 74 69 6e 67 |in.% typ|esetting|
|00000740| 20 63 6f 64 65 20 61 6c | 67 6f 72 69 74 68 6d 73 | code al|gorithms|
|00000750| 2e 20 20 54 68 65 20 5c | 74 65 78 74 73 66 7b 61 |. The \|textsf{a|
|00000760| 6c 67 6f 72 69 74 68 6d | 7d 20 65 6e 76 69 72 6f |lgorithm|} enviro|
|00000770| 6e 6d 65 6e 74 20 75 73 | 65 73 0a 25 20 6d 61 74 |nment us|es.% mat|
|00000780| 68 20 6d 6f 64 65 20 61 | 6e 64 20 74 68 65 20 61 |h mode a|nd the a|
|00000790| 72 72 61 79 20 65 6e 76 | 69 72 6f 6d 65 6e 74 20 |rray env|iroment |
|000007a0| 74 6f 20 64 6f 20 74 68 | 65 20 74 79 70 65 73 65 |to do th|e typese|
|000007b0| 74 74 69 6e 67 2e 20 20 | 45 76 65 72 79 74 68 69 |tting. |Everythi|
|000007c0| 6e 67 0a 25 20 74 79 70 | 65 64 20 69 73 20 69 6e |ng.% typ|ed is in|
|000007d0| 74 65 72 70 72 65 74 65 | 64 20 69 6e 20 6d 61 74 |terprete|d in mat|
|000007e0| 68 20 6d 6f 64 65 2e 20 | 20 54 6f 20 6c 65 61 76 |h mode. | To leav|
|000007f0| 65 20 6d 61 74 68 20 6d | 6f 64 65 20 75 73 65 20 |e math m|ode use |
|00000800| 74 68 65 0a 25 20 5c 74 | 65 78 74 73 66 7b 74 65 |the.% \t|extsf{te|
|00000810| 78 74 7d 20 63 6f 6d 6d | 61 6e 64 2e 20 20 48 65 |xt} comm|and. He|
|00000820| 72 65 20 69 73 20 61 6e | 20 65 78 61 6d 70 6c 65 |re is an| example|
|00000830| 20 6f 66 20 74 68 65 20 | 6f 75 74 70 75 74 20 70 | of the |output p|
|00000840| 72 6f 64 75 63 65 64 20 | 62 79 0a 25 20 75 73 69 |roduced |by.% usi|
|00000850| 6e 67 20 74 68 65 20 5c | 74 65 78 74 73 66 7b 61 |ng the \|textsf{a|
|00000860| 6c 67 6f 72 69 74 68 6d | 7d 20 65 6e 76 69 72 6f |lgorithm|} enviro|
|00000870| 6e 6d 65 6e 74 2e 0a 25 | 0a 25 20 5c 73 68 6f 77 |nment..%|.% \show|
|00000880| 62 6f 78 64 65 70 74 68 | 3d 31 30 0a 25 20 5c 73 |boxdepth|=10.% \s|
|00000890| 68 6f 77 62 6f 78 62 72 | 65 61 64 74 68 3d 31 30 |howboxbr|eadth=10|
|000008a0| 0a 25 20 5c 5b 0a 25 20 | 5c 70 61 72 62 6f 78 7b |.% \[.% |\parbox{|
|000008b0| 32 2e 30 69 6e 7d 7b 5c | 68 62 61 64 6e 65 73 73 |2.0in}{\|hbadness|
|000008c0| 32 30 30 30 0a 25 20 20 | 20 20 20 5c 62 65 67 69 |2000.% | \begi|
|000008d0| 6e 7b 61 6c 67 6f 72 69 | 74 68 6d 7d 7b 41 6c 6c |n{algori|thm}{All|
|000008e0| 6f 63 61 74 65 2d 4f 62 | 6a 65 63 74 7d 7b 7d 0a |ocate-Ob|ject}{}.|
|000008f0| 25 20 20 20 20 20 20 20 | 5c 62 65 67 69 6e 7b 49 |% |\begin{I|
|00000900| 46 7d 7b 66 72 65 65 20 | 3d 20 5c 4e 49 4c 7d 0a |F}{free |= \NIL}.|
|00000910| 25 20 20 20 20 20 20 20 | 20 20 5c 45 52 52 4f 52 |% | \ERROR|
|00000920| 7b 6f 75 74 20 6f 66 20 | 73 70 61 63 65 7d 0a 25 |{out of |space}.%|
|00000930| 20 20 20 20 20 20 20 5c | 45 4c 53 45 0a 25 20 20 | \|ELSE.% |
|00000940| 20 20 20 20 20 20 20 78 | 20 5c 3d 20 66 72 65 65 | x| \= free|
|00000950| 20 5c 5c 0a 25 20 20 20 | 20 20 20 20 20 20 66 72 | \\.% | fr|
|00000960| 65 65 20 5c 3d 20 6e 65 | 78 74 5b 78 5d 20 5c 5c |ee \= ne|xt[x] \\|
|00000970| 0a 25 20 20 20 20 20 20 | 20 20 20 5c 52 45 54 55 |.% | \RETU|
|00000980| 52 4e 20 78 0a 25 20 20 | 20 20 20 20 20 5c 65 6e |RN x.% | \en|
|00000990| 64 7b 49 46 7d 0a 25 20 | 20 20 20 20 5c 65 6e 64 |d{IF}.% | \end|
|000009a0| 7b 61 6c 67 6f 72 69 74 | 68 6d 7d 7d 0a 25 20 5c |{algorit|hm}}.% \|
|000009b0| 68 73 70 61 63 65 7b 31 | 30 70 74 7d 0a 25 20 5c |hspace{1|0pt}.% \|
|000009c0| 76 63 65 6e 74 65 72 7b | 5c 68 73 69 7a 65 3d 32 |vcenter{|\hsize=2|
|000009d0| 2e 36 69 6e 0a 25 20 20 | 20 20 5c 62 65 67 69 6e |.6in.% | \begin|
|000009e0| 7b 76 65 72 62 61 74 69 | 6d 7d 0a 25 20 20 20 20 |{verbati|m}.% |
|000009f0| 20 5c 62 65 67 69 6e 7b | 61 6c 67 6f 72 69 74 68 | \begin{|algorith|
|00000a00| 6d 7d 7b 41 6c 6c 6f 63 | 61 74 65 2d 4f 62 6a 65 |m}{Alloc|ate-Obje|
|00000a10| 63 74 7d 7b 7d 0a 25 20 | 20 20 20 20 20 20 5c 62 |ct}{}.% | \b|
|00000a20| 65 67 69 6e 7b 49 46 7d | 7b 66 72 65 65 20 3d 20 |egin{IF}|{free = |
|00000a30| 5c 4e 49 4c 7d 0a 25 20 | 20 20 20 20 20 20 20 20 |\NIL}.% | |
|00000a40| 5c 45 52 52 4f 52 7b 6f | 75 74 20 6f 66 20 73 70 |\ERROR{o|ut of sp|
|00000a50| 61 63 65 7d 0a 25 20 20 | 20 20 20 20 20 5c 45 4c |ace}.% | \EL|
|00000a60| 53 45 0a 25 20 20 20 20 | 20 20 20 20 20 78 20 5c |SE.% | x \|
|00000a70| 3d 20 66 72 65 65 20 5c | 5c 0a 25 20 20 20 20 20 |= free \|\.% |
|00000a80| 20 20 20 20 66 72 65 65 | 20 5c 3d 20 6e 65 78 74 | free| \= next|
|00000a90| 5b 78 5d 20 5c 5c 0a 25 | 20 20 20 20 20 20 20 20 |[x] \\.%| |
|00000aa0| 20 5c 52 45 54 55 52 4e | 20 78 0a 25 20 20 20 20 | \RETURN| x.% |
|00000ab0| 20 20 20 5c 65 6e 64 7b | 49 46 7d 0a 25 20 20 20 | \end{|IF}.% |
|00000ac0| 20 20 5c 65 6e 64 7b 61 | 6c 67 6f 72 69 74 68 6d | \end{a|lgorithm|
|00000ad0| 7d 0a 25 20 20 20 20 20 | 5c 65 6e 64 7b 76 65 72 |}.% |\end{ver|
|00000ae0| 62 61 74 69 6d 7d 0a 25 | 20 7d 5c 5d 0a 25 0a 25 |batim}.%| }\].%.%|
|00000af0| 20 5c 73 75 62 73 65 63 | 74 69 6f 6e 7b 46 6c 6f | \subsec|tion{Flo|
|00000b00| 77 20 43 6f 6e 74 72 6f | 6c 20 45 6e 76 69 72 6f |w Contro|l Enviro|
|00000b10| 6e 6d 65 6e 74 73 7d 0a | 25 0a 25 20 5c 44 65 73 |nments}.|%.% \Des|
|00000b20| 63 72 69 62 65 45 6e 76 | 7b 49 46 7d 0a 25 20 55 |cribeEnv|{IF}.% U|
|00000b30| 73 65 20 74 68 65 20 65 | 6e 76 69 72 6f 6e 6d 65 |se the e|nvironme|
|00000b40| 6e 74 20 5c 74 65 78 74 | 73 66 7b 49 46 7d 20 74 |nt \text|sf{IF} t|
|00000b50| 6f 20 66 6f 72 6d 61 74 | 20 61 6e 20 69 66 20 73 |o format| an if s|
|00000b60| 74 61 74 65 6d 65 6e 74 | 2e 20 20 57 68 65 6e 0a |tatement|. When.|
|00000b70| 25 20 69 6e 73 69 64 65 | 20 74 68 65 20 5c 74 65 |% inside| the \te|
|00000b80| 78 74 73 66 7b 49 46 7d | 20 65 6e 76 69 72 6f 6e |xtsf{IF}| environ|
|00000b90| 6d 65 6e 74 2c 20 74 68 | 65 20 5c 74 65 78 74 73 |ment, th|e \texts|
|00000ba0| 66 7b 45 4c 53 45 7d 20 | 6d 61 63 72 6f 20 62 65 |f{ELSE} |macro be|
|00000bb0| 63 6f 6d 65 73 0a 25 20 | 61 76 61 69 6c 61 62 6c |comes.% |availabl|
|00000bc0| 65 20 74 6f 20 73 68 6f | 77 20 74 68 65 20 65 6c |e to sho|w the el|
|00000bd0| 73 65 20 63 6c 61 75 73 | 65 2e 20 20 54 68 65 20 |se claus|e. The |
|00000be0| 65 6e 76 69 72 6f 6e 6d | 65 6e 74 20 74 61 6b 65 |environm|ent take|
|00000bf0| 73 20 6f 6e 65 20 61 72 | 67 75 6d 65 6e 74 0a 25 |s one ar|gument.%|
|00000c00| 20 74 68 61 74 20 69 73 | 20 74 68 65 20 63 6f 6e | that is| the con|
|00000c10| 64 69 74 69 6f 6e 20 66 | 6f 72 20 74 68 65 20 69 |dition f|or the i|
|00000c20| 66 20 73 74 61 74 65 6d | 65 6e 74 2e 20 20 46 6f |f statem|ent. Fo|
|00000c30| 72 20 61 6e 20 65 78 61 | 6d 70 6c 65 20 6f 66 20 |r an exa|mple of |
|00000c40| 69 74 73 0a 25 20 75 73 | 61 67 65 2c 20 73 65 65 |its.% us|age, see|
|00000c50| 20 74 68 65 20 61 62 6f | 76 65 20 65 78 61 6d 70 | the abo|ve examp|
|00000c60| 6c 65 2e 0a 25 0a 25 20 | 5c 44 65 73 63 72 69 62 |le..%.% |\Describ|
|00000c70| 65 45 6e 76 7b 46 4f 52 | 7d 0a 25 20 55 73 65 20 |eEnv{FOR|}.% Use |
|00000c80| 74 68 65 20 5c 74 65 78 | 74 73 66 7b 46 4f 52 7d |the \tex|tsf{FOR}|
|00000c90| 20 65 6e 76 69 72 6f 6e | 6d 65 6e 74 20 74 6f 20 | environ|ment to |
|00000ca0| 66 6f 72 6d 61 74 20 61 | 20 66 6f 72 20 6c 6f 6f |format a| for loo|
|00000cb0| 70 20 61 6e 64 20 74 61 | 6b 65 73 20 6f 6e 65 0a |p and ta|kes one.|
|00000cc0| 25 20 61 72 67 75 6d 65 | 6e 74 2e 20 20 54 68 65 |% argume|nt. The|
|00000cd0| 72 65 20 61 72 65 20 74 | 77 6f 20 6b 69 6e 64 73 |re are t|wo kinds|
|00000ce0| 20 6f 66 20 66 6f 72 20 | 6c 6f 6f 70 73 20 73 75 | of for |loops su|
|00000cf0| 70 70 6f 72 74 65 64 20 | 62 79 20 74 68 69 73 20 |pported |by this |
|00000d00| 6d 61 63 72 6f 2e 0a 25 | 20 54 68 65 20 66 69 72 |macro..%| The fir|
|00000d10| 73 74 20 74 79 70 65 20 | 6f 66 20 66 6f 72 20 6c |st type |of for l|
|00000d20| 6f 6f 70 20 69 73 20 67 | 65 6e 65 72 61 6c 6c 79 |oop is g|enerally|
|00000d30| 20 6b 6e 6f 77 20 61 73 | 20 74 68 65 20 5c 65 6d | know as| the \em|
|00000d40| 70 68 7b 66 6f 72 2d 65 | 61 63 68 7d 0a 25 20 6c |ph{for-e|ach}.% l|
|00000d50| 6f 6f 70 2e 20 20 54 68 | 69 73 20 74 79 70 65 20 |oop. Th|is type |
|00000d60| 6f 66 20 6c 6f 6f 70 20 | 69 73 20 75 73 65 64 20 |of loop |is used |
|00000d70| 74 6f 20 69 74 65 72 61 | 74 65 20 6f 76 65 72 20 |to itera|te over |
|00000d80| 74 68 65 20 76 61 6c 75 | 65 73 20 6f 66 20 73 6f |the valu|es of so|
|00000d90| 6d 65 0a 25 20 73 65 74 | 2e 20 20 54 68 65 20 73 |me.% set|. The s|
|00000da0| 79 6e 74 61 78 20 66 6f | 72 20 74 68 65 20 61 72 |yntax fo|r the ar|
|00000db0| 67 75 6d 65 6e 74 20 74 | 6f 20 74 68 65 20 65 6e |gument t|o the en|
|00000dc0| 76 69 72 6f 6e 6d 65 6e | 74 20 69 73 20 0a 25 20 |vironmen|t is .% |
|00000dd0| 60 60 7c 5c 45 41 43 48 | 20 3c 76 61 72 3e 20 5c |``|\EACH| <var> \|
|00000de0| 49 4e 20 3c 73 65 74 3e | 7c 27 27 2e 20 20 54 68 |IN <set>||''. Th|
|00000df0| 65 20 6f 74 68 65 72 20 | 74 79 70 65 20 6f 66 20 |e other |type of |
|00000e00| 6c 6f 6f 70 20 73 75 70 | 70 6f 72 74 65 64 20 69 |loop sup|ported i|
|00000e10| 73 20 75 73 65 64 0a 25 | 20 74 6f 20 61 73 73 69 |s used.%| to assi|
|00000e20| 67 6e 20 61 20 76 61 72 | 69 61 62 6c 65 20 74 6f |gn a var|iable to|
|00000e30| 20 61 20 72 61 6e 67 65 | 20 6f 66 20 76 61 6c 75 | a range| of valu|
|00000e40| 65 73 2e 20 20 54 68 65 | 20 73 79 6e 74 61 78 20 |es. The| syntax |
|00000e50| 66 6f 72 20 74 68 65 20 | 61 72 67 75 6d 65 6e 74 |for the |argument|
|00000e60| 0a 25 20 69 6e 20 74 68 | 69 73 20 63 61 73 65 20 |.% in th|is case |
|00000e70| 69 73 20 60 60 7c 3c 76 | 61 72 3e 20 5c 3d 20 3c |is ``|<v|ar> \= <|
|00000e80| 62 65 67 69 6e 6e 69 6e | 67 3e 20 5c 54 4f 20 3c |beginnin|g> \TO <|
|00000e90| 65 6e 64 3e 7c 27 27 2e | 20 20 48 65 72 65 20 69 |end>|''.| Here i|
|00000ea0| 73 20 61 6e 0a 25 20 65 | 78 61 6d 70 6c 65 20 75 |s an.% e|xample u|
|00000eb0| 73 61 67 65 2e 0a 25 20 | 5c 5b 0a 25 20 5c 70 61 |sage..% |\[.% \pa|
|00000ec0| 72 62 6f 78 7b 32 2e 30 | 69 6e 7d 7b 5c 68 62 61 |rbox{2.0|in}{\hba|
|00000ed0| 64 6e 65 73 73 32 30 30 | 30 0a 25 20 5c 62 65 67 |dness200|0.% \beg|
|00000ee0| 69 6e 7b 61 6c 67 6f 72 | 69 74 68 6d 7d 0a 25 20 |in{algor|ithm}.% |
|00000ef0| 20 20 7b 47 72 65 65 64 | 79 2d 41 63 74 69 76 69 | {Greed|y-Activi|
|00000f00| 74 79 2d 53 65 6c 65 63 | 74 6f 72 7d 7b 73 2c 66 |ty-Selec|tor}{s,f|
|00000f10| 7d 0a 25 20 20 20 6e 20 | 5c 3d 20 6c 65 6e 67 74 |}.% n |\= lengt|
|00000f20| 68 5b 73 5d 20 5c 5c 0a | 25 20 20 20 41 20 5c 3d |h[s] \\.|% A \=|
|00000f30| 20 7b 31 7d 20 5c 5c 0a | 25 20 20 20 6a 20 5c 3d | {1} \\.|% j \=|
|00000f40| 20 31 20 5c 5c 0a 25 20 | 20 20 5c 62 65 67 69 6e | 1 \\.% | \begin|
|00000f50| 7b 46 4f 52 7d 7b 69 20 | 5c 3d 20 32 20 5c 54 4f |{FOR}{i |\= 2 \TO|
|00000f60| 20 6e 7d 0a 25 20 20 20 | 20 20 5c 62 65 67 69 6e | n}.% | \begin|
|00000f70| 7b 49 46 7d 7b 73 5f 69 | 20 5c 67 65 71 20 66 5f |{IF}{s_i| \geq f_|
|00000f80| 6a 7d 0a 25 20 20 20 20 | 20 20 20 41 20 5c 3d 20 |j}.% | A \= |
|00000f90| 41 20 5c 63 75 70 20 7b | 69 7d 20 5c 5c 0a 25 20 |A \cup {|i} \\.% |
|00000fa0| 20 20 20 20 20 20 6a 20 | 5c 3d 20 69 0a 25 20 20 | j |\= i.% |
|00000fb0| 20 20 20 5c 65 6e 64 7b | 49 46 7d 0a 25 20 20 20 | \end{|IF}.% |
|00000fc0| 5c 65 6e 64 7b 46 4f 52 | 7d 20 5c 5c 0a 25 20 20 |\end{FOR|} \\.% |
|00000fd0| 20 5c 52 45 54 55 52 4e | 20 41 0a 25 20 5c 65 6e | \RETURN| A.% \en|
|00000fe0| 64 7b 61 6c 67 6f 72 69 | 74 68 6d 7d 7d 0a 25 20 |d{algori|thm}}.% |
|00000ff0| 5c 68 73 70 61 63 65 7b | 31 30 70 74 7d 0a 25 20 |\hspace{|10pt}.% |
|00001000| 5c 76 63 65 6e 74 65 72 | 7b 5c 68 73 69 7a 65 3d |\vcenter|{\hsize=|
|00001010| 32 2e 34 69 6e 0a 25 20 | 20 20 5c 62 65 67 69 6e |2.4in.% | \begin|
|00001020| 7b 76 65 72 62 61 74 69 | 6d 7d 0a 25 20 5c 62 65 |{verbati|m}.% \be|
|00001030| 67 69 6e 7b 61 6c 67 6f | 72 69 74 68 6d 7d 0a 25 |gin{algo|rithm}.%|
|00001040| 20 20 20 7b 47 72 65 65 | 64 79 2d 41 63 74 69 76 | {Gree|dy-Activ|
|00001050| 69 74 79 2d 53 65 6c 65 | 63 74 6f 72 7d 7b 73 2c |ity-Sele|ctor}{s,|
|00001060| 66 7d 0a 25 20 20 20 6e | 20 5c 3d 20 6c 65 6e 67 |f}.% n| \= leng|
|00001070| 74 68 5b 73 5d 20 5c 5c | 0a 25 20 20 20 41 20 5c |th[s] \\|.% A \|
|00001080| 3d 20 7b 31 7d 20 5c 5c | 0a 25 20 20 20 6a 20 5c |= {1} \\|.% j \|
|00001090| 3d 20 31 20 5c 5c 0a 25 | 20 20 20 5c 62 65 67 69 |= 1 \\.%| \begi|
|000010a0| 6e 7b 46 4f 52 7d 7b 69 | 20 5c 3d 20 32 20 5c 54 |n{FOR}{i| \= 2 \T|
|000010b0| 4f 20 6e 7d 0a 25 20 20 | 20 20 20 5c 62 65 67 69 |O n}.% | \begi|
|000010c0| 6e 7b 49 46 7d 7b 73 5f | 69 20 5c 67 65 71 20 66 |n{IF}{s_|i \geq f|
|000010d0| 5f 6a 7d 0a 25 20 20 20 | 20 20 20 20 41 20 5c 3d |_j}.% | A \=|
|000010e0| 20 41 20 5c 63 75 70 20 | 7b 69 7d 20 5c 5c 0a 25 | A \cup |{i} \\.%|
|000010f0| 20 20 20 20 20 20 20 6a | 20 5c 3d 20 69 20 0a 25 | j| \= i .%|
|00001100| 20 20 20 20 20 5c 65 6e | 64 7b 49 46 7d 0a 25 20 | \en|d{IF}.% |
|00001110| 20 20 5c 65 6e 64 7b 46 | 4f 52 7d 20 5c 5c 0a 25 | \end{F|OR} \\.%|
|00001120| 20 20 20 5c 52 45 54 55 | 52 4e 20 41 0a 25 20 5c | \RETU|RN A.% \|
|00001130| 65 6e 64 7b 61 6c 67 6f | 72 69 74 68 6d 7d 0a 25 |end{algo|rithm}.%|
|00001140| 20 5c 65 6e 64 7b 76 65 | 72 62 61 74 69 6d 7d 0a | \end{ve|rbatim}.|
|00001150| 25 20 7d 5c 5d 0a 25 0a | 25 20 5c 44 65 73 63 72 |% }\].%.|% \Descr|
|00001160| 69 62 65 45 6e 76 7b 57 | 48 49 4c 45 7d 0a 25 20 |ibeEnv{W|HILE}.% |
|00001170| 55 73 65 74 20 74 68 65 | 20 5c 74 65 78 74 73 66 |Uset the| \textsf|
|00001180| 7b 57 48 49 4c 45 7d 20 | 65 6e 76 69 72 6f 6e 6d |{WHILE} |environm|
|00001190| 65 6e 74 20 74 6f 20 66 | 6f 72 6d 61 74 20 61 20 |ent to f|ormat a |
|000011a0| 77 68 69 6c 65 20 6c 6f | 6f 70 2e 20 20 54 68 65 |while lo|op. The|
|000011b0| 0a 25 20 65 6e 76 69 72 | 6f 6e 6d 65 6e 74 20 74 |.% envir|onment t|
|000011c0| 61 6b 65 73 20 6f 6e 65 | 20 61 72 67 75 6d 65 6e |akes one| argumen|
|000011d0| 74 2e 20 20 54 68 65 20 | 61 72 67 75 6d 65 6e 74 |t. The |argument|
|000011e0| 20 69 73 20 74 68 65 20 | 65 78 69 74 20 63 6f 6e | is the |exit con|
|000011f0| 64 69 74 69 6f 6e 0a 25 | 20 66 6f 72 20 74 68 65 |dition.%| for the|
|00001200| 20 6c 6f 6f 70 2e 20 20 | 54 68 65 20 6c 6f 6f 70 | loop. |The loop|
|00001210| 20 77 69 6c 6c 20 69 74 | 65 72 61 74 65 20 75 6e | will it|erate un|
|00001220| 74 69 6c 20 74 68 65 20 | 63 6f 6e 64 69 74 69 6f |til the |conditio|
|00001230| 6e 20 69 73 20 66 61 6c | 73 65 2e 0a 25 20 48 65 |n is fal|se..% He|
|00001240| 72 65 20 69 73 20 61 6e | 20 65 78 61 6d 70 6c 65 |re is an| example|
|00001250| 20 75 73 61 67 65 2e 0a | 25 20 5c 5b 0a 25 20 5c | usage..|% \[.% \|
|00001260| 70 61 72 62 6f 78 7b 32 | 2e 30 69 6e 7d 7b 5c 68 |parbox{2|.0in}{\h|
|00001270| 62 61 64 6e 65 73 73 32 | 30 30 30 0a 25 20 5c 62 |badness2|000.% \b|
|00001280| 65 67 69 6e 7b 61 6c 67 | 6f 72 69 74 68 6d 7d 7b |egin{alg|orithm}{|
|00001290| 54 72 65 65 2d 53 75 63 | 63 65 73 73 6f 72 7d 7b |Tree-Suc|cessor}{|
|000012a0| 78 7d 0a 25 20 20 20 5c | 62 65 67 69 6e 7b 49 46 |x}.% \|begin{IF|
|000012b0| 7d 7b 72 69 67 68 74 5b | 78 5d 20 5c 6e 65 71 20 |}{right[|x] \neq |
|000012c0| 5c 4e 49 4c 7d 0a 25 20 | 20 20 20 20 5c 52 45 54 |\NIL}.% | \RET|
|000012d0| 55 52 4e 20 0a 25 20 20 | 20 20 20 20 20 5c 43 41 |URN .% | \CA|
|000012e0| 4c 4c 7b 54 72 65 65 2d | 4d 69 6e 7d 28 72 69 67 |LL{Tree-|Min}(rig|
|000012f0| 68 74 5b 78 5d 29 0a 25 | 20 20 20 5c 65 6e 64 7b |ht[x]).%| \end{|
|00001300| 49 46 7d 20 5c 5c 0a 25 | 20 20 20 79 20 5c 3d 20 |IF} \\.%| y \= |
|00001310| 70 5b 78 5d 20 5c 5c 0a | 25 20 20 20 5c 62 65 67 |p[x] \\.|% \beg|
|00001320| 69 6e 7b 57 48 49 4c 45 | 7d 0a 25 20 20 20 20 20 |in{WHILE|}.% |
|00001330| 20 7b 79 20 5c 6e 65 71 | 20 5c 4e 49 4c 20 5c 74 | {y \neq| \NIL \t|
|00001340| 65 78 74 7b 61 6e 64 7d | 20 78 3d 72 69 67 68 74 |ext{and}| x=right|
|00001350| 5b 79 5d 7d 0a 25 20 20 | 20 20 20 78 20 5c 3d 20 |[y]}.% | x \= |
|00001360| 79 20 5c 5c 0a 25 20 20 | 20 20 20 79 20 5c 3d 20 |y \\.% | y \= |
|00001370| 70 5b 79 5d 0a 25 20 20 | 20 5c 65 6e 64 7b 57 48 |p[y].% | \end{WH|
|00001380| 49 4c 45 7d 20 5c 5c 0a | 25 20 20 20 5c 52 45 54 |ILE} \\.|% \RET|
|00001390| 55 52 4e 20 79 0a 25 20 | 5c 65 6e 64 7b 61 6c 67 |URN y.% |\end{alg|
|000013a0| 6f 72 69 74 68 6d 7d 7d | 0a 25 20 5c 68 73 70 61 |orithm}}|.% \hspa|
|000013b0| 63 65 7b 31 30 70 74 7d | 0a 25 20 5c 76 63 65 6e |ce{10pt}|.% \vcen|
|000013c0| 74 65 72 7b 5c 68 73 69 | 7a 65 3d 32 2e 36 69 6e |ter{\hsi|ze=2.6in|
|000013d0| 0a 25 20 20 20 5c 62 65 | 67 69 6e 7b 76 65 72 62 |.% \be|gin{verb|
|000013e0| 61 74 69 6d 7d 0a 25 20 | 5c 62 65 67 69 6e 7b 61 |atim}.% |\begin{a|
|000013f0| 6c 67 6f 72 69 74 68 6d | 7d 7b 54 72 65 65 2d 53 |lgorithm|}{Tree-S|
|00001400| 75 63 63 65 73 73 6f 72 | 7d 7b 78 7d 0a 25 20 20 |uccessor|}{x}.% |
|00001410| 20 5c 62 65 67 69 6e 7b | 49 46 7d 7b 72 69 67 68 | \begin{|IF}{righ|
|00001420| 74 5b 78 5d 20 5c 6e 65 | 71 20 5c 4e 49 4c 7d 0a |t[x] \ne|q \NIL}.|
|00001430| 25 20 20 20 20 20 5c 52 | 45 54 55 52 4e 20 0a 25 |% \R|ETURN .%|
|00001440| 20 20 20 20 20 20 20 20 | 5c 43 41 4c 4c 7b 54 72 | |\CALL{Tr|
|00001450| 65 65 2d 4d 69 6e 7d 28 | 72 69 67 68 74 5b 78 5d |ee-Min}(|right[x]|
|00001460| 29 0a 25 20 20 20 5c 65 | 6e 64 7b 49 46 7d 20 5c |).% \e|nd{IF} \|
|00001470| 5c 0a 25 20 20 20 79 20 | 5c 3d 20 70 5b 78 5d 20 |\.% y |\= p[x] |
|00001480| 5c 5c 0a 25 20 20 20 5c | 62 65 67 69 6e 7b 57 48 |\\.% \|begin{WH|
|00001490| 49 4c 45 7d 0a 25 20 20 | 20 20 20 20 7b 79 20 5c |ILE}.% | {y \|
|000014a0| 6e 65 71 20 5c 4e 49 4c | 20 5c 74 65 78 74 7b 61 |neq \NIL| \text{a|
|000014b0| 6e 64 7d 20 78 3d 72 69 | 67 68 74 5b 79 5d 7d 0a |nd} x=ri|ght[y]}.|
|000014c0| 25 20 20 20 20 20 78 20 | 5c 3d 20 79 20 5c 5c 0a |% x |\= y \\.|
|000014d0| 25 20 20 20 20 20 79 20 | 5c 3d 20 70 5b 79 5d 0a |% y |\= p[y].|
|000014e0| 25 20 20 20 5c 65 6e 64 | 7b 57 48 49 4c 45 7d 20 |% \end|{WHILE} |
|000014f0| 5c 5c 0a 25 20 20 20 5c | 52 45 54 55 52 4e 20 79 |\\.% \|RETURN y|
|00001500| 0a 25 20 5c 65 6e 64 7b | 61 6c 67 6f 72 69 74 68 |.% \end{|algorith|
|00001510| 6d 7d 0a 25 20 5c 65 6e | 64 7b 76 65 72 62 61 74 |m}.% \en|d{verbat|
|00001520| 69 6d 7d 0a 25 20 7d 5c | 5d 0a 25 0a 25 20 5c 44 |im}.% }\|].%.% \D|
|00001530| 65 73 63 72 69 62 65 45 | 6e 76 7b 52 45 50 45 41 |escribeE|nv{REPEA|
|00001540| 54 7d 0a 25 20 55 73 65 | 20 74 68 65 20 5c 74 65 |T}.% Use| the \te|
|00001550| 78 74 73 66 7b 52 45 50 | 45 41 54 7d 20 65 6e 76 |xtsf{REP|EAT} env|
|00001560| 69 72 6f 6e 6d 65 6e 74 | 20 74 6f 20 66 6f 72 6d |ironment| to form|
|00001570| 61 74 20 61 20 72 65 70 | 65 61 74 2d 75 6e 74 69 |at a rep|eat-unti|
|00001580| 6c 20 6c 6f 6f 70 2e 0a | 25 20 54 68 65 20 65 6e |l loop..|% The en|
|00001590| 76 69 72 6f 6e 6d 65 6e | 74 20 74 61 6b 65 73 20 |vironmen|t takes |
|000015a0| 6e 6f 20 61 72 67 75 6d | 65 6e 74 73 2e 20 20 54 |no argum|ents. T|
|000015b0| 68 65 20 63 6f 6e 64 69 | 74 69 6f 6e 20 66 6f 72 |he condi|tion for|
|000015c0| 20 74 68 65 20 6c 6f 6f | 70 20 73 68 6f 75 6c 64 | the loo|p should|
|000015d0| 0a 25 20 62 65 20 67 69 | 76 65 6e 20 61 66 74 65 |.% be gi|ven afte|
|000015e0| 72 20 74 68 65 20 7c 5c | 65 6e 64 7b 52 45 50 45 |r the |\|end{REPE|
|000015f0| 41 54 7d 7c 20 6c 69 6e | 65 2e 20 20 48 65 72 65 |AT}| lin|e. Here|
|00001600| 20 69 73 20 61 6e 20 65 | 78 61 6d 70 6c 65 20 75 | is an e|xample u|
|00001610| 73 61 67 65 2e 0a 25 0a | 25 20 5c 5b 0a 25 20 5c |sage..%.|% \[.% \|
|00001620| 70 61 72 62 6f 78 7b 32 | 2e 30 69 6e 7d 7b 5c 68 |parbox{2|.0in}{\h|
|00001630| 62 61 64 6e 65 73 73 32 | 30 30 30 0a 25 20 5c 62 |badness2|000.% \b|
|00001640| 65 67 69 6e 7b 61 6c 67 | 6f 72 69 74 68 6d 7d 7b |egin{alg|orithm}{|
|00001650| 48 61 73 68 2d 53 65 61 | 72 63 68 7d 7b 54 2c 6b |Hash-Sea|rch}{T,k|
|00001660| 7d 0a 25 20 20 20 69 20 | 5c 3d 20 30 20 5c 5c 0a |}.% i |\= 0 \\.|
|00001670| 25 20 20 20 5c 62 65 67 | 69 6e 7b 52 45 50 45 41 |% \beg|in{REPEA|
|00001680| 54 7d 0a 25 20 20 20 20 | 20 6a 20 5c 3d 20 68 28 |T}.% | j \= h(|
|00001690| 6b 2c 69 29 20 5c 5c 0a | 25 20 20 20 20 20 5c 62 |k,i) \\.|% \b|
|000016a0| 65 67 69 6e 7b 49 46 7d | 7b 54 5b 6a 5d 20 3d 20 |egin{IF}|{T[j] = |
|000016b0| 6b 7d 0a 25 20 20 20 20 | 20 20 20 5c 52 45 54 55 |k}.% | \RETU|
|000016c0| 52 4e 20 6a 0a 25 20 20 | 20 20 20 5c 65 6e 64 7b |RN j.% | \end{|
|000016d0| 49 46 7d 20 5c 5c 0a 25 | 20 20 20 20 20 69 20 5c |IF} \\.%| i \|
|000016e0| 3d 20 69 2b 31 0a 25 20 | 20 20 5c 65 6e 64 7b 52 |= i+1.% | \end{R|
|000016f0| 45 50 45 41 54 7d 20 54 | 5b 6a 5d 3d 5c 4e 49 4c |EPEAT} T|[j]=\NIL|
|00001700| 5c 74 65 78 74 7b 6f 72 | 7d 20 69 3d 6d 20 5c 5c |\text{or|} i=m \\|
|00001710| 0a 25 20 20 20 5c 52 45 | 54 55 52 4e 20 5c 4e 49 |.% \RE|TURN \NI|
|00001720| 4c 0a 25 20 5c 65 6e 64 | 7b 61 6c 67 6f 72 69 74 |L.% \end|{algorit|
|00001730| 68 6d 7d 7d 0a 25 20 5c | 68 73 70 61 63 65 7b 31 |hm}}.% \|hspace{1|
|00001740| 30 70 74 7d 0a 25 20 5c | 76 63 65 6e 74 65 72 7b |0pt}.% \|vcenter{|
|00001750| 5c 68 73 69 7a 65 3d 32 | 2e 34 69 6e 0a 25 20 5c |\hsize=2|.4in.% \|
|00001760| 62 65 67 69 6e 7b 76 65 | 72 62 61 74 69 6d 7d 0a |begin{ve|rbatim}.|
|00001770| 25 20 5c 62 65 67 69 6e | 7b 61 6c 67 6f 72 69 74 |% \begin|{algorit|
|00001780| 68 6d 7d 7b 48 61 73 68 | 2d 53 65 61 72 63 68 7d |hm}{Hash|-Search}|
|00001790| 7b 54 2c 6b 7d 0a 25 20 | 20 20 69 20 5c 3d 20 30 |{T,k}.% | i \= 0|
|000017a0| 20 5c 5c 0a 25 20 20 20 | 5c 62 65 67 69 6e 7b 52 | \\.% |\begin{R|
|000017b0| 45 50 45 41 54 7d 0a 25 | 20 20 20 20 20 6a 20 5c |EPEAT}.%| j \|
|000017c0| 3d 20 68 28 6b 2c 69 29 | 20 5c 5c 0a 25 20 20 20 |= h(k,i)| \\.% |
|000017d0| 20 20 5c 62 65 67 69 6e | 7b 49 46 7d 7b 54 5b 6a | \begin|{IF}{T[j|
|000017e0| 5d 20 3d 20 6b 7d 0a 25 | 20 20 20 20 20 20 20 5c |] = k}.%| \|
|000017f0| 52 45 54 55 52 4e 20 6a | 0a 25 20 20 20 20 20 5c |RETURN j|.% \|
|00001800| 65 6e 64 7b 49 46 7d 20 | 5c 5c 0a 25 20 20 20 20 |end{IF} |\\.% |
|00001810| 20 69 20 5c 3d 20 69 2b | 31 0a 25 20 20 20 5c 65 | i \= i+|1.% \e|
|00001820| 6e 64 7b 52 45 50 45 41 | 54 7d 20 54 5b 6a 5d 3d |nd{REPEA|T} T[j]=|
|00001830| 5c 4e 49 4c 5c 74 65 78 | 74 7b 6f 72 7d 20 69 3d |\NIL\tex|t{or} i=|
|00001840| 6d 20 5c 5c 0a 25 20 20 | 20 5c 52 45 54 55 52 4e |m \\.% | \RETURN|
|00001850| 20 5c 4e 49 4c 0a 25 20 | 5c 65 6e 64 7b 61 6c 67 | \NIL.% |\end{alg|
|00001860| 6f 72 69 74 68 6d 7d 0a | 25 20 5c 65 6e 64 7b 76 |orithm}.|% \end{v|
|00001870| 65 72 62 61 74 69 6d 7d | 0a 25 20 7d 5c 5d 0a 25 |erbatim}|.% }\].%|
|00001880| 0a 25 20 5c 44 65 73 63 | 72 69 62 65 45 6e 76 7b |.% \Desc|ribeEnv{|
|00001890| 53 57 49 54 43 48 7d 0a | 25 20 55 73 65 20 74 68 |SWITCH}.|% Use th|
|000018a0| 65 20 5c 74 65 78 74 73 | 66 7b 53 57 49 43 48 7d |e \texts|f{SWICH}|
|000018b0| 20 65 6e 76 69 72 6f 6e | 6d 65 6e 74 20 74 6f 20 | environ|ment to |
|000018c0| 66 6f 72 6d 61 74 20 61 | 20 76 65 72 79 20 67 65 |format a| very ge|
|000018d0| 6e 65 72 61 6c 20 73 77 | 69 74 63 68 0a 25 20 73 |neral sw|itch.% s|
|000018e0| 74 61 74 65 6d 65 6e 74 | 2e 20 20 54 68 65 20 65 |tatement|. The e|
|000018f0| 6e 76 69 72 6f 6e 6d 65 | 6e 74 20 69 73 20 6c 69 |nvironme|nt is li|
|00001900| 6b 65 20 61 6e 20 69 74 | 65 6d 69 7a 65 20 65 6e |ke an it|emize en|
|00001910| 76 69 72 6f 6e 6d 65 6e | 74 2e 20 20 55 73 65 20 |vironmen|t. Use |
|00001920| 74 68 65 0a 25 20 63 6f | 6d 6d 61 6e 64 20 7c 5c |the.% co|mmand |\|
|00001930| 69 74 65 6d 7b 3c 63 6f | 6e 64 69 74 69 6f 6e 3e |item{<co|ndition>|
|00001940| 7d 7c 20 74 6f 20 63 72 | 65 61 74 65 20 61 20 6e |}| to cr|eate a n|
|00001950| 65 77 20 63 61 73 65 20 | 6c 61 62 65 6c 2e 20 20 |ew case |label. |
|00001960| 54 68 65 0a 25 20 63 6f | 6e 64 69 74 69 6f 6e 73 |The.% co|nditions|
|00001970| 20 63 61 6e 20 62 65 20 | 61 6e 79 74 68 69 6e 67 | can be |anything|
|00001980| 2c 20 61 6e 64 20 64 6f | 6e 27 74 20 61 6c 6c 20 |, and do|n't all |
|00001990| 68 61 76 65 20 74 6f 20 | 74 65 73 74 20 74 68 65 |have to |test the|
|000019a0| 20 73 61 6d 65 0a 25 20 | 76 61 72 69 61 62 6c 65 | same.% |variable|
|000019b0| 2e 20 20 54 68 69 73 20 | 69 73 20 74 68 65 20 6d |. This |is the m|
|000019c0| 6f 73 74 20 67 65 6e 65 | 72 61 6c 20 73 77 69 74 |ost gene|ral swit|
|000019d0| 63 68 20 73 74 61 74 65 | 6d 65 6e 74 2e 20 20 54 |ch state|ment. T|
|000019e0| 68 65 20 66 6f 72 6d 61 | 74 74 69 6e 67 0a 25 20 |he forma|tting.% |
|000019f0| 63 6f 6e 76 65 6e 74 69 | 6f 6e 73 20 73 68 6f 77 |conventi|ons show|
|00001a00| 20 74 68 61 74 20 74 68 | 65 20 66 69 72 73 74 20 | that th|e first |
|00001a10| 63 61 73 65 20 63 6f 6e | 64 69 74 69 6f 6e 20 74 |case con|dition t|
|00001a20| 6f 20 6d 61 74 63 68 20 | 77 69 6c 6c 20 62 65 0a |o match |will be.|
|00001a30| 25 20 65 78 65 63 75 74 | 65 64 2e 20 20 54 68 65 |% execut|ed. The|
|00001a40| 20 74 65 78 74 20 7c 5c | 44 45 46 41 55 4c 54 7c | text |\|DEFAULT||
|00001a50| 20 6d 61 79 20 62 65 20 | 75 73 65 64 20 66 6f 72 | may be |used for|
|00001a60| 20 74 68 65 20 63 6f 6e | 64 69 74 69 6f 6e 20 74 | the con|dition t|
|00001a70| 6f 0a 25 20 70 72 6f 76 | 69 64 65 20 61 20 64 65 |o.% prov|ide a de|
|00001a80| 66 61 75 6c 74 20 61 63 | 74 69 6f 6e 2e 20 20 48 |fault ac|tion. H|
|00001a90| 65 72 65 20 69 73 20 61 | 6e 20 65 78 61 6d 70 6c |ere is a|n exampl|
|00001aa0| 65 20 75 73 61 67 65 2e | 0a 25 0a 25 20 5c 5b 0a |e usage.|.%.% \[.|
|00001ab0| 25 20 5c 70 61 72 62 6f | 78 7b 32 2e 30 69 6e 7d |% \parbo|x{2.0in}|
|00001ac0| 7b 5c 68 62 61 64 6e 65 | 73 73 32 30 30 30 0a 25 |{\hbadne|ss2000.%|
|00001ad0| 20 5c 62 65 67 69 6e 7b | 61 6c 67 6f 72 69 74 68 | \begin{|algorith|
|00001ae0| 6d 7d 7b 53 65 6c 65 63 | 74 7d 7b 78 2c 20 69 7d |m}{Selec|t}{x, i}|
|00001af0| 0a 25 20 20 20 72 20 5c | 3d 20 73 69 7a 65 5b 6c |.% r \|= size[l|
|00001b00| 65 66 74 5b 78 5d 5d 20 | 2b 20 31 20 5c 5c 0a 25 |eft[x]] |+ 1 \\.%|
|00001b10| 20 20 20 5c 62 65 67 69 | 6e 7b 53 57 49 54 43 48 | \begi|n{SWITCH|
|00001b20| 7d 0a 25 20 20 20 5c 69 | 74 65 6d 7b 69 20 3d 20 |}.% \i|tem{i = |
|00001b30| 72 7d 20 5c 5c 0a 25 20 | 20 20 20 20 5c 52 45 54 |r} \\.% | \RET|
|00001b40| 55 52 4e 20 78 0a 25 20 | 20 20 5c 69 74 65 6d 7b |URN x.% | \item{|
|00001b50| 69 20 3c 20 72 7d 20 5c | 5c 0a 25 20 20 20 20 20 |i < r} \|\.% |
|00001b60| 5c 52 45 54 55 52 4e 20 | 0a 25 20 20 20 20 20 5c |\RETURN |.% \|
|00001b70| 43 41 4c 4c 7b 53 65 6c | 65 63 74 7d 28 6c 65 66 |CALL{Sel|ect}(lef|
|00001b80| 74 5b 78 5d 2c 20 69 29 | 0a 25 20 20 20 5c 69 74 |t[x], i)|.% \it|
|00001b90| 65 6d 7b 5c 44 45 46 41 | 55 4c 54 7d 20 5c 5c 0a |em{\DEFA|ULT} \\.|
|00001ba0| 25 20 20 20 20 20 5c 52 | 45 54 55 52 4e 20 0a 25 |% \R|ETURN .%|
|00001bb0| 20 20 20 20 20 5c 43 41 | 4c 4c 7b 53 65 6c 65 63 | \CA|LL{Selec|
|00001bc0| 74 7d 28 72 69 67 68 74 | 5b 78 5d 2c 20 69 20 2d |t}(right|[x], i -|
|00001bd0| 20 72 29 0a 25 20 20 20 | 5c 65 6e 64 7b 53 57 49 | r).% |\end{SWI|
|00001be0| 54 43 48 7d 0a 25 20 5c | 65 6e 64 7b 61 6c 67 6f |TCH}.% \|end{algo|
|00001bf0| 72 69 74 68 6d 7d 7d 0a | 25 20 5c 68 73 70 61 63 |rithm}}.|% \hspac|
|00001c00| 65 7b 31 30 70 74 7d 0a | 25 20 5c 76 63 65 6e 74 |e{10pt}.|% \vcent|
|00001c10| 65 72 7b 5c 68 73 69 7a | 65 3d 32 2e 34 69 6e 0a |er{\hsiz|e=2.4in.|
|00001c20| 25 20 5c 62 65 67 69 6e | 7b 76 65 72 62 61 74 69 |% \begin|{verbati|
|00001c30| 6d 7d 0a 25 20 5c 62 65 | 67 69 6e 7b 61 6c 67 6f |m}.% \be|gin{algo|
|00001c40| 72 69 74 68 6d 7d 7b 53 | 65 6c 65 63 74 7d 28 78 |rithm}{S|elect}(x|
|00001c50| 2c 20 69 29 0a 25 20 20 | 20 72 20 5c 3d 20 73 69 |, i).% | r \= si|
|00001c60| 7a 65 5b 6c 65 66 74 5b | 78 5d 5d 20 2b 20 31 20 |ze[left[|x]] + 1 |
|00001c70| 5c 5c 0a 25 20 20 20 5c | 62 65 67 69 6e 7b 53 57 |\\.% \|begin{SW|
|00001c80| 49 54 43 48 7d 0a 25 20 | 20 20 5c 69 74 65 6d 7b |ITCH}.% | \item{|
|00001c90| 69 20 3d 20 72 7d 20 5c | 5c 0a 25 20 20 20 20 20 |i = r} \|\.% |
|00001ca0| 5c 52 45 54 55 52 4e 20 | 78 0a 25 20 20 20 5c 69 |\RETURN |x.% \i|
|00001cb0| 74 65 6d 7b 69 20 3c 20 | 72 7d 20 5c 5c 0a 25 20 |tem{i < |r} \\.% |
|00001cc0| 20 20 20 20 5c 52 45 54 | 55 52 4e 20 0a 25 20 20 | \RET|URN .% |
|00001cd0| 20 20 20 5c 43 41 4c 4c | 7b 53 65 6c 65 63 74 7d | \CALL|{Select}|
|00001ce0| 28 6c 65 66 74 5b 78 5d | 2c 20 69 29 0a 25 20 20 |(left[x]|, i).% |
|00001cf0| 20 5c 69 74 65 6d 7b 5c | 44 45 46 41 55 4c 54 7d | \item{\|DEFAULT}|
|00001d00| 20 5c 5c 0a 25 20 20 20 | 20 20 5c 52 45 54 55 52 | \\.% | \RETUR|
|00001d10| 4e 20 0a 25 20 20 20 20 | 20 5c 43 41 4c 4c 7b 53 |N .% | \CALL{S|
|00001d20| 65 6c 65 63 74 7d 28 72 | 69 67 68 74 5b 78 5d 2c |elect}(r|ight[x],|
|00001d30| 20 69 20 2d 20 72 29 0a | 25 20 20 20 5c 65 6e 64 | i - r).|% \end|
|00001d40| 7b 53 57 49 54 43 48 7d | 0a 25 20 5c 65 6e 64 7b |{SWITCH}|.% \end{|
|00001d50| 61 6c 67 6f 72 69 74 68 | 6d 7d 0a 25 20 5c 65 6e |algorith|m}.% \en|
|00001d60| 64 7b 76 65 72 62 61 74 | 69 6d 7d 0a 25 20 7d 5c |d{verbat|im}.% }\|
|00001d70| 5d 0a 25 0a 25 20 5c 73 | 75 62 73 65 63 74 69 6f |].%.% \s|ubsectio|
|00001d80| 6e 7b 4d 61 63 72 6f 73 | 7d 0a 25 0a 25 20 5c 44 |n{Macros|}.%.% \D|
|00001d90| 65 73 63 72 69 62 65 4d | 61 63 72 6f 7b 43 41 4c |escribeM|acro{CAL|
|00001da0| 4c 7d 0a 25 20 55 73 65 | 20 74 68 65 20 5c 74 65 |L}.% Use| the \te|
|00001db0| 78 74 73 66 7b 43 41 4c | 4c 7d 20 6d 61 63 72 6f |xtsf{CAL|L} macro|
|00001dc0| 20 74 6f 20 66 6f 72 6d | 61 74 20 61 20 66 75 6e | to form|at a fun|
|00001dd0| 63 74 69 6f 6e 20 63 61 | 6c 6c 2e 20 20 54 68 65 |ction ca|ll. The|
|00001de0| 20 6d 61 63 72 6f 0a 25 | 20 74 61 6b 65 73 20 6f | macro.%| takes o|
|00001df0| 6e 65 20 61 72 67 75 6d | 65 6e 74 2e 20 20 54 68 |ne argum|ent. Th|
|00001e00| 65 20 61 72 67 75 6d 65 | 6e 74 20 69 73 20 74 68 |e argume|nt is th|
|00001e10| 65 20 6e 61 6d 65 20 6f | 66 20 74 68 65 20 66 75 |e name o|f the fu|
|00001e20| 6e 63 74 69 6f 6e 0a 25 | 20 74 6f 20 63 61 6c 6c |nction.%| to call|
|00001e30| 2e 20 49 74 20 69 73 20 | 75 73 75 61 6c 6c 79 20 |. It is |usually |
|00001e40| 66 6f 6c 6c 6f 77 65 64 | 20 62 79 20 74 68 65 20 |followed| by the |
|00001e50| 70 61 72 61 6d 65 74 65 | 73 20 74 6f 20 74 68 65 |paramete|s to the|
|00001e60| 20 66 75 6e 63 74 69 6f | 6e 20 63 61 6c 6c 2e 0a | functio|n call..|
|00001e70| 25 20 46 6f 72 20 65 78 | 61 6d 70 6c 65 2c 20 60 |% For ex|ample, `|
|00001e80| 60 7c 5c 43 41 4c 4c 7b | 53 6f 72 74 2d 41 72 72 |`|\CALL{|Sort-Arr|
|00001e90| 61 79 7d 28 61 72 72 61 | 79 2c 20 6c 65 6e 67 74 |ay}(arra|y, lengt|
|00001ea0| 68 29 7c 27 27 2e 0a 25 | 0a 25 20 5c 44 65 73 63 |h)|''..%|.% \Desc|
|00001eb0| 72 69 62 65 4d 61 63 72 | 6f 7b 45 52 52 4f 52 7d |ribeMacr|o{ERROR}|
|00001ec0| 0a 25 20 55 73 65 20 74 | 68 65 20 5c 74 65 78 74 |.% Use t|he \text|
|00001ed0| 73 66 7b 43 41 4c 4c 7d | 20 6d 61 63 72 6f 20 74 |sf{CALL}| macro t|
|00001ee0| 6f 20 73 69 67 6e 61 6c | 20 74 68 61 74 20 73 6f |o signal| that so|
|00001ef0| 6d 65 20 73 6f 72 74 20 | 6f 66 20 65 72 72 6f 72 |me sort |of error|
|00001f00| 20 68 61 73 0a 25 20 6f | 63 63 75 72 65 64 2e 20 | has.% o|ccured. |
|00001f10| 20 54 68 65 20 6d 61 63 | 72 6f 20 74 61 6b 65 73 | The mac|ro takes|
|00001f20| 20 6f 6e 65 20 61 72 67 | 75 6d 65 6e 74 20 74 68 | one arg|ument th|
|00001f30| 61 74 20 74 68 65 20 72 | 65 61 73 6f 6e 20 66 6f |at the r|eason fo|
|00001f40| 72 20 74 68 65 20 65 72 | 72 6f 72 2e 0a 25 20 54 |r the er|ror..% T|
|00001f50| 68 65 20 74 65 78 74 20 | 77 69 6c 6c 20 62 65 20 |he text |will be |
|00001f60| 66 6f 72 6d 61 74 74 65 | 64 20 69 6e 20 74 65 78 |formatte|d in tex|
|00001f70| 74 20 6d 6f 64 65 20 28 | 6e 6f 74 20 6d 61 74 68 |t mode (|not math|
|00001f80| 20 6d 6f 64 65 29 20 61 | 6e 64 20 77 69 6c 6c 20 | mode) a|nd will |
|00001f90| 62 65 0a 25 20 73 75 72 | 72 6f 75 6e 64 65 64 20 |be.% sur|rounded |
|00001fa0| 62 79 20 71 75 6f 74 61 | 74 69 6f 6e 20 6d 61 72 |by quota|tion mar|
|00001fb0| 6b 73 2e 0a 25 0a 25 20 | 5c 44 65 73 63 72 69 62 |ks..%.% |\Describ|
|00001fc0| 65 4d 61 63 72 6f 7b 61 | 6c 67 6b 65 79 7d 0a 25 |eMacro{a|lgkey}.%|
|00001fd0| 20 55 73 65 20 74 68 65 | 20 5c 74 65 78 74 73 66 | Use the| \textsf|
|00001fe0| 7b 61 6c 67 6b 65 79 7d | 20 74 6f 20 66 6f 72 6d |{algkey}| to form|
|00001ff0| 61 74 20 6b 65 79 20 77 | 6f 72 64 73 2e 20 20 49 |at key w|ords. I|
|00002000| 66 20 74 68 69 73 20 70 | 61 63 6b 61 67 65 20 64 |f this p|ackage d|
|00002010| 6f 65 73 20 6e 6f 74 0a | 25 20 64 65 66 69 6e 65 |oes not.|% define|
|00002020| 20 61 20 6b 65 79 77 6f | 72 64 20 74 68 61 74 20 | a keywo|rd that |
|00002030| 79 6f 75 20 77 61 6e 74 | 20 74 6f 20 75 73 65 2c |you want| to use,|
|00002040| 20 74 68 65 6e 20 74 68 | 69 73 20 6d 61 63 72 6f | then th|is macro|
|00002050| 20 69 73 20 75 73 65 64 | 20 74 6f 0a 25 20 66 6f | is used| to.% fo|
|00002060| 72 6d 61 74 20 79 6f 75 | 72 20 6b 65 79 77 6f 72 |rmat you|r keywor|
|00002070| 64 20 6c 69 6b 65 20 74 | 68 65 20 6f 74 68 65 72 |d like t|he other|
|00002080| 20 6b 65 79 77 6f 72 64 | 73 2e 0a 25 0a 25 20 5c | keyword|s..%.% \|
|00002090| 73 75 62 73 65 63 74 69 | 6f 6e 7b 41 64 64 69 74 |subsecti|on{Addit|
|000020a0| 69 6f 6e 61 6c 20 6b 65 | 79 77 6f 72 64 73 20 61 |ional ke|ywords a|
|000020b0| 6e 64 20 73 79 6d 62 6f | 6c 73 7d 0a 25 0a 25 20 |nd symbo|ls}.%.% |
|000020c0| 5c 44 65 73 63 72 69 62 | 65 4d 61 63 72 6f 7b 52 |\Describ|eMacro{R|
|000020d0| 45 54 55 52 4e 7d 0a 25 | 20 55 73 65 20 74 68 65 |ETURN}.%| Use the|
|000020e0| 20 5c 74 65 78 74 73 66 | 7b 52 45 54 55 52 4e 7d | \textsf|{RETURN}|
|000020f0| 20 6d 61 63 72 6f 20 74 | 6f 20 70 72 69 6e 74 20 | macro t|o print |
|00002100| 6f 75 74 20 74 68 65 20 | 72 65 74 75 72 6e 20 6b |out the |return k|
|00002110| 65 79 77 6f 72 64 2e 0a | 25 20 55 73 75 61 6c 6c |eyword..|% Usuall|
|00002120| 79 20 74 68 69 73 20 6d | 61 63 72 6f 20 69 73 20 |y this m|acro is |
|00002130| 66 6f 6c 6c 6f 77 65 64 | 20 62 79 20 69 6e 66 6f |followed| by info|
|00002140| 72 6d 61 74 69 6f 6e 20 | 74 68 61 74 20 69 73 20 |rmation |that is |
|00002150| 74 6f 20 62 65 20 72 65 | 74 75 72 6e 65 64 0a 25 |to be re|turned.%|
|00002160| 20 66 72 6f 6d 20 74 68 | 65 20 61 6c 67 6f 72 69 | from th|e algori|
|00002170| 74 68 6d 20 62 75 74 20 | 74 68 69 73 20 69 73 20 |thm but |this is |
|00002180| 6e 6f 74 20 61 6e 20 61 | 72 67 75 6d 65 6e 74 20 |not an a|rgument |
|00002190| 74 6f 20 74 68 65 20 6d | 61 63 72 6f 2e 0a 25 0a |to the m|acro..%.|
|000021a0| 25 20 5c 44 65 73 63 72 | 69 62 65 4d 61 63 72 6f |% \Descr|ibeMacro|
|000021b0| 7b 4e 49 4c 7d 0a 25 20 | 55 73 65 20 74 68 65 20 |{NIL}.% |Use the |
|000021c0| 5c 74 65 78 74 73 66 7b | 4e 49 4c 7d 20 6d 61 63 |\textsf{|NIL} mac|
|000021d0| 72 6f 20 74 6f 20 70 72 | 69 6e 74 20 74 68 65 20 |ro to pr|int the |
|000021e0| 6e 69 6c 20 6b 65 79 77 | 6f 72 64 2e 20 20 54 68 |nil keyw|ord. Th|
|000021f0| 69 73 20 6b 65 79 77 6f | 64 20 69 73 0a 25 20 75 |is keywo|d is.% u|
|00002200| 73 65 64 20 74 6f 20 72 | 65 70 72 65 73 65 6e 74 |sed to r|epresent|
|00002210| 20 61 20 76 61 72 69 61 | 62 6c 65 20 74 68 61 74 | a varia|ble that|
|00002220| 20 68 61 73 20 6e 6f 20 | 76 61 6c 75 65 20 61 73 | has no |value as|
|00002230| 73 69 6e 67 65 64 2e 0a | 25 20 5c 44 65 73 63 72 |singed..|% \Descr|
|00002240| 69 62 65 4d 61 63 72 6f | 7b 5c 3d 7d 0a 25 20 55 |ibeMacro|{\=}.% U|
|00002250| 73 65 20 74 68 65 20 74 | 65 78 74 20 7c 5c 3d 7c |se the t|ext |\=||
|00002260| 20 74 6f 20 73 69 67 6e | 61 6c 20 61 73 73 69 6e | to sign|al assin|
|00002270| 6d 65 6e 74 2e 20 20 54 | 68 69 73 20 63 6f 6d 6d |ment. T|his comm|
|00002280| 61 6e 64 20 70 72 6f 64 | 75 63 65 73 20 74 68 69 |and prod|uces thi|
|00002290| 73 0a 25 20 73 79 6d 62 | 6f 6c 20 69 6e 20 74 68 |s.% symb|ol in th|
|000022a0| 65 20 66 6f 72 6d 61 74 | 74 65 64 20 74 65 78 74 |e format|ted text|
|000022b0| 2c 20 60 60 24 5c 6c 65 | 66 74 61 72 72 6f 77 24 |, ``$\le|ftarrow$|
|000022c0| 27 27 2e 0a 25 0a 25 20 | 5c 73 65 63 74 69 6f 6e |''..%.% |\section|
|000022d0| 7b 46 75 74 75 72 65 20 | 57 6f 72 6b 7d 0a 25 0a |{Future |Work}.%.|
|000022e0| 25 20 54 68 65 20 63 75 | 72 72 65 6e 74 20 69 6d |% The cu|rrent im|
|000022f0| 70 6c 65 6d 65 6e 74 61 | 74 69 6f 6e 20 6f 66 20 |plementa|tion of |
|00002300| 74 68 65 20 5c 74 65 78 | 74 73 66 7b 61 6c 67 6f |the \tex|tsf{algo|
|00002310| 72 69 74 68 6d 7d 20 65 | 6e 76 69 72 6f 6e 6d 65 |rithm} e|nvironme|
|00002320| 6e 74 20 69 73 0a 25 20 | 73 65 6e 73 69 74 69 76 |nt is.% |sensitiv|
|00002330| 65 20 74 6f 20 74 68 65 | 20 70 72 6f 70 65 72 20 |e to the| proper |
|00002340| 70 6c 61 63 65 6d 65 6e | 74 20 6f 66 20 7c 5c 5c |placemen|t of |\\|
|00002350| 7c 20 69 6e 20 74 68 65 | 20 74 65 78 74 2e 20 20 || in the| text. |
|00002360| 53 65 65 20 74 68 65 0a | 25 20 65 78 61 6d 70 6c |See the.|% exampl|
|00002370| 65 73 20 66 6f 72 20 74 | 68 69 73 2e 20 20 54 68 |es for t|his. Th|
|00002380| 65 20 65 6e 76 69 72 6f | 6e 6d 65 6e 74 73 20 73 |e enviro|nments s|
|00002390| 68 6f 75 6c 64 20 77 6f | 72 6b 20 77 69 74 68 6f |hould wo|rk witho|
|000023a0| 75 74 20 62 65 69 6e 67 | 20 73 6f 0a 25 20 66 75 |ut being| so.% fu|
|000023b0| 73 73 79 20 6f 6e 20 74 | 68 69 73 20 70 6f 69 6e |ssy on t|his poin|
|000023c0| 74 2e 20 20 28 53 6f 6d | 65 74 69 6d 65 20 79 6f |t. (Som|etime yo|
|000023d0| 75 20 6e 65 65 64 20 61 | 20 7c 5c 5c 7c 20 61 74 |u need a| |\\| at|
|000023e0| 20 74 68 65 20 65 6e 64 | 20 6f 66 20 61 6e 64 0a | the end| of and.|
|000023f0| 25 20 65 6e 76 69 72 6f | 6e 6d 65 6e 74 2c 20 73 |% enviro|nment, s|
|00002400| 6f 6d 65 74 69 6d 65 73 | 20 79 6f 75 20 64 6f 6e |ometimes| you don|
|00002410| 27 74 29 2e 0a 25 20 0a | 25 20 49 20 77 6f 75 6c |'t)..% .|% I woul|
|00002420| 64 20 6c 69 6b 65 20 74 | 68 65 20 73 79 6e 74 61 |d like t|he synta|
|00002430| 78 20 6f 66 20 74 68 65 | 20 72 65 70 65 61 74 20 |x of the| repeat |
|00002440| 6c 6f 6f 70 20 74 6f 20 | 62 65 20 74 68 65 20 73 |loop to |be the s|
|00002450| 61 6d 65 20 61 73 20 74 | 68 65 20 77 68 69 6c 65 |ame as t|he while|
|00002460| 0a 25 20 6c 6f 6f 70 2e | 20 20 49 20 77 61 73 20 |.% loop.| I was |
|00002470| 68 61 76 69 6e 67 20 73 | 6f 6d 65 20 74 72 6f 75 |having s|ome trou|
|00002480| 62 6c 65 20 67 65 74 74 | 69 6e 67 20 74 68 65 20 |ble gett|ing the |
|00002490| 73 74 61 63 6b 20 63 6f | 6d 6d 61 6e 64 73 20 74 |stack co|mmands t|
|000024a0| 6f 20 77 6f 72 6b 2c 0a | 25 20 73 6f 20 74 68 61 |o work,.|% so tha|
|000024b0| 74 20 49 20 63 6f 75 6c | 64 20 73 61 76 65 20 6f |t I coul|d save o|
|000024c0| 66 20 74 68 65 20 61 72 | 67 75 6d 65 6e 74 2e 20 |f the ar|gument. |
|000024d0| 20 54 68 69 73 20 65 6e | 76 69 72 6f 6e 6d 65 6e | This en|vironmen|
|000024e0| 74 20 69 73 20 6e 6f 74 | 20 76 65 72 79 0a 25 20 |t is not| very.% |
|000024f0| 63 6f 6e 73 69 73 74 65 | 6e 74 20 77 69 74 68 20 |consiste|nt with |
|00002500| 74 68 65 20 72 65 73 74 | 20 6f 66 20 74 68 65 20 |the rest| of the |
|00002510| 61 6c 67 6f 72 69 74 68 | 6d 20 65 6e 76 69 72 6f |algorith|m enviro|
|00002520| 6e 6d 65 6e 74 73 2e 0a | 25 0a 25 20 54 68 65 72 |nments..|%.% Ther|
|00002530| 65 20 69 73 20 70 72 6f | 62 61 62 6c 79 20 61 20 |e is pro|bably a |
|00002540| 62 65 74 74 65 72 20 77 | 61 79 20 74 6f 20 64 6f |better w|ay to do|
|00002550| 20 74 68 65 20 66 6f 72 | 6d 61 74 74 69 6e 67 20 | the for|matting |
|00002560| 74 68 65 6e 20 75 73 69 | 6e 67 20 74 68 65 0a 25 |then usi|ng the.%|
|00002570| 20 61 72 72 61 79 20 65 | 6e 76 69 72 6f 6e 6d 65 | array e|nvironme|
|00002580| 6e 74 2e 20 20 43 75 72 | 72 65 6e 74 6c 79 20 5c |nt. Cur|rently \|
|00002590| 4c 61 54 65 58 7b 7d 20 | 69 73 20 66 6f 72 6d 61 |LaTeX{} |is forma|
|000025a0| 74 74 69 6e 67 20 74 68 | 65 20 61 6c 67 6f 72 69 |tting th|e algori|
|000025b0| 74 68 6d 73 20 62 79 0a | 25 20 75 73 69 6e 67 20 |thms by.|% using |
|000025c0| 74 68 65 20 5c 74 65 78 | 74 73 66 7b 61 72 72 61 |the \tex|tsf{arra|
|000025d0| 79 7d 20 65 6e 76 69 72 | 6f 6e 6d 65 6e 74 2e 20 |y} envir|onment. |
|000025e0| 20 54 68 69 73 20 69 73 | 20 70 72 65 74 74 79 20 | This is| pretty |
|000025f0| 73 69 6c 6c 79 2c 20 62 | 65 63 61 75 73 65 0a 25 |silly, b|ecause.%|
|00002600| 20 74 68 69 73 20 69 73 | 20 6e 6f 74 20 72 65 61 | this is| not rea|
|00002610| 6c 6c 79 20 61 6e 20 61 | 72 72 61 79 2e 0a 25 0a |lly an a|rray..%.|
|00002620| 25 20 59 6f 75 20 63 61 | 6e 6e 6f 74 20 63 65 6e |% You ca|nnot cen|
|00002630| 74 65 72 20 74 68 65 20 | 61 6c 67 6f 72 69 74 68 |ter the |algorith|
|00002640| 6d 20 65 6e 76 69 72 6f | 6e 6d 65 6e 74 2e 20 20 |m enviro|nment. |
|00002650| 54 68 69 73 20 69 73 20 | 70 72 6f 62 61 62 6c 79 |This is |probably|
|00002660| 20 62 65 63 61 73 65 0a | 25 20 69 74 20 69 73 20 | becase.|% it is |
|00002670| 62 65 69 6e 67 20 69 6d | 70 6c 65 6d 65 6e 74 65 |being im|plemente|
|00002680| 64 20 61 73 20 61 6e 20 | 61 72 72 61 79 2e 20 20 |d as an |array. |
|00002690| 54 68 65 20 63 75 72 72 | 65 6e 74 20 77 6f 72 6b |The curr|ent work|
|000026a0| 61 72 6f 75 6e 64 20 66 | 6f 72 20 74 68 69 73 0a |around f|or this.|
|000026b0| 25 20 70 72 6f 62 6c 65 | 6d 20 69 73 20 74 6f 20 |% proble|m is to |
|000026c0| 69 6e 63 6c 75 64 65 20 | 74 68 65 20 61 6c 67 6f |include |the algo|
|000026d0| 72 69 74 68 6d 20 69 6e | 20 61 20 7c 5c 62 65 67 |rithm in| a |\beg|
|000026e0| 69 6e 7b 6d 69 6e 69 70 | 61 67 65 7d 7b 31 70 74 |in{minip|age}{1pt|
|000026f0| 7d 7c 0a 25 20 2e 2e 2e | 20 7c 5c 65 6e 64 7b 6d |}|.% ...| |\end{m|
|00002700| 69 6e 69 70 61 67 65 7d | 7c 2e 20 20 53 65 65 6d |inipage}||. Seem|
|00002710| 73 20 74 6f 20 77 6f 72 | 6b 20 69 6e 20 65 76 65 |s to wor|k in eve|
|00002720| 72 79 20 63 61 73 65 20 | 74 68 61 74 20 49 20 68 |ry case |that I h|
|00002730| 61 76 65 20 63 6f 6d 65 | 0a 25 20 61 63 63 72 6f |ave come|.% accro|
|00002740| 73 73 2e 0a 25 0a 25 20 | 54 68 65 72 65 20 69 73 |ss..%.% |There is|
|00002750| 20 70 72 6f 62 61 62 6c | 79 20 61 20 62 65 74 74 | probabl|y a bett|
|00002760| 65 72 20 77 61 79 20 74 | 6f 20 6d 61 6b 65 20 61 |er way t|o make a|
|00002770| 20 6d 6f 64 65 20 74 68 | 61 74 20 69 73 20 6c 69 | mode th|at is li|
|00002780| 6b 65 20 6d 61 74 68 20 | 6d 6f 64 65 0a 25 20 74 |ke math |mode.% t|
|00002790| 68 61 74 20 64 6f 65 73 | 20 6e 6f 74 20 69 6e 73 |hat does| not ins|
|000027a0| 65 72 74 20 7c 24 7c 20 | 63 68 61 72 61 63 74 65 |ert |$| |characte|
|000027b0| 72 73 20 65 76 65 72 79 | 77 68 65 72 65 2e 0a 25 |rs every|where..%|
|000027c0| 0a 25 20 49 20 61 6d 20 | 6e 6f 74 20 76 65 72 79 |.% I am |not very|
|000027d0| 20 65 78 70 65 72 69 65 | 6e 63 65 64 20 69 6e 20 | experie|nced in |
|000027e0| 77 72 69 74 69 6e 67 20 | 6d 6f 64 65 73 20 66 6f |writing |modes fo|
|000027f0| 72 20 5c 4c 61 54 65 58 | 7b 7d 2c 20 73 6f 20 69 |r \LaTeX|{}, so i|
|00002800| 66 20 79 6f 75 0a 25 20 | 68 61 76 65 20 61 6e 79 |f you.% |have any|
|00002810| 20 73 75 67 67 65 73 74 | 69 6f 6e 73 20 66 6f 72 | suggest|ions for|
|00002820| 20 69 6d 70 72 6f 76 65 | 6d 65 6e 74 73 20 6f 72 | improve|ments or|
|00002830| 20 6b 6e 6f 77 20 68 6f | 77 20 74 6f 20 73 6f 6c | know ho|w to sol|
|00002840| 76 65 20 61 6e 79 20 6f | 66 20 74 68 65 0a 25 20 |ve any o|f the.% |
|00002850| 61 62 6f 76 65 20 6c 69 | 73 74 65 64 20 70 72 6f |above li|sted pro|
|00002860| 62 6c 65 6d 73 2c 20 70 | 6c 65 61 73 65 20 73 65 |blems, p|lease se|
|00002870| 6e 64 20 6d 65 20 65 6d | 61 69 6c 2e 20 20 54 68 |nd me em|ail. Th|
|00002880| 65 20 61 64 64 72 65 73 | 73 20 69 73 20 6f 6e 20 |e addres|s is on |
|00002890| 74 68 65 0a 25 20 66 72 | 6f 6e 74 20 70 61 67 65 |the.% fr|ont page|
|000028a0| 20 6f 66 20 74 68 69 73 | 20 64 6f 63 75 6d 65 6e | of this| documen|
|000028b0| 74 2e 0a 0a 0a 5c 6e 65 | 77 62 6f 78 5c 61 6c 67 |t....\ne|wbox\alg|
|000028c0| 73 74 61 63 6b 20 0a 5c | 6e 65 77 62 6f 78 5c 61 |stack .\|newbox\a|
|000028d0| 6c 67 74 61 62 20 0a 5c | 6e 65 77 63 6f 75 6e 74 |lgtab .\|newcount|
|000028e0| 5c 61 6c 67 6c 69 6e 65 | 20 0a 5c 6e 65 77 74 6f |\algline| .\newto|
|000028f0| 6b 73 5c 61 6c 67 61 0a | 5c 6e 65 77 74 6f 6b 73 |ks\alga.|\newtoks|
|00002900| 5c 61 6c 67 62 0a 0a 0a | 5c 6e 65 77 69 66 5c 69 |\algb...|\newif\i|
|00002910| 66 61 6c 67 69 73 65 6e | 76 0a 0a 5c 64 65 66 5c |falgisen|v..\def\|
|00002920| 61 6c 67 6c 70 73 68 23 | 31 5c 74 6f 23 32 7b 5c |alglpsh#|1\to#2{\|
|00002930| 61 6c 67 61 3d 7b 23 31 | 5c 5c 7d 5c 61 6c 67 62 |alga={#1|\\}\algb|
|00002940| 3d 5c 65 78 70 61 6e 64 | 61 66 74 65 72 7b 23 32 |=\expand|after{#2|
|00002950| 7d 0a 20 20 5c 67 6c 6f | 62 61 6c 5c 65 64 65 66 |}. \glo|bal\edef|
|00002960| 23 32 7b 5c 74 68 65 5c | 61 6c 67 61 5c 74 68 65 |#2{\the\|alga\the|
|00002970| 5c 61 6c 67 62 7d 7d 0a | 5c 64 65 66 5c 61 6c 67 |\algb}}.|\def\alg|
|00002980| 6c 70 6f 70 23 31 5c 74 | 6f 23 32 7b 5c 69 66 78 |lpop#1\t|o#2{\ifx|
|00002990| 5c 65 6d 70 74 79 23 31 | 5c 64 65 66 23 32 7b 7d |\empty#1|\def#2{}|
|000029a0| 0a 20 20 5c 65 6c 73 65 | 5c 67 6c 6f 62 61 6c 5c |. \else|\global\|
|000029b0| 65 78 70 61 6e 64 61 66 | 74 65 72 5c 61 6c 67 6c |expandaf|ter\algl|
|000029c0| 6c 6f 70 23 31 5c 61 6c | 67 6c 6c 6f 70 23 31 23 |lop#1\al|gllop#1#|
|000029d0| 32 5c 66 69 7d 0a 5c 64 | 65 66 5c 61 6c 67 6c 6c |2\fi}.\d|ef\algll|
|000029e0| 6f 70 23 31 5c 5c 23 32 | 5c 61 6c 67 6c 6c 6f 70 |op#1\\#2|\algllop|
|000029f0| 23 33 23 34 7b 5c 64 65 | 66 23 33 7b 23 32 7d 5c |#3#4{\de|f#3{#2}\|
|00002a00| 64 65 66 23 34 7b 23 31 | 7d 7d 0a 5c 64 65 66 5c |def#4{#1|}}.\def\|
|00002a10| 61 6c 67 6c 74 6f 70 23 | 31 5c 74 6f 23 32 7b 5c |algltop#|1\to#2{\|
|00002a20| 69 66 78 5c 65 6d 70 74 | 79 23 31 5c 64 65 66 5c |ifx\empt|y#1\def\|
|00002a30| 23 32 7b 7d 5c 65 6c 73 | 65 0a 20 20 5c 65 78 70 |#2{}\els|e. \exp|
|00002a40| 61 6e 64 61 66 74 65 72 | 5c 61 6c 67 6c 74 74 6f |andafter|\algltto|
|00002a50| 70 23 31 5c 61 6c 67 6c | 74 74 6f 70 23 32 5c 66 |p#1\algl|ttop#2\f|
|00002a60| 69 7d 0a 5c 64 65 66 5c | 61 6c 67 6c 74 74 6f 70 |i}.\def\|alglttop|
|00002a70| 23 31 5c 5c 23 32 5c 61 | 6c 67 6c 74 74 6f 70 23 |#1\\#2\a|lglttop#|
|00002a80| 33 7b 5c 64 65 66 23 33 | 7b 23 31 7d 7d 0a 5c 64 |3{\def#3|{#1}}.\d|
|00002a90| 65 66 5c 61 6c 67 63 6b | 65 6e 76 23 31 7b 5c 61 |ef\algck|env#1{\a|
|00002aa0| 6c 67 6c 74 6f 70 5c 61 | 6c 67 6c 65 6e 76 5c 74 |lgltop\a|lglenv\t|
|00002ab0| 6f 5c 61 6c 67 65 6e 76 | 0a 20 20 5c 64 65 66 5c |o\algenv|. \def\|
|00002ac0| 61 6c 67 61 72 67 7b 23 | 31 7d 0a 20 20 5c 69 66 |algarg{#|1}. \if|
|00002ad0| 78 20 5c 61 6c 67 61 72 | 67 5c 61 6c 67 65 6e 76 |x \algar|g\algenv|
|00002ae0| 20 5c 61 6c 67 69 73 65 | 6e 76 74 72 75 65 20 5c | \algise|nvtrue \|
|00002af0| 65 6c 73 65 20 5c 61 6c | 67 69 73 65 6e 76 66 61 |else \al|gisenvfa|
|00002b00| 6c 73 65 20 5c 66 69 7d | 0a 0a 5c 64 65 66 5c 61 |lse \fi}|..\def\a|
|00002b10| 6c 67 73 6f 6c 7b 5c 67 | 6c 6f 62 61 6c 5c 61 64 |lgsol{\g|lobal\ad|
|00002b20| 76 61 6e 63 65 5c 61 6c | 67 6c 69 6e 65 20 62 79 |vance\al|gline by|
|00002b30| 20 31 0a 20 20 5c 74 68 | 65 5c 61 6c 67 6c 69 6e | 1. \th|e\alglin|
|00002b40| 65 26 5c 68 62 6f 78 5c | 62 67 72 6f 75 70 5c 63 |e&\hbox\|bgroup\c|
|00002b50| 6f 70 79 5c 61 6c 67 74 | 61 62 24 5c 69 67 6e 6f |opy\algt|ab$\igno|
|00002b60| 72 65 73 70 61 63 65 73 | 7d 0a 5c 64 65 66 5c 61 |respaces|}.\def\a|
|00002b70| 6c 67 65 6f 6c 7b 24 5c | 65 67 72 6f 75 70 5c 63 |lgeol{$\|egroup\c|
|00002b80| 72 5c 61 6c 67 73 6f 6c | 7d 0a 5c 64 65 66 5c 61 |r\algsol|}.\def\a|
|00002b90| 6c 67 70 75 73 68 7b 5c | 67 6c 6f 62 61 6c 5c 73 |lgpush{\|global\s|
|00002ba0| 65 74 62 6f 78 5c 61 6c | 67 73 74 61 63 6b 5c 68 |etbox\al|gstack\h|
|00002bb0| 62 6f 78 7b 5c 75 6e 68 | 62 6f 78 5c 61 6c 67 73 |box{\unh|box\algs|
|00002bc0| 74 61 63 6b 5c 62 6f 78 | 5c 61 6c 67 74 61 62 7d |tack\box|\algtab}|
|00002bd0| 7d 0a 5c 64 65 66 5c 61 | 6c 67 70 6f 70 7b 5c 67 |}.\def\a|lgpop{\g|
|00002be0| 6c 6f 62 61 6c 5c 73 65 | 74 62 6f 78 5c 61 6c 67 |lobal\se|tbox\alg|
|00002bf0| 73 74 61 63 6b 5c 68 62 | 6f 78 7b 5c 75 6e 68 62 |stack\hb|ox{\unhb|
|00002c00| 6f 78 5c 61 6c 67 73 74 | 61 63 6b 0a 20 20 20 20 |ox\algst|ack. |
|00002c10| 5c 67 6c 6f 62 61 6c 5c | 73 65 74 62 6f 78 5c 61 |\global\|setbox\a|
|00002c20| 6c 67 74 61 62 5c 6c 61 | 73 74 62 6f 78 7d 7d 0a |lgtab\la|stbox}}.|
|00002c30| 5c 64 65 66 5c 61 6c 67 | 73 65 74 7b 24 5c 65 67 |\def\alg|set{$\eg|
|00002c40| 72 6f 75 70 5c 73 65 74 | 62 6f 78 30 3d 5c 6c 61 |roup\set|box0=\la|
|00002c50| 73 74 62 6f 78 5c 61 6c | 67 70 75 73 68 0a 20 20 |stbox\al|gpush. |
|00002c60| 5c 67 6c 6f 62 61 6c 5c | 73 65 74 62 6f 78 5c 61 |\global\|setbox\a|
|00002c70| 6c 67 74 61 62 5c 68 62 | 6f 78 20 74 6f 20 5c 77 |lgtab\hb|ox to \w|
|00002c80| 64 30 7b 7d 5c 68 62 6f | 78 5c 62 67 72 6f 75 70 |d0{}\hbo|x\bgroup|
|00002c90| 5c 75 6e 68 62 6f 78 30 | 24 7d 0a 5c 64 65 66 5c |\unhbox0|$}.\def\|
|00002ca0| 61 6c 67 6f 72 69 74 68 | 6d 23 31 23 32 7b 5c 62 |algorith|m#1#2{\b|
|00002cb0| 67 72 6f 75 70 0a 20 20 | 5c 6c 65 74 5c 5c 3d 5c |group. |\let\\=\|
|00002cc0| 61 6c 67 65 6f 6c 0a 20 | 20 5c 6c 65 74 5c 3d 3d |algeol. | \let\==|
|00002cd0| 5c 6c 65 66 74 61 72 72 | 6f 77 0a 20 20 5c 6c 65 |\leftarr|ow. \le|
|00002ce0| 74 5c 49 46 3d 5c 61 6c | 67 49 46 0a 20 20 5c 6c |t\IF=\al|gIF. \l|
|00002cf0| 65 74 5c 52 45 54 55 52 | 4e 3d 5c 61 6c 67 52 45 |et\RETUR|N=\algRE|
|00002d00| 54 55 52 4e 0a 20 20 5c | 6c 65 74 5c 45 4c 53 45 |TURN. \|let\ELSE|
|00002d10| 3d 5c 61 6c 67 45 4c 53 | 45 0a 20 20 5c 6c 65 74 |=\algELS|E. \let|
|00002d20| 5c 65 6e 64 49 46 3d 5c | 65 6e 64 61 6c 67 49 46 |\endIF=\|endalgIF|
|00002d30| 0a 20 20 5c 6c 65 74 5c | 45 52 52 4f 52 3d 5c 61 |. \let\|ERROR=\a|
|00002d40| 6c 67 45 52 52 4f 52 0a | 20 20 5c 6c 65 74 5c 4e |lgERROR.| \let\N|
|00002d50| 49 4c 3d 5c 61 6c 67 4e | 49 4c 0a 20 20 5c 6c 65 |IL=\algN|IL. \le|
|00002d60| 74 5c 57 48 49 4c 45 3d | 5c 61 6c 67 57 48 49 4c |t\WHILE=|\algWHIL|
|00002d70| 45 0a 20 20 5c 6c 65 74 | 5c 65 6e 64 57 48 49 4c |E. \let|\endWHIL|
|00002d80| 45 3d 5c 65 6e 64 61 6c | 67 57 48 49 4c 45 0a 20 |E=\endal|gWHILE. |
|00002d90| 20 5c 6c 65 74 5c 46 4f | 52 3d 5c 61 6c 67 46 4f | \let\FO|R=\algFO|
|00002da0| 52 0a 20 20 5c 6c 65 74 | 5c 65 6e 64 46 4f 52 3d |R. \let|\endFOR=|
|00002db0| 5c 65 6e 64 61 6c 67 46 | 4f 52 0a 20 20 5c 6c 65 |\endalgF|OR. \le|
|00002dc0| 74 5c 43 41 4c 4c 3d 5c | 61 6c 67 43 41 4c 4c 0a |t\CALL=\|algCALL.|
|00002dd0| 20 20 5c 6c 65 74 5c 74 | 65 78 74 3d 5c 61 6c 67 | \let\t|ext=\alg|
|00002de0| 74 65 78 74 0a 20 20 5c | 6c 65 74 5c 54 4f 3d 5c |text. \|let\TO=\|
|00002df0| 61 6c 67 54 4f 0a 20 20 | 5c 6c 65 74 5c 45 41 43 |algTO. |\let\EAC|
|00002e00| 48 3d 5c 61 6c 67 45 41 | 43 48 0a 20 20 5c 6c 65 |H=\algEA|CH. \le|
|00002e10| 74 5c 53 57 49 54 43 48 | 3d 5c 61 6c 67 53 57 49 |t\SWITCH|=\algSWI|
|00002e20| 54 43 48 0a 20 20 5c 6c | 65 74 5c 69 74 65 6d 3d |TCH. \l|et\item=|
|00002e30| 5c 61 6c 67 69 74 65 6d | 0a 20 20 5c 6c 65 74 5c |\algitem|. \let\|
|00002e40| 65 6e 64 53 57 49 54 43 | 48 3d 5c 65 6e 64 61 6c |endSWITC|H=\endal|
|00002e50| 67 53 57 49 54 43 48 0a | 20 20 5c 6c 65 74 5c 44 |gSWITCH.| \let\D|
|00002e60| 45 46 41 55 4c 54 3d 5c | 61 6c 67 44 45 46 41 55 |EFAULT=\|algDEFAU|
|00002e70| 4c 54 0a 20 20 5c 6c 65 | 74 5c 52 45 50 45 41 54 |LT. \le|t\REPEAT|
|00002e80| 3d 5c 61 6c 67 52 45 50 | 45 41 54 0a 20 20 5c 6c |=\algREP|EAT. \l|
|00002e90| 65 74 5c 55 4e 54 49 4c | 3d 5c 65 6e 64 61 6c 67 |et\UNTIL|=\endalg|
|00002ea0| 52 45 50 45 41 54 0a 20 | 20 5c 6c 65 74 5c 65 6e |REPEAT. | \let\en|
|00002eb0| 64 52 45 50 45 41 54 3d | 5c 55 4e 54 49 4c 0a 20 |dREPEAT=|\UNTIL. |
|00002ec0| 20 5c 6c 65 74 5c 49 4e | 3d 5c 61 6c 67 49 4e 0a | \let\IN|=\algIN.|
|00002ed0| 20 20 5c 6c 65 74 5c 62 | 65 67 69 6e 3d 5c 61 6c | \let\b|egin=\al|
|00002ee0| 67 62 65 67 69 6e 0a 20 | 20 5c 6c 65 74 5c 65 6e |gbegin. | \let\en|
|00002ef0| 64 3d 5c 61 6c 67 65 6e | 64 0a 20 20 5c 6c 65 74 |d=\algen|d. \let|
|00002f00| 5c 65 6e 64 61 6c 67 6f | 72 69 74 68 6d 3d 5c 61 |\endalgo|rithm=\a|
|00002f10| 6c 67 61 6c 6d 6f 73 74 | 65 6e 64 0a 20 20 5c 67 |lgalmost|end. \g|
|00002f20| 6c 6f 62 61 6c 5c 73 65 | 74 62 6f 78 5c 61 6c 67 |lobal\se|tbox\alg|
|00002f30| 74 61 62 5c 6e 75 6c 6c | 0a 20 20 5c 67 6c 6f 62 |tab\null|. \glob|
|00002f40| 61 6c 5c 73 65 74 62 6f | 78 5c 61 6c 67 73 74 61 |al\setbo|x\algsta|
|00002f50| 63 6b 5c 6e 75 6c 6c 0a | 20 20 5c 67 6c 6f 62 61 |ck\null.| \globa|
|00002f60| 6c 5c 61 6c 67 6c 69 6e | 65 3d 30 0a 20 20 5c 64 |l\alglin|e=0. \d|
|00002f70| 65 66 5c 61 6c 67 6c 65 | 6e 76 7b 61 6c 67 6f 72 |ef\algle|nv{algor|
|00002f80| 69 74 68 6d 5c 5c 7d 0a | 20 20 5c 68 61 6c 69 67 |ithm\\}.| \halig|
|00002f90| 6e 5c 62 67 72 6f 75 70 | 5c 73 70 61 63 65 5c 68 |n\bgroup|\space\h|
|00002fa0| 66 69 6c 6c 23 23 26 5c | 71 75 61 64 23 23 5c 68 |fill##&\|quad##\h|
|00002fb0| 73 73 20 5c 63 72 0a 20 | 20 5c 6f 6d 69 74 5c 43 |ss \cr. | \omit\C|
|00002fc0| 41 4c 4c 7b 23 31 7d 24 | 28 23 32 29 24 5c 73 70 |ALL{#1}$|(#2)$\sp|
|00002fd0| 61 6e 5c 6f 6d 69 74 5c | 68 66 69 6c 6c 20 5c 63 |an\omit\|hfill \c|
|00002fe0| 72 0a 20 20 5c 61 6c 67 | 73 6f 6c 7d 0a 5c 64 65 |r. \alg|sol}.\de|
|00002ff0| 66 5c 61 6c 67 61 6c 6d | 6f 73 74 65 6e 64 7b 24 |f\algalm|ostend{$|
|00003000| 5c 65 67 72 6f 75 70 5c | 63 72 5c 65 67 72 6f 75 |\egroup\|cr\egrou|
|00003010| 70 5c 65 67 72 6f 75 70 | 5c 73 74 72 75 74 5c 65 |p\egroup|\strut\e|
|00003020| 6e 64 7b 61 6c 67 6f 72 | 69 74 68 6d 7d 7d 0a 25 |nd{algor|ithm}}.%|
|00003030| 5c 64 65 66 5c 65 6e 64 | 61 6c 67 6f 72 69 74 68 |\def\end|algorith|
|00003040| 6d 7b 24 5c 65 67 72 6f | 75 70 5c 63 72 5c 65 67 |m{$\egro|up\cr\eg|
|00003050| 72 6f 75 70 5c 65 67 72 | 6f 75 70 5c 73 74 72 75 |roup\egr|oup\stru|
|00003060| 74 7d 0a 5c 64 65 66 5c | 61 6c 67 6b 65 79 23 31 |t}.\def\|algkey#1|
|00003070| 7b 5c 6d 62 6f 78 7b 5c | 62 66 20 23 31 5c 20 7d |{\mbox{\|bf #1\ }|
|00003080| 7d 0a 5c 64 65 66 5c 61 | 6c 67 49 46 23 31 7b 5c |}.\def\a|lgIF#1{\|
|00003090| 61 6c 67 6b 65 79 7b 69 | 66 7d 5c 61 6c 67 73 65 |algkey{i|f}\algse|
|000030a0| 74 23 31 20 5c 5c 0a 20 | 20 5c 61 6c 67 6b 65 79 |t#1 \\. | \algkey|
|000030b0| 7b 74 68 65 6e 7d 5c 61 | 6c 67 73 65 74 7d 0a 5c |{then}\a|lgset}.\|
|000030c0| 64 65 66 5c 61 6c 67 45 | 4c 53 45 7b 5c 61 6c 67 |def\algE|LSE{\alg|
|000030d0| 63 6b 65 6e 76 7b 49 46 | 7d 0a 20 20 5c 69 66 61 |ckenv{IF|}. \ifa|
|000030e0| 6c 67 69 73 65 6e 76 0a | 20 20 20 20 5c 61 6c 67 |lgisenv.| \alg|
|000030f0| 70 6f 70 20 5c 5c 0a 20 | 20 20 20 7b 5c 73 65 74 |pop \\. | {\set|
|00003100| 62 6f 78 30 5c 68 62 6f | 78 7b 5c 61 6c 67 6b 65 |box0\hbo|x{\algke|
|00003110| 79 7b 74 68 65 6e 7d 7d | 0a 20 20 20 20 20 20 5c |y{then}}|. \|
|00003120| 68 62 6f 78 20 74 6f 20 | 5c 77 64 30 7b 5c 61 6c |hbox to |\wd0{\al|
|00003130| 67 6b 65 79 7b 65 6c 73 | 65 7d 5c 68 66 69 6c 6c |gkey{els|e}\hfill|
|00003140| 7d 7d 0a 20 20 20 20 5c | 61 6c 67 73 65 74 0a 20 |}}. \|algset. |
|00003150| 20 5c 65 6c 73 65 0a 20 | 20 20 20 5c 50 61 63 6b | \else. | \Pack|
|00003160| 61 67 65 45 72 72 6f 72 | 7b 6e 65 77 61 6c 67 7d |ageError|{newalg}|
|00003170| 0a 20 20 20 20 7b 5c 73 | 74 72 69 6e 67 5c 45 4c |. {\s|tring\EL|
|00003180| 53 45 5c 73 70 61 63 65 | 20 69 73 20 6f 6e 6c 79 |SE\space| is only|
|00003190| 20 61 6c 6c 6f 77 65 64 | 20 69 6e 20 74 68 65 20 | allowed| in the |
|000031a0| 49 46 20 65 6e 76 69 72 | 6f 6e 6d 65 6e 74 7d 0a |IF envir|onment}.|
|000031b0| 20 20 20 20 7b 59 6f 75 | 20 68 61 76 65 20 61 6e | {You| have an|
|000031c0| 20 5c 70 72 6f 74 65 63 | 74 5c 45 4c 53 45 5c 73 | \protec|t\ELSE\s|
|000031d0| 70 61 63 65 20 63 6f 6d | 6d 61 6e 64 20 77 69 74 |pace com|mand wit|
|000031e0| 68 6f 75 74 20 61 20 5c | 73 74 72 69 6e 67 5c 62 |hout a \|string\b|
|000031f0| 65 67 69 6e 7b 49 46 7d | 7d 0a 20 20 5c 66 69 7d |egin{IF}|}. \fi}|
|00003200| 0a 5c 64 65 66 5c 65 6e | 64 61 6c 67 49 46 7b 5c |.\def\en|dalgIF{\|
|00003210| 61 6c 67 70 6f 70 5c 61 | 6c 67 70 6f 70 7d 0a 5c |algpop\a|lgpop}.\|
|00003220| 64 65 66 5c 61 6c 67 45 | 52 52 4f 52 23 31 7b 5c |def\algE|RROR#1{\|
|00003230| 61 6c 67 6b 65 79 7b 65 | 72 72 6f 72 7d 5c 6d 62 |algkey{e|rror}\mb|
|00003240| 6f 78 7b 60 60 23 31 27 | 27 7d 7d 0a 5c 64 65 66 |ox{``#1'|'}}.\def|
|00003250| 5c 61 6c 67 52 45 54 55 | 52 4e 7b 5c 61 6c 67 6b |\algRETU|RN{\algk|
|00003260| 65 79 7b 72 65 74 75 72 | 6e 7d 7d 0a 5c 64 65 66 |ey{retur|n}}.\def|
|00003270| 5c 61 6c 67 63 6f 6e 73 | 74 23 31 7b 5c 6d 62 6f |\algcons|t#1{\mbo|
|00003280| 78 7b 5c 73 63 20 23 31 | 7d 7d 0a 5c 64 65 66 5c |x{\sc #1|}}.\def\|
|00003290| 61 6c 67 4e 49 4c 7b 5c | 61 6c 67 63 6f 6e 73 74 |algNIL{\|algconst|
|000032a0| 7b 6e 69 6c 7d 7d 0a 5c | 64 65 66 5c 61 6c 67 57 |{nil}}.\|def\algW|
|000032b0| 48 49 4c 45 23 31 7b 5c | 61 6c 67 6b 65 79 7b 77 |HILE#1{\|algkey{w|
|000032c0| 68 69 6c 65 7d 23 31 20 | 5c 5c 0a 20 20 5c 69 6e |hile}#1 |\\. \in|
|000032d0| 64 65 6e 74 5c 61 6c 67 | 6b 65 79 7b 64 6f 7d 5c |dent\alg|key{do}\|
|000032e0| 61 6c 67 73 65 74 7d 0a | 5c 64 65 66 5c 65 6e 64 |algset}.|\def\end|
|000032f0| 61 6c 67 57 48 49 4c 45 | 7b 5c 61 6c 67 70 6f 70 |algWHILE|{\algpop|
|00003300| 7d 0a 5c 64 65 66 5c 61 | 6c 67 43 41 4c 4c 23 31 |}.\def\a|lgCALL#1|
|00003310| 7b 5c 6d 62 6f 78 7b 5c | 73 63 20 23 31 7d 7d 0a |{\mbox{\|sc #1}}.|
|00003320| 5c 64 65 66 5c 61 6c 67 | 46 4f 52 23 31 7b 5c 61 |\def\alg|FOR#1{\a|
|00003330| 6c 67 6b 65 79 7b 66 6f | 72 7d 23 31 20 5c 5c 0a |lgkey{fo|r}#1 \\.|
|00003340| 20 20 5c 69 6e 64 65 6e | 74 5c 61 6c 67 6b 65 79 | \inden|t\algkey|
|00003350| 7b 64 6f 7d 5c 61 6c 67 | 73 65 74 7d 0a 5c 64 65 |{do}\alg|set}.\de|
|00003360| 66 5c 65 6e 64 61 6c 67 | 46 4f 52 7b 5c 61 6c 67 |f\endalg|FOR{\alg|
|00003370| 70 6f 70 7d 0a 5c 64 65 | 66 5c 61 6c 67 74 65 78 |pop}.\de|f\algtex|
|00003380| 74 23 31 7b 5c 6d 62 6f | 78 7b 20 23 31 20 7d 7d |t#1{\mbo|x{ #1 }}|
|00003390| 0a 5c 64 65 66 5c 61 6c | 67 54 4f 7b 5c 61 6c 67 |.\def\al|gTO{\alg|
|000033a0| 6b 65 79 7b 20 74 6f 7d | 7d 0a 5c 64 65 66 5c 61 |key{ to}|}.\def\a|
|000033b0| 6c 67 45 41 43 48 7b 5c | 61 6c 67 6b 65 79 7b 20 |lgEACH{\|algkey{ |
|000033c0| 65 61 63 68 7d 7d 0a 5c | 64 65 66 5c 61 6c 67 53 |each}}.\|def\algS|
|000033d0| 57 49 54 43 48 7b 5c 61 | 6c 67 6b 65 79 7b 73 77 |WITCH{\a|lgkey{sw|
|000033e0| 69 74 63 68 7d 5c 61 6c | 67 70 75 73 68 7d 0a 5c |itch}\al|gpush}.\|
|000033f0| 64 65 66 5c 61 6c 67 69 | 74 65 6d 23 31 7b 5c 61 |def\algi|tem#1{\a|
|00003400| 6c 67 63 6b 65 6e 76 7b | 53 57 49 54 43 48 7d 0a |lgckenv{|SWITCH}.|
|00003410| 20 20 5c 69 66 61 6c 67 | 69 73 65 6e 76 0a 20 20 | \ifalg|isenv. |
|00003420| 20 20 5c 61 6c 67 70 6f | 70 20 5c 5c 0a 20 20 20 | \algpo|p \\. |
|00003430| 20 5c 71 75 61 64 5c 61 | 6c 67 6b 65 79 7b 63 61 | \quad\a|lgkey{ca|
|00003440| 73 65 7d 5c 61 6c 67 73 | 65 74 20 23 31 3a 0a 20 |se}\algs|et #1:. |
|00003450| 20 5c 65 6c 73 65 0a 20 | 20 20 20 5c 50 61 63 6b | \else. | \Pack|
|00003460| 61 67 65 45 72 72 6f 72 | 7b 6e 65 77 61 6c 67 7d |ageError|{newalg}|
|00003470| 0a 20 20 20 20 7b 5c 73 | 74 72 69 6e 67 5c 69 74 |. {\s|tring\it|
|00003480| 65 6d 5c 73 70 61 63 65 | 20 63 61 6e 20 6f 6e 6c |em\space| can onl|
|00003490| 79 20 62 65 20 75 73 65 | 64 20 69 6e 20 61 20 53 |y be use|d in a S|
|000034a0| 57 49 54 43 48 20 65 6e | 76 69 72 6f 6e 6d 65 6e |WITCH en|vironmen|
|000034b0| 74 7d 0a 20 20 20 20 7b | 59 6f 75 20 68 61 76 65 |t}. {|You have|
|000034c0| 20 61 6e 20 69 74 65 6d | 20 74 68 61 74 20 69 73 | an item| that is|
|000034d0| 20 6e 6f 74 20 69 6e 73 | 69 64 65 20 6f 66 20 74 | not ins|ide of t|
|000034e0| 68 65 20 63 6f 72 72 65 | 63 74 20 65 6e 76 69 72 |he corre|ct envir|
|000034f0| 6f 6e 6d 65 6e 74 7d 0a | 20 20 5c 66 69 7d 0a 5c |onment}.| \fi}.\|
|00003500| 64 65 66 5c 65 6e 64 61 | 6c 67 53 57 49 54 43 48 |def\enda|lgSWITCH|
|00003510| 7b 5c 61 6c 67 70 6f 70 | 7d 0a 5c 64 65 66 5c 61 |{\algpop|}.\def\a|
|00003520| 6c 67 44 45 46 41 55 4c | 54 7b 5c 61 6c 67 6b 65 |lgDEFAUL|T{\algke|
|00003530| 79 7b 64 65 66 61 75 6c | 74 7d 7d 0a 5c 64 65 66 |y{defaul|t}}.\def|
|00003540| 5c 61 6c 67 52 45 50 45 | 41 54 23 31 7b 0a 20 20 |\algREPE|AT#1{. |
|00003550| 5c 61 6c 67 6b 65 79 7b | 72 65 70 65 61 74 7d 5c |\algkey{|repeat}\|
|00003560| 61 6c 67 73 65 74 5c 5c | 7d 0a 5c 64 65 66 5c 65 |algset\\|}.\def\e|
|00003570| 6e 64 61 6c 67 52 45 50 | 45 41 54 7b 5c 61 6c 67 |ndalgREP|EAT{\alg|
|00003580| 70 6f 70 20 5c 5c 0a 20 | 20 5c 71 75 61 64 5c 61 |pop \\. | \quad\a|
|00003590| 6c 67 6b 65 79 7b 75 6e | 74 69 6c 7d 7d 0a 5c 64 |lgkey{un|til}}.\d|
|000035a0| 65 66 5c 61 6c 67 49 4e | 7b 5c 61 6c 67 6b 65 79 |ef\algIN|{\algkey|
|000035b0| 7b 20 69 6e 7d 7d 0a 5c | 64 65 66 5c 61 6c 67 62 |{ in}}.\|def\algb|
|000035c0| 65 67 69 6e 23 31 7b 5c | 61 6c 67 6c 70 73 68 23 |egin#1{\|alglpsh#|
|000035d0| 31 5c 74 6f 5c 61 6c 67 | 6c 65 6e 76 0a 20 20 5c |1\to\alg|lenv. \|
|000035e0| 63 73 6e 61 6d 65 20 23 | 31 5c 65 6e 64 63 73 6e |csname #|1\endcsn|
|000035f0| 61 6d 65 7d 0a 5c 64 65 | 66 5c 61 6c 67 65 6e 64 |ame}.\de|f\algend|
|00003600| 23 31 7b 5c 61 6c 67 6c | 70 6f 70 5c 61 6c 67 6c |#1{\algl|pop\algl|
|00003610| 65 6e 76 5c 74 6f 5c 61 | 6c 67 65 6e 76 0a 20 20 |env\to\a|lgenv. |
|00003620| 5c 64 65 66 5c 61 6c 67 | 61 72 67 7b 23 31 7d 0a |\def\alg|arg{#1}.|
|00003630| 20 20 5c 69 66 78 20 5c | 61 6c 67 61 72 67 5c 61 | \ifx \|algarg\a|
|00003640| 6c 67 65 6e 76 0a 20 20 | 20 20 5c 72 65 6c 61 78 |lgenv. | \relax|
|00003650| 0a 20 20 5c 65 6c 73 65 | 0a 20 20 20 20 5c 50 61 |. \else|. \Pa|
|00003660| 63 6b 61 67 65 45 72 72 | 6f 72 7b 6e 65 77 61 6c |ckageErr|or{newal|
|00003670| 67 7d 0a 20 20 20 20 7b | 5c 73 74 72 69 6e 67 5c |g}. {|\string\|
|00003680| 62 65 67 69 6e 7b 5c 61 | 6c 67 65 6e 76 7d 5c 73 |begin{\a|lgenv}\s|
|00003690| 70 61 63 65 20 65 6e 64 | 65 64 20 62 79 20 5c 73 |pace end|ed by \s|
|000036a0| 74 72 69 6e 67 5c 65 6e | 64 7b 5c 61 6c 67 61 72 |tring\en|d{\algar|
|000036b0| 67 7d 7d 0a 20 20 20 20 | 7b 57 65 20 61 72 65 20 |g}}. |{We are |
|000036c0| 63 6f 6e 66 75 73 65 64 | 2e 20 20 54 72 79 20 74 |confused|. Try t|
|000036d0| 6f 20 72 65 74 75 72 6e | 20 6e 6f 77 7d 0a 20 20 |o return| now}. |
|000036e0| 5c 66 69 0a 20 20 5c 63 | 73 6e 61 6d 65 20 65 6e |\fi. \c|sname en|
|000036f0| 64 23 31 5c 65 6e 64 63 | 73 6e 61 6d 65 0a 7d 0a |d#1\endc|sname.}.|
|00003700| 0a | |. | |
+--------+-------------------------+-------------------------+--------+--------+