6.006 Introduction to Algorithms, Recitation 1

MIT's 2020 recitation notes connect formal asymptotic bounds to input encoding, a stated Word-RAM model, and code-level operation counts, while several local claims require tighter qualification.

docs 6.006 Introduction to Algorithms, Recitation 1 Demaine, Erik, Ku, Jason, Solomon, Justin · 2020 originalarchived pdf

These official MIT 6.006 recitation notes move from problems and correctness to efficiency, formal asymptotic notation, input-size modeling, the course's Word-RAM assumptions, and a worked nested-loop analysis. Their strongest contribution is methodological: an operation count is meaningful only after the data representation and unit-cost model have been stated.

All seven physical pages were read and inspected at full rendered resolution. Pages 1–6 contain the lesson; page 7 is an MIT OpenCourseWare attribution and terms page. The archived PDF has SHA-256 0c1395e3cfbb005b0026dd92ea022d1dabd1a88fddaffe68be2f2b678b141c98. It contains native text and vector typography, with no image objects. Several displayed formulas and the code-cost annotations were checked visually because text extraction changes their layout.

What the notes contribute #

  • Pages 1–2 separate a problem specification, an algorithm, correctness, and efficiency, then explain why resource use depends on the computational model.
  • Page 3 states eventual witness definitions for OO, Ω\Omega, and Θ\Theta, treats them as function classes, and gives examples of input-size models for sequences, graphs, and dense matrices.
  • Page 4 defines the course's ww-bit Word-RAM and makes the unit-cost assumptions behind array access, arithmetic, allocation, and addressing explicit.
  • Page 5 demonstrates how representation assumptions and an operation-count sum produce an asymptotic upper bound for nested code.
  • Page 6 uses logarithmic, polynomial, exponential, and factorial comparisons to exercise the growth hierarchy.

Source claims audit #

Source claim or framing Verdict GTK treatment
Efficiency may measure time or space and depends on the algorithm and machine model current Begin with an explicit resource and cost model rather than attaching a class directly to source code
OO, Ω\Omega, and Θ\Theta are eventual function classes current with a domain convention State eventual nonnegativity for algorithmic cost and comparison functions and use membership notation
A graph's input size is Θ(V+E)\Theta(V+E) representation-dependent Apply it to an explicit adjacency-list-style representation; an adjacency matrix instead has Θ(V2)\Theta(V^2) entries
Listed arithmetic and memory operations on ww-bit words cost Θ(1)\Theta(1) valid inside the course model Present this as a Word-RAM assumption, not equal physical latency or a universal RAM definition
Addressing nn word locations needs w>log⁡2nw>\log_2 n sufficient but not minimal The exact integer condition is 2w≥n2^w\ge n, equivalently w≥⌈log⁡2n⌉w\ge\lceil\log_2 n\rceil
The birthday example is quadratic because the displayed sum is O(n2)O(n^2) conclusion needs a lower-bound witness The sum alone establishes an upper bound; a no-match input forces the full nested scan and yields worst-case Θ(n2)\Theta(n^2)
The nonconstant work occurs on code lines 8, 9, and 11 editing error The rendered listing places the corresponding operations on lines 18, 19, and 21
“Sterling's approximation” supports the factorial exercise naming error Use the standard name, Stirling's approximation; the displayed asymptotic calculation remains usable

Visual audit #

The source contains a growth-class table, a structured array interface, an annotated code listing, a displayed operation-count sum, and a page of worked equations. They are information-bearing, but none is clearer as a retained page image than accessible native text, tables, code, and mathematics. GTK therefore keeps no raster excerpt from this source. The source contains no independent plot, diagram, photograph, or remote-image dependency.

Editorial role #

GTK uses these notes for the bridge from input representation and a named Word-RAM model to a cost function. Knuth and modern mathematical references carry the notation semantics; the chapter independently supplies the missing lower-bound witnesses and qualifications recorded above.

Searches titles, aliases, headings, summaries, and full text.↑↓ move ↵ open esc close