Errata, Lecture Slides and Videos
Lecture 0 (Prologue: Implications), slide 43
| Printed: | a[0] = (a[11] ^ a[9]); | 
| Fixed: | int temp = (a[11] ^ a[9]); and set a[0] = temp; after loop. | 
Lecture 1 (Basic Programming Concepts: Built-In Data Types), slide 46, 28:55
| Printed: | 2 < 13 | 
| Fixed: | 2 > 13 | 
Lecture 2 (Conditionals and Loops: Nesting), slide 34 (pdf only)
| Printed: | if (t == goal) | 
| Fixed: | if (cash == goal) | 
Lecture 3.B (Arrays: Examples of Array-Processing Code), 5:43 (video only)
| Printed: | NOTE: Error on page 92 in 3rd printing of text | 
| Fixed: | This errata refers only to the 1st edition of Intro to Programming in Java (August 2009) and not to more recent printings or editions. | 
Lecture 3.B (Arrays: Examples of Array-Processing Code), 10:04 (video only)
| Spoken: | a random integer in the range from i+1 to 51 | 
| Fixed: | a random integer in the range from i to 51 | 
Lecture 3.C (Arrays: Basics), slide 11 (pdf and video)
| Printed: | java PQ4_1 | 
| Fixed: | java PQarray1 | 
Lecture 4.C (Fractal Drawings), 9:36, slide 35
| Printed: | integrated function systems | 
| Fixed: | iterated function systems | 
Lecture 6.A (Recursion: Fundamentals), 11:18, slide 9
| Printed: | 7 22 11 34 17 52 26 13 49 | 
| Fixed: | 7 22 11 34 17 52 26 13 40 | 
Lecture 6.C (Recursion: Foundations), 11:27
| Printed: | collatz(3*N + 1); | 
| Fixed: | else collatz(3*N + 1); | 
Lecture 6.D (Recursion: Avoiding Exponential Waste), 0:15, slide 36
| Printed: | Fn = Fn-1 + Fn-1 | 
| Fixed: | Fn = Fn-1 + Fn-2 | 
Lecture 9.C (Performance: Mathematical models), 7:00 (video only)
| Spoken: | 5/4 N + 13/4 N + 53/2 | 
| Fixed: | 5/4 N^2 + 13/4 N + 53/2 | 
Lecture 9.C (Performance: Mathematical models), 8:40, slide 25
| Printed: | ~ N variable declarations and assignment statements | 
| Fixed: | ~ 1/2 N^2 variable declarations and assignment statements | 
Lecture 9.B (Creating Data Types: Point charges), slide 10
| Printed: | It decreases in proportion to the inverse of the distance from the charge (2D). | 
| Fixed: | More specifically, we are computing the electric potential in 3D, but restricted to a 2D subspace. | 
Lecture 9.B (Creating Data Types: Point charges), 2:24 (video only)
| Spoken: | If it was three dimensions, it would be inverse of distance squared | 
| Fixed: | If it was three dimensions, it would be still be inverse of distance | 
Lecture 9.B (Creating Data Types: Point charges), 4:44 (video only)
| Spoken: | give constructor a potential value | 
| Fixed: | give constructor a charge value | 
Lecture 9.D (Creating Data Types: Complex Numbers), slide 46
| Printed: | the zoomed-in area highlighted with red circle points to wrong location | 
| Fixed: | move red circle to correct location | 
Lecture 9.D (Creating Data Types: Complex Numbers), slide 47
| Printed: | java ColorMandelbrot -.5 0 2 < mandel.txt, -1.5 0 2, -1.5 0 0.002 | 
| Fixed: | java ColorMandelbrot -1.5 0 2 < mandel.txt, -1.5 0 0.02, -1.5 0 0.002 | 
Lecture 11.B (Searching and Sorting: Binary Search), 5:55 (video only)
| Written: | return search(... 8, 10) | 
| Fixed: | return search(... 8, 11) | 
Lecture 11.E (Searching and Sorting: Longest Repeated Substring), 6:17, slide 44
| Written: | lcp(String s) | 
| Fixed: | lcp(String s, String t) | 
Lecture 11.E (Searching and Sorting: Longest Repeated Substring), 14:25, slide 49
| Written: | 1995–2102 | 
| Fixed: | 1995–2012 | 
Lecture 13.A (Symbol Tables: APIs and clients), slide 7 (pdf and video)
| Written: | "of" appears before "it" in list of words | 
| Fixed: | "of" should appear after "it" in list of words to make list alphabetical order | 
Lecture 14.B (Regular Expressions), slide 8
| Printed: | Amino acids: CAVLIMCRKHDENQSTYFWP (replace second C with G) | 
| Fixed: | Amino acids: ACDEFGHIKLMNPQRSTVWY | 
Lecture 14.C (Theory of Computing: DFAs), slide 25-26 (pdf and video)
| Printed: | Which of the following strings does this DFA accept? | 
| Fixed: | Which of the following languages does this DFA recognize? | 
Lecture 14.C (Theory of Computing: DFAs), 11:03, slide 30
| Printed: | Which of the following strings does this DFA accept? | 
| Fixed: | Which of the following languages does this DFA recognize? | 
Lecture 15.B (Universality and Computability: A simple model of computation), slide 18 (pdf and video)
| Printed: | Second stack: 1 1 + 1 0 0 1 | 
| Fixed: | Second stack should contain : 1 1 + 1 0 1 0 | 
Lecture 15.D (Universality and Computability: Computability), slide 36 (pdf and video)
| Printed: | Card 2 has BAB as top string | 
| Fixed: | Card 2 should have X as top string | 
Lecture 17.B (A Computing Machine: Data types), slide 17 (pdf and video)
| Printed: | 1111111100001101 | 
| Fixed: | 1111111100001011 | 
Lecture 17.D (A Computing Machine: Operating the machine), slides 39 (pdf and video)
| Printed: | The title is CS.11.D.MachineI.Operating | 
| Fixed: | The title should be CS.17.D.MachineI.Operating | 
Lecture 18.A (von Neumann Machine: Perspective, 10:16, slide 9
| Printed: | 512 17-bit words (8074 bits) | 
| Fixed: | 512 17-bit words (8704 bits) | 
Lecture 18.C (von Neumann Machine: Practical Implications), slide 26 (pdf and video)
| Printed: | TOY comment for instruction AA02 is R[A] <- mem[R[A]] | 
| Fixed: | TOY comment should be R[A] <- mem[R[2]] | 
Lecture 20.D (CPU: Components and Connections), 9:27, slide 39
| Printed: | halt instructions ON when EXECUTE WRITE is ON | 
| Fixed: | halt instructions ON when EXECUTE is ON |