about summary refs log blame commit diff stats
path: root/js/games/nluqo.github.io/~bh/v1-toc2.html
blob: 26dbf8eeba7b2bcb852930442fbfe450bc185440 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452



































































































































































































































































































































































































































































                                                                                                                                                    
<HTML>
<HEAD>
<TITLE>Symbolic Computing contents</TITLE>
<link rel="shortcut icon" href="http://www.cs.berkeley.edu/~bh/csls1-tiny.png" type="image/png">
</HEAD>
<BODY>
<CITE>Computer Science Logo Style</CITE> volume 1:
<CITE>Symbolic Computing</CITE> 2/e Copyright (C) 1997 MIT
<H1><EM>Computer Science Logo Style</EM><BR>
Volume 1: <EM>Symbolic Computing</EM></H1>
<CITE>Brian Harvey<BR>University of California, Berkeley</CITE>

<P><TABLE width="100%"><TR>
<TD><IMG SRC="csls1.jpg">
<TD><TABLE>
<TR><TD align="right"><A HREF="v2-toc2.html">Volume 2: <CITE>Advanced Techniques</CITE></A>
<IMG SRC="csls2-tiny.jpg">
<TR><TD align="right"><A HREF="v3-toc2.html">Volume 3: <CITE>Beyond Programming</CITE></A>
<IMG SRC="csls3-tiny.jpg">
<TR><TD align="right"><A HREF="logo.html">Download Berkeley Logo (UCBLogo)</A>
<IMG SRC="ucblogo2-tiny.gif">
<TR><TD align="right"><A HREF="index.html">Brian's home page</A>
<IMG SRC="bh-tiny.jpg">
<TR><TD align="right">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="https://mitpress.mit.edu/books/computer-science-logo-style-second-edition-volume-1">MIT
Press web page for <CITE>Computer Science Logo Style</CITE></A>
<IMG SRC="mitp.jpg">
</TABLE></TABLE>

<HR>

<P>Below this short table of contents is an expanded table of contents
including sections within each chapter.  Click on the chapter name
to jump down.  You can also download the complete text of each chapter
in PDF format for elegant printing, or browse the HTML version.

<P><EM>Note:  These books are still in copyright, and in print.  They are
posted here for your personal use, not for resale or redistribution.
Thanks!</EM>

<p>I don't know why suddenly everyone wants to translate this page to other
languages, but here they are.  It's just this page, not the whole book.

<p>
<a href="http://www.azoft.com/people/seremina/edu/v1-toc2-romanian.html">View
this
page in Romanian</a> courtesy of <a href="http://www.azoft.com/">azoft</a>.
<br><a href="http://cupegraf.com/blog/toc2/">Slovakian translation</a> courtesy
of <a href="http://cupegraf.com">Gasper Halipovich</a>.
<br><a href="*http://translate.coupofy.com/computer-science-logo-style/
<http://translate.coupofy.com/computer-science-logo-style/>*">Vietnamese
translation</a> courtesy of Julia Duong from <a href="http:/www.coupofy.com/
">coupofy.com</a>.<br>
<a href="http://search-sos.org/computer-science-logo-style-volume-1/">Russian
Translation</a> Courtesy of <a href="http://search-sos.org/">Search-Sos</a>.

<UL>
<LI>Preface
(<A HREF="pdf/v1ch00.pdf">frontmatter in PDF</A>)
(<A HREF="v1ch0/preface.html">HTML</A>)
<LI>Acknowledgements
(<A HREF="v1ch0/ack.html">HTML</A>)
<LI>1.  <A HREF="v1-toc2.html#ch1">Exploration</A>
(<A HREF="pdf/v1ch01.pdf">PDF</A>)
(<A HREF="v1ch1/explor.html">HTML</A>)
<LI>2.  <A HREF="v1-toc2.html#ch2">Procedures</A>
(<A HREF="pdf/v1ch02.pdf">PDF</A>)
(<A HREF="v1ch2/proced.html">HTML</A>)
<LI>3.  <A HREF="v1-toc2.html#ch3">Variables</A>
(<A HREF="pdf/v1ch03.pdf">PDF</A>)
(<A HREF="v1ch3/variab.html">HTML</A>)
<LI>4.  <A HREF="v1-toc2.html#ch4">Predicates</A>
(<A HREF="pdf/v1ch04.pdf">PDF</A>)
(<A HREF="v1ch4/predic.html">HTML</A>)
<LI>5.  <A HREF="v1-toc2.html#ch5">Functions of Functions</A>
(<A HREF="pdf/v1ch05.pdf">PDF</A>)
(<A HREF="v1ch5/hof.html">HTML</A>)
<LI>6.  <A HREF="v1-toc2.html#ch6">Example: Tic-Tac-Toe</A>
(<A HREF="pdf/v1ch06.pdf">PDF</A>)
(<A HREF="v1ch6/ttt.html">HTML</A>)
<LI>7.  <A HREF="v1-toc2.html#ch7">Introduction to Recursion</A>
(<A HREF="pdf/v1ch07.pdf">PDF</A>)
(<A HREF="v1ch7/recur1.html">HTML</A>)
<LI>8.  <A HREF="v1-toc2.html#ch8">Practical Recursion: the Leap of Faith</A>
(<A HREF="pdf/v1ch08.pdf">PDF</A>)
(<A HREF="v1ch8/recur2.html">HTML</A>)
<LI>9.  <A HREF="v1-toc2.html#ch9">How Recursion Works</A>
(<A HREF="pdf/v1ch09.pdf">PDF</A>)
(<A HREF="v1ch9/recur3.html">HTML</A>)
<LI>10.  <A HREF="v1-toc2.html#ch10">Turtle Geometry</A>
(<A HREF="pdf/v1ch10.pdf">PDF</A>)
(<A HREF="v1ch10/turtle.html">HTML</A>)
<LI>11.  <A HREF="v1-toc2.html#ch11">Recursive Operations</A>
(<A HREF="pdf/v1ch11.pdf">PDF</A>)
(<A HREF="v1ch11/recops.html">HTML</A>)
<LI>12.  <A HREF="v1-toc2.html#ch12">Example: Playfair Cipher</A>
(<A HREF="pdf/v1ch12.pdf">PDF</A>)
(<A HREF="v1ch12/playfair.html">HTML</A>)
<LI>13.  <A HREF="v1-toc2.html#ch13">Planning</A>
(<A HREF="pdf/v1ch13.pdf">PDF</A>)
(<A HREF="v1ch13/plan.html">HTML</A>)
<LI>14.  <A HREF="v1-toc2.html#ch14">Example: Pitcher Problem Solver</A>
(<A HREF="pdf/v1ch14.pdf">PDF</A>)
(<A HREF="v1ch14/pour.html">HTML</A>)
<LI>15.  <A HREF="v1-toc2.html#ch15">Debugging</A>
(<A HREF="pdf/v1ch15.pdf">PDF</A>)
(<A HREF="v1ch15/debug.html">HTML</A>)
<LI>A.  Running Berkeley Logo
(<A HREF="pdf/v1ch16.pdf">backmatter in PDF</A>)
(<A HREF="v1ch16/versions.html">HTML</A>)
<LI>B.  GNU General Public License
(<A HREF="v1ch16/appendix-gpl.html">HTML</A>)
<LI>Index of Defined Procedures
(<A HREF="v1ch16/appuindex.html">HTML</A>)
<LI>General Index
(<A HREF="v1ch16/appindex.html">HTML</A>)
</UL>

<HR>

<TABLE><TR><TD><H3>Preface</H3><TD>
(<A HREF="pdf/v1ch00.pdf">frontmatter in PDF</A>)
(<A HREF="v1ch0/preface.html">HTML</A>)
</TABLE>
<UL>
<LI>The Intellectual Content of Computer Programming
<LI>Computer Science Apprenticeship
<LI>About the Second Edition
<LI>Why Logo?
<LI>Hardware and Software Requirements
<LI>Words of Wisdom
</UL>

<TABLE><TR><TD><H3>Acknowledgements</H3><TD>
(<A HREF="v1ch0/ack.html">HTML</A>)
</TABLE>

<TABLE><TR><TD><H3><A name="ch1">1.  Exploration</A></H3><TD>
(<A HREF="pdf/v1ch01.pdf">PDF</A>)
(<A HREF="v1ch1/explor.html">HTML</A>)
</TABLE>

<UL>
<LI>Getting Acquainted with Logo...
<LI>... in Two Senses
<LI>Another Greeting
<LI>Fooling Around
<LI>A Slightly Longer Conversation
<LI>A Sneaky Greeting
<LI>A Quiz Program
<LI>Saving Your Work
<LI>About Chapter 2
<LI>No Exercises
</UL>

<TABLE><TR><TD><H3><A name="ch2">2.  Procedures</A></H3><TD>
(<A HREF="pdf/v1ch02.pdf">PDF</A>)
(<A HREF="v1ch2/proced.html">HTML</A>)
</TABLE>

<UL>
<LI>Procedures and Instructions
<LI>Technical Terms
<LI>Evaluation
<LI>Error Messages
<LI>Commands and Operations
<LI>Words and Lists
<LI>How to Describe a Procedure
<LI>Manipulating Words and Lists
<LI><CODE>Print</CODE> and <CODE>Show</CODE>
<LI>Order of Evaluation
<LI>Special Forms of Evaluation
<LI>Writing Your Own Procedures
<LI>Editing Your Procedures
<LI>Syntax and Semantics
<LI>Parentheses and Plumbing Diagrams
<LI>Nonsense Plumbing Diagrams
</UL>

<TABLE><TR><TD><H3><A name="ch3">3.  Variables</A></H3><TD>
(<A HREF="pdf/v1ch03.pdf">PDF</A>)
(<A HREF="v1ch3/variab.html">HTML</A>)
</TABLE>

<UL>
<LI>User Procedures With Inputs
<LI>What Kind of Container?
<LI>An Abbreviation
<LI>More Procedures
<LI>An Aside on Variable Naming
<LI>Don't Call It <CODE>X</CODE>
<LI>Writing New Operations
<LI>Scope of Variables
<LI>The Little Person Metaphor
<LI>Changing the Value of a Variable
<LI>Global and Local Variables
<LI>Indirect Assignment
<LI>Functional Programming
</UL>

<TABLE><TR><TD><H3><A name="ch4">4.  Predicates</A></H3><TD>
(<A HREF="pdf/v1ch04.pdf">PDF</A>)
(<A HREF="v1ch4/predic.html">HTML</A>)
</TABLE>

<UL>
<LI>True or False
<LI>Defining Your Own Predicates
<LI>Conditional Evaluation
<LI>Choosing Between Alternatives
<LI>Conditional Evaluation Another Way
<LI>About Those Brackets
<LI>Logical Connectives
<LI><CODE>Ifelse</CODE> as an Operation
<LI>Expression Lists and Plumbing Diagrams
<LI>Stopping a Procedure
<LI>Improving the Quiz Program
<LI>Reporting Success to a Superprocedure
</UL>

<TABLE><TR><TD><H3><A name="ch5">5.  Functions of Functions</A></H3><TD>
(<A HREF="pdf/v1ch05.pdf">PDF</A>)
(<A HREF="v1ch5/hof.html">HTML</A>)
</TABLE>

<UL>
<LI>The Problem: <CODE>Initials</CODE>
<LI>One Solution: Numeric Iteration
<LI>Critique of Numeric Iteration
<LI>What's a Function?
<LI>Functions of Functions: <CODE>Map</CODE>
<LI>Higher Order Selection: <CODE>Filter</CODE>
<LI>Many to One: <CODE>Reduce</Code>
<LI>Choosing the Right Tool
<LI>Anonymous Functions
<LI>Higher Order Miscellany
<LI>Repeated Invocation: <CODE>Cascade</CODE>
<LI>A Mini-Project: Mastermind
</UL>

<TABLE><TR><TD><H3><A name="ch6">6.  Example: Tic-Tac-Toe</A></H3><TD>
(<A HREF="pdf/v1ch06.pdf">PDF</A>)
(<A HREF="v1ch6/ttt.html">HTML</A>)
</TABLE>

<P>
<I>This program plays the game of Tic Tac Toe against the user.  It follows a
perfect strategy, so it always wins or ties.</I>

<UL>
<LI>The Project
<LI>Strategy
<LI>Program Structure and Modularity
<LI>Data Representation
<LI>Arrays
<LI>Triples
<LI>Variables in the Workspace
<LI>The User Interface
<LI>Implementing the Strategy Rules
<LI>Further Explorations
<LI>Program Listing
</UL>

<TABLE><TR><TD><H3><A name="ch7">7.  Introduction to Recursion</A></H3><TD>
(<A HREF="pdf/v1ch07.pdf">PDF</A>)
(<A HREF="v1ch7/recur1.html">HTML</A>)
</TABLE>

<UL>
<LI>Starting Small
<LI>Building Up
<LI>Generalizing the Pattern
<LI>What Went Wrong?
<LI>The Stop Rule
<LI>Local Variables
<LI>More Examples
<LI>Other Stop Rules
</UL>

<TABLE><TR><TD><H3><A name="ch8">8.  Practical Recursion: the Leap of Faith</A></H3><TD>
(<A HREF="pdf/v1ch08.pdf">PDF</A>)
(<A HREF="v1ch8/recur2.html">HTML</A>)
</TABLE>

<UL>
<LI>Recursive Patterns
<LI>The Leap of Faith
<LI>The Tower of Hanoi
<LI>More Complicated Patterns
<LI>A Mini-Project: Scrambled Sentences
<LI>Procedure Patterns
<LI>Tricky Stop Rules
</UL>

<TABLE><TR><TD><H3><A name="ch9">9.  How Recursion Works</A></H3><TD>
(<A HREF="pdf/v1ch09.pdf">PDF</A>)
(<A HREF="v1ch9/recur3.html">HTML</A>)
</TABLE>

<UL>
<LI>Little People and Recursion
<LI>Tracing
<LI>Level and Sequence
<LI>Instruction Stepping
</UL>

<TABLE><TR><TD><H3><A name="ch10">10.  Turtle Geometry</A></H3><TD>
(<A HREF="pdf/v1ch10.pdf">PDF</A>)
(<A HREF="v1ch10/turtle.html">HTML</A>)
</TABLE>

<UL>
<LI>A Review, or a Brief Introduction
<LI>Local vs. Global Descriptions
<LI>The Turtle's State
<LI>Symmetry
<LI>Fractals
<LI>Further Reading
</UL>

<TABLE><TR><TD><H3><A name="ch11">11.  Recursive Operations</A></H3><TD>
(<A HREF="pdf/v1ch11.pdf">PDF</A>)
(<A HREF="v1ch11/recops.html">HTML</A>)
</TABLE>

<UL>
<LI>A Simple Substitution Cipher
<LI>More Procedure Patterns
<LI>The <CODE>Filter</CODE> Pattern
<LI>The <CODE>Reduce</CODE> Pattern
<LI>The <CODE>Find</CODE> Pattern
<LI>Numerical Operations: the <CODE>Cascade</CODE> Pattern
<LI>Pig Latin
<LI>A Mini-Project: Spelling Numbers
<LI>Advanced Recursion: <CODE>Subsets</CODE>
<LI>A Word About Tail Recursion
</UL>

<TABLE><TR><TD><H3><A name="ch12">12.  Example: Playfair Cipher</A></H3><TD>
(<A HREF="pdf/v1ch12.pdf">PDF</A>)
(<A HREF="v1ch12/playfair.html">HTML</A>)
</TABLE>

<P>
<I>This project demonstrates the use of a slightly complex cipher, in which a given
letter in the original text is not always represented by the same letter in
the coded version.</I>

<UL>
<LI>Data Redundancy
<LI>Composition of Functions
<LI>Conversational Front End
<LI>Further Explorations
<LI>Program Listing
</UL>

<TABLE><TR><TD><H3><A name="ch13">13.  Planning</A></H3><TD>
(<A HREF="pdf/v1ch13.pdf">PDF</A>)
(<A HREF="v1ch13/plan.html">HTML</A>)
</TABLE>

<UL>
<LI>Structured Programming
<LI>Critique of Structured Programming
<LI>A Sample Project: Counting Poker Hands
<LI>An Initialization Procedure
<LI>Second Edition Second Thoughts
<LI>Planning and Debugging
<LI>Classifying Poker Hands
<LI>Embellishments
<LI>Putting the Project in a Context
<LI>Program Listing
</UL>

<TABLE><TR><TD><H3><A name="ch14">14.  Example: Pitcher Problem Solver</A></H3><TD>
(<A HREF="pdf/v1ch14.pdf">PDF</A>)
(<A HREF="v1ch14/pour.html">HTML</A>)
</TABLE>

<P>
<I>This program solves the category of problems in which you are given
pitchers of certain sizes and asked to use them to measure a specified
amount of water from a river.</I>

<UL>
<LI>Tree Search
<LI>Depth-First and Breadth-First Searching
<LI>Data Representation
<LI>Abstract Data Types
<LI><CODE>Sentence</CODE> as a Combiner
<LI>Finding the Children of a Node
<LI>Computing a New State
<LI>More Data Abstraction
<LI>Printing the Results
<LI>Efficiency: What Really Matters?
<LI>Avoiding Meaningless Pourings
<LI>Eliminating Duplicate States
<LI>Stopping the Program Early
<LI>Further Explorations
<LI>Program Listing
</UL>

<TABLE><TR><TD><H3><A name="ch15">15.  Debugging</A></H3><TD>
(<A HREF="pdf/v1ch15.pdf">PDF</A>)
(<A HREF="v1ch15/debug.html">HTML</A>)
</TABLE>

<UL>
<LI>Using Error Messages
<LI>Invalid Data
<LI>Incorrect Results
<LI>Tracing and Stepping
<LI>Pausing
<LI>Final Words of Wisdom
</UL>

<TABLE><TR><TD><H2>Appendices</H2><TD>
(<A HREF="pdf/v1ch16.pdf">backmatter in PDF</A>)
</TABLE>

<TABLE><TR><TD><H3>A.  Running Berkeley Logo</H3><TD>
(<A HREF="v1ch16/versions.html">HTML</A>)
</TABLE>

<UL>
<LI>Getting Berkeley Logo
<LI>Berkeley Logo for DOS Machines
<LI>Berkeley Logo for the Macintosh
<LI>Berkeley Logo for Unix
</UL>

<TABLE><TR><TD><H3>B.  GNU General Public License</H3><TD>
(<A HREF="v1ch16/appendix-gpl.html">HTML</A>)
</TABLE>

<TABLE><TR><TD><H3>Index of Defined Procedures</H3><TD>
(<A HREF="v1ch16/appuindex.html">HTML</A>)
</TABLE>

<TABLE><TR><TD><H3>General Index</H3><TD>
(<A HREF="v1ch16/appindex.html">HTML</A>)
</TABLE>

<P><A HREF="https://mitpress.mit.edu/books/computer-science-logo-style-second-edition-volume-1">MIT
Press web page for <CITE>Computer Science Logo Style</CITE></A>

<P>
<ADDRESS>
<A HREF="index.html">Brian Harvey</A>, 
<CODE>bh@cs.berkeley.edu</CODE>
</ADDRESS>
</BODY>
</HTML>