Skip to content
All categories

learning

227 posts
learning guide

How to Practice Workplace English Speaking: Shadowing, Scenario Drills, AI Apps, and Meeting Phrases

30 minutes a day for 12 weeks — combine shadowing, scenario practice, and AI apps to go from 'I understand but can't speak' to holding your own in meetings.

How Does A/B Testing Turn a Product Change Into an Estimable Effect?

A/B testing turns a product change into an estimate with uncertainty. A useful report covers effect size, confidence, guardrails, randomization, and launch risk.

Why Not Run Many t-Tests? What Is ANOVA Protecting?

ANOVA first checks whether three or more group means differ overall, so you do not inflate false-positive risk by running many pairwise t tests.

Why Do Large-Sample Approximations Work, and When Do They Fail?

Large-sample normal approximation describes the behavior of estimators, not raw data. It is useful, but dependence, boundaries, and distribution shift can make it unreliable.

How Does Bayesian Inference Connect Prior, Data, and Posterior?

Bayesian inference updates uncertainty about an unknown parameter by combining prior belief with the likelihood from observed data, producing a posterior distribution.

What Do Bias, Variance, and Consistency Check in Point Estimation?

Bias checks whether an estimator is centered correctly, variance checks sampling fluctuation, MSE combines both, and consistency asks whether the estimator approaches truth as sample size grows.

When the Formula Distribution Is Unknown, How Does Bootstrap Estimate Uncertainty?

Bootstrap estimates uncertainty by resampling from the observed sample with replacement, rebuilding many sample-like datasets, and watching the statistic fluctuate.

Causal Inference Basics: Why Prediction Accuracy Does Not Mean Real Effect

Causal inference separates prediction from effect. A model can predict who will buy without proving that an intervention will make them buy.

How Do You Tell Goodness-of-Fit From Independence in Chi-Square Problems?

Chi-square tests compare observed counts with expected counts. First decide whether the problem is goodness-of-fit for one categorical variable or independence for two categorical variables.

When Should Bernoulli, Binomial, Normal, and Poisson Appear?

Distributions are names for data-generating situations, not formula cards. Learn when Bernoulli, Binomial, Poisson, and Normal distributions fit a problem.

How Do You Write Confidence Intervals Without Only Memorizing Bounds?

A confidence interval puts a point estimate back inside sampling fluctuation. Computing bounds is only the first step; you also need to explain standard error, critical values, and coverage.

When You See a Dataset, What Statistics Should You Check First?

Data type determines the statistical tools you can use. Start with categorical, numeric, count, and time-ordered data, then choose summaries that fit the question.

How Does the Delta Method Estimate Uncertainty for F1 and Ratio Metrics?

The delta method transfers uncertainty through a smooth function: the local derivative expands or shrinks the estimator's original standard error.

What Makes an Estimator Good: Bias, Variance, or MSE?

An estimator is a rule for using samples to infer a population parameter. To judge whether it is good, look at bias, variance, and MSE together.

When a Mixed Problem Appears, How Do You Pick the Tool in 30 Seconds?

At the final review stage, train problem recognition: identify data type, unknown quantity, and decision goal before choosing a formula and writing a contextual conclusion.

What Do Expectation and Variance Mean in Exams and Model Evaluation?

Expectation describes long-run center; variance describes fluctuation. This post computes E[X], E[X^2], and Var(X), then connects them to average loss and model stability.

How Does Experimental Design Make Results Interpretable Rather Than Merely Correlated?

Experimental design decides whether a result can be interpreted. Randomization, control, blocking, replication, blinding, and pre-specified outcomes give inference a usable foundation.

How Does Fisher Information Tell You Whether a Parameter Is Stable?

Fisher information uses likelihood curvature to measure how well the data locate a parameter; larger information usually means a smaller standard error for the MLE.

Confidence Intervals Are More Than t-Tables: What Is the General Construction?

A confidence interval is built by defining the target estimate, describing its sampling error, and choosing a rule that turns uncertainty into a range.

How Does a GLM Choose Distributions and Link Functions by Data Type?

A generalized linear model starts from the response type, chooses a suitable distribution, and uses a link function to connect the mean to a linear predictor.

From H0 to p-Values, What Decision Is a Hypothesis Test Making?

A hypothesis test is a decision process under uncertainty: write H0/H1, choose alpha, compute a test statistic and p-value, then decide whether the data is strong enough to challenge H0.

How Do Estimation, Testing, Likelihood, and Bayes Fit on One Inference Map?

The inference map starts with the question type: point estimate, uncertainty interval, decision test, likelihood model comparison, Bayesian update, or resampling.

How Does the Likelihood Ratio Test Compare Nested Models?

The likelihood-ratio test compares the log likelihood of a restricted model with a full model; the usual chi-square reference only makes sense under nested-model and approximation conditions.

When OLS Assumptions Fail, How Can the Regression Line Still Be Used?

OLS is a useful baseline, but coefficient interpretation, inference, prediction, and diagnosis depend on assumptions about linearity, errors, independence, and variance.

How Does Logistic Regression Move From Probability to Thresholds and Error Costs?

Logistic regression estimates probabilities first. Classification decisions come later, when thresholds turn those probabilities into actions under real error costs.

Why Should Classification Start With Log Odds?

Logistic regression connects a linear score to a probability between 0 and 1. Understanding odds, log odds, and odds ratios prevents wrong coefficient interpretations.

Why Does MAP Turn Priors Into Regularization?

MAP maximizes the posterior. After taking logs, the prior becomes a penalty term, which connects Bayesian estimation to L1, L2, and regularized ML objectives.

How Do Matching and Weighting Make Observational Data More Experiment-Like?

Matching and weighting do not turn observational data into a true experiment. They try to make treatment and control comparable on observed variables.

Why Does MLE Ask Which Parameter Most Likely Generated the Data?

MLE fixes the observed data and compares which parameter values make that data most plausible; log likelihood turns products into sums and connects directly to negative log loss.

Why Does the Method of Moments Match Sample Moments to Population Moments?

Method of Moments matches sample moments to theoretical population moments, then solves for parameters. It is not always the most efficient method, but it builds the first intuition for parameter estimation.

Missing Data Is Not Just Blank Cells: How Does It Distort Statistics and Models?

Missing data can change representativeness, bias estimates, and mislead ML systems. The first question is why the data are missing.

How Do You Write an ML/AI Evaluation Report That Is More Than a Leaderboard Score?

A useful ML/AI evaluation report turns statistical evidence into a decision: ship, stage, roll back, or run more experiments.

What Do Residuals, Outliers, and Leverage Reveal About Model Failure?

Model diagnostics turn fitted errors into evidence: residual patterns, outliers, leverage, and influential points reveal how a model fails.

How Does Multivariate Analysis Organize Features That Move Together?

Multivariate analysis looks at features together. Covariance, correlation, and PCA reveal shared directions that univariate summaries miss.

What Kind of Optimal Test Is the Neyman-Pearson View About?

The Neyman-Pearson view treats a test as a decision rule: under a fixed Type I error rate alpha, choose the rejection region with the highest power.

What Assumptions Do Nonparametric Methods Relax, and What Do They Cost?

Nonparametric methods are not assumption-free. They relax fixed distributional forms, often gaining flexibility while paying in efficiency, interpretation, or overfitting risk.

How Should You Analyze NTU IM 114-115 Statistics Papers Without Memorizing Answers?

Past papers train question-analysis discipline, not fortune-telling. Each problem should return to data type, unknown quantity, statistical tool, calculation path, and contextual conclusion.

How Do You Avoid Missing Cells in Joint Distribution and PMF Transformations?

Joint PMF problems require listing every cell. Marginalization, conditional probability, and variable transformations are all sums or regroupings of the original cells.

Conditional Probability, Independence, and Bayes: What Viewpoint Is the Problem Switching?

Probability problems are often hard because the viewpoint changes. Define events first, then distinguish conditioning, independence, mutual exclusivity, and Bayes' rule.

How Do Samples, Statistics, and Sampling Distributions Differ?

A sample is the data, a statistic is a function of the sample, and a sampling distribution is the distribution of that statistic under repeated sampling.

How Do PMF, PDF, and CDF Turn Probability Into Computation?

Random variables turn uncertain outcomes into numbers. PMF, PDF, and CDF then let you compute discrete probabilities, continuous interval probabilities, thresholds, and model-score distributions.

How Should coef, SE, t, F, and R-Squared Be Read Together?

A regression table is not a p-value list: coef, SE, t, F, and R-squared answer effect size, uncertainty, single-coefficient tests, overall model signal, and in-sample explanation.

Why Do Ridge, Lasso, and Weight Decay Make Models More Stable?

Regularization adds a preference against extreme parameters. Ridge, Lasso, and weight decay trade some training fit for a model that generalizes more reliably.

How Can Statistics and ML Evaluation Be Rerun to Reach the Same Conclusion?

A reproducible workflow preserves the evidence chain from data to conclusion. Results need data versions, code, seeds, environment, metrics, and raw outputs.

Why Can a Sample Say Something About a Population or Model?

Sampling makes sample statistics fluctuate, and standard error describes that fluctuation. This post separates SD, SE, sampling distributions, and CLT, then connects them to benchmark uncertainty.

How Do Sampling Distributions Become Exam-Ready Reasoning?

A sampling distribution describes how a statistic fluctuates under repeated sampling. Means, proportions, and variances each connect to common distributions used in intervals and tests.

After 53 Posts, How Do You Connect Statistics to ML, Causality, and Mathematical Statistics?

The series does not finish all of statistics. It gives beginners a working map for exams, ML/AI evaluation, causality, Bayesian thinking, time series, and mathematical statistics.

How Does One Regression Line Become Prediction, Interpretation, and Error?

Simple linear regression uses one X to describe the average change in Y. Slope, intercept, residuals, and squared error form the smallest supervised learning model.

How Does Monte Carlo Use Repeated Simulation to Answer Hard Statistical Questions?

Monte Carlo repeats a data-generating process many times so sampling variation, power, coverage, and evaluation instability become visible.

Where Should You Start Statistics If You Need Exams and ML/AI?

Do not start statistics exam prep by memorizing formulas. Start with the sequence of data, probability, sampling, inference, regression, then connect those ideas to model evaluation, A/B testing, and uncertainty in ML/AI.

Why Should Time-Series Data Not Be Randomly Split?

Time-series data have order. Random splits can leak future information into training and make forecasting or monitoring results look better than they are.

Which Test Fits a Two-Group Mean or Proportion Difference?

Two-group comparisons start by classifying the outcome and the design: numeric or binary, independent or paired. That choice determines the standard error, test statistic, and conclusion.

How Does Variable Selection Avoid Memorizing the Training Data?

Variable selection is not only about choosing predictors. It is about avoiding noisy training-set wins that do not generalize.

Statistics Is Not Formula Memorization: What Is It Deciding?

The core of statistics is judgment: describe data, estimate unknowns, compare differences, inspect associations, and make decisions under uncertainty.

CS188 Bayes Nets and Ghostbusters: Inference When Ghosts Are Invisible

Lectures 13–18 and Project 4 move from factor operations and variable elimination to exact inference and particle filtering, letting Pacman track invisible ghosts through noisy distance sensors.

Completing CS188: Turn 28 Lectures and Projects P0–P5 into a Portfolio

Lectures 26–28 close with nuclear monitoring, AI safety, and reflection. Independent completion should preserve assumptions, test evidence, and failure analysis for Projects 1–5 instead of reporting only autograder scores.

CS188 CSPs and Multi-Agent Search: Choosing Minimax, Alpha-Beta, and Expectimax

Lectures 5–8 use CSPs to practice variables, constraints, and search order before Project 2 implements minimax, alpha-beta, and expectimax. Their key difference is the assumption made about other agents.

CS188 Decisions and Machine Learning: From VPI and Naive Bayes to Attention

Lectures 19–25 connect rational decisions and VPI to machine learning, while Project 5 uses PyTorch for regression, classification, CNNs, attention, and an optional character-GPT.

CS188 MDPs and Reinforcement Learning: From Value Iteration to Q-Learning

Lectures 9–12 and Project 3 use the same Gridworld to contrast value iteration with a known model, Q-learning from unknown dynamics, and approximate Q-learning that generalizes through features.

CS188 Search and Heuristics: Pacman from DFS and BFS to A*

Lectures 1–4 and Project 1 connect DFS, BFS, UCS, A*, state representation, and heuristic design. The goal is not memorizing algorithms but separating what the frontier, cost, and state each control.

Berkeley CS188 Spring 2026: Learn AI Through Projects P0–P5

CS188 Spring 2026 publishes 28 recordings, 27 lecture slide sets, 11 discussions, and Projects P0–P5. P0 is a Python/autograder tutorial, P1–P4 use Pacman settings, and P5 contains general machine-learning tasks.

Berkeley CS189 Spring 2025 Overview: HW1–7 with Code and Data You Can Run, Plus What Fall 2026 Looks Like

Spring 2025 at people.eecs.berkeley.edu/~jrs/189s25 is the only A3 self-study edition with notes, videos, HW1–7, code/data and past exams; Fall 2026 at eecs189.org/fa26 has a 27-lecture schedule but most materials are not yet released and the rotating site can 404 old URLs.

Berkeley CS285 L19–25: Exploration, RL Theory, Multitask Learning, and Open Problems

The final seven lectures move from exploration and theoretical limits through two review lectures to advanced exploration, multitask RL, and unresolved research problems.

Berkeley CS285 Homework and Final Projects: The CPU, GPU, and H100 Boundary

Five assignments move from CPU-friendly imitation learning to H100-based LLM RL and six-hour offline-RL runs; self-learners should use three compute tiers instead of copying the entire enrolled workflow.

Berkeley CS285 L1–4: Imitation Learning, Distribution Shift, and RL Basics

The first four lectures move from behavioral cloning to MDPs; HW1 turns distribution shift into an observable failure through MSE policies, DAgger, and flow matching.

Berkeley CS285 L11–18: From Variational Inference and LLM RL to Offline RL

L11–18 connect control as inference, LLM RL, model-based RL, and offline RL, with HW4 and HW5 providing two compute-intensive implementations.

Berkeley CS285 L5–10: Policy Gradients, Actor-Critic, DQN, and SAC

L5–10 build the deep-RL core through policy- and value-based routes; HW2 is CPU-friendly, while HW3's Atari and HalfCheetah runs can require hours of GPU time.

Berkeley CS285 Spring 2026 Guide: 25 Lectures, Five Assignments, and the Self-Study Boundary

Spring 2026 CS185/285 publishes slides for 25 lectures, nine discussion units, five assignments, and starter code; current recordings require bCourses access, while HW4 defaults to an H100, so this is not a zero-cost open course.

Berkeley CS288 Part 5: Inference-time Compute, Reasoning, and Embodied Agents

Units 15–18 place NLP models inside perception, reasoning, tool, and environment loops; the question shifts from next-token prediction to allocating inference compute and validating multi-step action.

Berkeley CS288 Part 1: From N-grams and Word Representations to Text Classification

The first four units make text countable, representable, and classifiable; A1 then moves from n-grams and perceptrons to an NBOW MLP.

Berkeley CS288 Spring 2026: 18 Slide Units, Three Assignments, and the Limits of Self-Study

CS288 moves from n-grams to RAG, reasoning, and agents through 18 public slide units and three assignments; Berkeley-only recordings make this an A3 materials route, not a public video course.

Berkeley CS288 Part 3: Pre-training, Post-training, Generation, and Evaluation

Units 08–12 turn a base model into an interactive system: pre-training establishes capability, post-training shapes behavior, and generation plus evaluation determine how outputs are used.

Berkeley CS288 Part 4: Turning Retrieval, RAG, and Advanced Architectures into a System

Units 13–14 connect models to external knowledge; A3 requires data collection, QA annotation, indexing, and ablations under CPU and latency constraints.

Berkeley CS288 Part 2: Sequence Models, Seq2Seq, and Transformers

Units 05–07 move from recurrent state to encoder-decoder models, then rewrite the information path with attention and Transformer blocks.

CMU 07-380 Fall 2026 Overview: 26 Lectures from Logic and Planning to Diffusion, HW and Project Not Yet Fully Released

07-380 Fall 2026 is the first offering of CMU's new AI II, 26 lectures from logic, planning and optimization to probabilistic graphs and generative systems; Lec01 and Prop Logic are public, HW1-7, six quizzes and the final project are still TBD — an A2→A3 transition with the 07-280 bridge.

CMU 10-301 HW1: Find ML Foundation Gaps with Mathematics and Python

HW1 is written and programming work: mathematical and CS foundations followed by a majority-vote classifier.

CMU 10-301 HW2: From Information Calculations to a Complete Decision Tree

HW2 moves from hand-calculated entropy and mutual information to an end-to-end tree learner, predictor, and evaluator.

CMU 10-301 HW3: Compare K-NN, Perceptron, and Linear Regression

HW3 is written work: a decision-tree review followed by K-NN, Perceptron, and Linear Regression through inductive bias, errors, and model selection.

CMU 10-301 HW4: Turn Logistic Regression Likelihood into a Classifier

HW4 joins probabilistic interpretation, cross-entropy gradients, and implementation into one traceable training pipeline.

CMU 10-301 HW5: Expose Neural Networks and Backpropagation with NumPy

HW5 avoids automatic differentiation so learners must track forward shapes, caches, and backward gradients themselves.

CMU 10-301 HW6: Learning Theory, MLE/MAP, and Fairness Metrics

HW6 combines generalization, MLE/MAP, probabilistic learning, fairness metrics, and social impact in one written assignment about assumptions and tradeoffs.

CMU 10-301 HW7: Move from Basic Neural Networks to Deep Learning

HW7 builds on HW5 backpropagation to address deep-model architecture and training failures, emphasizing diagnosis over merely adding layers.

CMU 10-301 HW8: From MDPs to Reinforcement-Learning Updates

HW8 connects states, actions, rewards, transitions, and value updates while separating environment dynamics, policy, and estimation error.

CMU 10-301 HW9: Close the Course with Ensembles, k-Means, PCA, and Recommenders

The final written assignment combines ensembles, clustering, representation, and recommendation to test whether you can choose a learning paradigm from problem structure.

CMU 10-301/601 Spring 2026: Learn Machine Learning Through Nine Assignments

Spring 2026 publishes material for 27 lectures and nine homework bundles; outsiders can do the core work but cannot access Panopto, Piazza, Gradescope, or official homework solutions.

learning deep-dive

CMU's AI Core Redesign: From 15-281 + 10-315 to 07-280 + 07-380

In 2026, CMU recombined its separate general-AI and SCS machine-learning introductions into the 07-280 → 07-380 sequence. This is a redistribution of content and prerequisites, not a pair of simple course renames.

Stanford CS107 Lecture 4: Bitwise Operators, Conversions, and Masks

Lecture 4 first shows that signed/unsigned conversion can preserve bits while changing meaning, that mixed comparisons may surprise, and how sign extension, zero extension, and truncation alter width. It then derives AND, OR, NOT, XOR, and bitmask idioms for testing, setting, clearing, and combining fields.

Stanford CS107 Lecture 3: Integers, Bytes, and Two's Complement

Lecture 3 starts with 32/64-bit address spaces, derives the ranges of unsigned and two's-complement signed integers, inversion-plus-one, and shared addition hardware, then separates unsigned modular arithmetic from C signed overflow and tests the model against four failure cases.

Stanford CS107 Lecture 5: Bit Shifts, Bit Tricks, and GDB

Lecture 5 extends masks to shifts, power-of-two and popcount tricks, then uses an absolute-value example to expose signed intermediate overflow at INT_MIN. Its second half establishes a GDB workflow around breakpoints, execution control, formatted printing, memory examination, and backtraces.

Stanford CS107 Lecture 2: A First C Program, Binary, and Hexadecimal

Lecture 2 puts C back into its Unix history and development environment: headers, main, printf, argc/argv, ssh, emacs, make, and executables. It then derives 8 bits = 1 byte, 256 byte patterns, and reliable conversion among decimal, binary, and hexadecimal.

Stanford CS107 Lecture 1: From the Course Map to the Unix Command Line

Winter 2026 opens by explaining why CS107 goes below programming-language abstractions: from bytes and memory through assembly and heap allocators. It then lays out the 40/10/20/30 grading structure and closes with a first tour of the Unix command line.

Harvard AI/ML Course Guide: Do CS50 AI, CS181, and CS182 Videos Match Their Assignments?

CS50 AI is Harvard's most complete public entry point, but the Summer 2026 course still uses 2020 recordings and assignment assets while the rolling OCW projects have moved to other editions. CS181 Spring 2026 exposes current homework and notes without current recordings; CS182 Fall 2026 has not yet completed an offering.

learning deep-dive

The Pacman AI Project Lineage: How Berkeley CS188 and CMU 15-281 Restructure the Same Material

CMU 15-281's Search and Games explicitly credits Berkeley's Pacman AI projects. The official course site separately lists a zero-point P0 tutorial and five programming assignments, P1–P5.

Stanford CS103 Lecture 0: From Set Language to Cantor's Diagonal

Starting with elements, subsets, and power sets, this lecture culminates in Cantor's diagonal proof that no set is as large as its own power set.

Stanford CS103 Lecture 1: Building a First Direct Proof from Even and Odd

The even-square and odd-sum examples show how arbitrary choices, assumptions, witnesses, and a want-to-show become a checkable direct proof.

Stanford CS103 Lecture 2: Negation, Contraposition, and Contradiction

This lecture identifies exactly when an implication is false, then turns quantified negation, contraposition, and contradiction into checkable proof tools.

Stanford CS103 Lecture 3: Propositional Logic, Truth Tables, and Equivalence

Propositional logic abstracts English statements into Boolean variables, then uses truth tables to check connectives, translation direction, and equivalences.

Stanford CS103 Lecture 4: Objects, Quantifiers, and Types in First-Order Logic

This lecture extends propositional logic into a language about objects: distinguish constants, predicates, functions, and propositions, then express some and every with existential and universal quantifiers.

Stanford CS103 Lecture 5: First-Order Logic II—Nested Quantifiers, Negation, and Uniqueness

Translate natural language one layer at a time: identify universal and existential forms, then handle quantifier order, negation, restricted quantifiers, and uniqueness.

Stanford CS103 Lecture 6: Functions I, from Definitions to Injection and Surjection Proofs

A function is more than a formula: domain, codomain, totality, and determinism are essential, while the quantifiers defining involutions, injections, and surjections dictate their proofs.

Stanford CS103 Lecture 7: Functions II—Surjections, Assumptions, and Composition

This lecture uses surjections and a proof about birds to separate assuming from proving, then shows that involutions are injective and surjective and carries those ideas into function composition.

Stanford CS103 Lecture 8: Cardinality by Bijections and Cantor's Diagonal Argument

Two sets have equal cardinality when a bijection pairs their elements; Cantor's diagonal set defeats every function from S to its power set by constructing a value it misses.

Stanford CS103 Lecture 9: Graphs, Part I

This lecture moves from the formal definitions of graphs and digraphs to independent sets, vertex covers, and their complement relationship.

Stanford CS103 Lecture 10: Walks, Graph Complements, and the Pigeonhole Principle

Starting with walks, paths, cycles, and components, this lecture proves that a graph or its complement is connected and develops the pigeonhole principle through degrees and monochromatic triangles.

Stanford CS103 Lecture 11: Generalized Pigeonhole, Ramsey Theory, and Average Load

Use the generalized pigeonhole principle to force a monochromatic triangle at a six-person party, then solve a movie-preference puzzle through average load and contradiction.

Stanford CS103 Lecture 12: Induction, Counterfeit Coins, and Invariants

Induction is not a list of checked examples: establish a true starting point, prove that an arbitrary true case transmits truth to the next case, and invoke the induction principle.

Stanford CS103 Lecture 13: Mathematical Induction, Part II

This lecture connects starting from ordinary induction to induction may start later, following the official examples and proof obligations.

Stanford CS103 Lecture 14: Finite Automata, Part I

This lecture connects why begin with a weak computer to from device behavior to a state machine, following the official examples and proof obligations.

Stanford CS103 Lecture 15: Finite Automata, Part II

This lecture connects the dfa definition connects the first half of cs103 to regular means that some dfa exists, following the official examples and proof obligations.

Stanford CS103 Lecture 16: Finite Automata, Part III

This lecture connects the automata ladder measures power with languages to dfa transition tables, following the official examples and proof obligations.

Stanford CS103 Lecture 17: Regular Expressions

This lecture connects from closure properties to a language syntax to regex is mathematics, not one library, following the official examples and proof obligations.

Stanford CS103 Lecture 18: Nonregular Languages

This lecture connects four equivalent descriptions of regularity to the precise finite-memory intuition, following the official examples and proof obligations.

Stanford CS103 Lecture 19: Context-Free Languages

This lecture connects from finite-state limits to recursion to the arithmetic grammar, following the official examples and proof obligations.

Stanford CS103 Lecture 20: Turing Machines, Part I

This lecture connects why the model changes after cfgs to long addition and local access, following the official examples and proof obligations.

Stanford CS103 Lecture 21: Turing Machines, Part II

This lecture connects the sample tm looks back from the end to beyond pairwise marking, following the official examples and proof obligations.

Stanford CS103 Lecture 22: Turing Machines, Part III

This lecture connects a quick quantifier audit for recognizers and deciders to why every decision problem can be represented as a language, following the official examples and proof obligations.

Stanford CS103 Lecture 23: Unsolvable Problems, Part I

This lecture connects returning from r, re, and utm to three self-reference warm-ups, following the official examples and proof obligations.

Stanford CS103 Lecture 24: Unsolvable Problems, Part II

This lecture connects defining and locating halt to why halt is recognizable, following the official examples and proof obligations.

Stanford CS103 Lecture 25: Unsolvable Problems, Part III

This lecture connects the lava diagram's two classification tasks to the deck's operational reading of rice's theorem, following the official examples and proof obligations.

Stanford CS103 Lecture 26: Complexity Theory

This lecture connects decidable does not mean feasible to efficiency requires choosing a resource, following the official examples and proof obligations.

Stanford CS103 Wrap-Up: Four Foundations and Where to Go Next

The final deck reconnects proofs, graphs, automata, and computability, then maps those foundations to Stanford courses that use them.

Stanford CS107 Lecture 15: Reading x86-64 Addressing Modes Without Confusing Addresses and Values

CS107 Lecture 15 decomposes x86-64 mov operands into immediate, register, absolute, indirect, displacement, indexed, and scaled-indexed forms, then unifies pointer dereference and array access with D + R[b] + R[i]×s.

Stanford CS107 Lecture 16: From Subregisters to x86-64 Arithmetic and Logic

CS107 Lecture 16 connects b/w/l/q data widths, subregisters, movs/movz, lea, calling conventions, arithmetic and logic, and shifts through one method: establish operand width before tracing sources, destinations, and real memory accesses.

Stanford CS107 Lecture 18: From Condition Codes to x86-64 Loops

CS107 Lecture 18 connects ZF/SF/CF/OF to cmp, test, signed and unsigned conditional jumps, then reconstructs if statements, loops, dynamic instruction counts, setcc, and cmovcc.

Stanford CS107 Lecture 17: From Multiply and Divide to x86-64 Control Flow

CS107 Lecture 17 completes full-width x86-64 multiplication and division, traces %rip through instruction bytes, and uses direct and indirect jmp to show how execution leaves its default sequential path.

Stanford CS107 Lecture 19: Understanding x86-64 Function Calls and Calling Conventions

CS107 Lecture 19 traces %rsp, push/pop, call/ret, parameters, return values, stack locals, and caller/callee register discipline to build the ABI contract that preserves data and control across functions.

Stanford CS107 Lecture 14: From C to x86-64, Reading Disassembly for the First Time

CS107 Lecture 14 dissects the ten x86-64 instructions for sum_array: addresses and machine bytes appear on the left, AT&T assembly on the right, and the reader's job is to recover C-level effects from opcodes, operands, registers, and control flow—not to write assembly from scratch.

Stanford CS107 Lecture 7: From String Search to Buffer Overflows—Input Validation Is Not Capacity Checking

CS107 Lecture 7 builds pointer-based string scanning with strchr, strstr, and strspn, then shows why valid content can still overflow a buffer: safety requires input rules, destination capacity, termination, and memory-error detection.

Stanford CS107 Lecture 25: Caching, Memory Hierarchy, and Locality

CS107 Lecture 25 builds the essential cache model from a concise deck: memory access costs are nonuniform, smaller and faster layers retain data likely to be reused, and temporal and spatial locality determine whether a program benefits.

Stanford CS107 Lecture 6: A C String Is Not a Type but a Memory Contract

CS107 Lecture 6 reduces C strings to character arrays, a terminator, and an address: every convenience in strlen, strcmp, strcpy, strncpy, and strcat depends on the caller preserving capacity and termination invariants.

Stanford CS107 Lecture 24: Profile with Callgrind, Then Read What GCC Optimized

CS107 Lecture 24 builds a measurement workflow with matrix multiplication and Callgrind, then examines GCC constant folding, common-subexpression elimination, dead-code elimination, strength reduction, code motion, and recursion-to-loop conversion. Optimization starts with bottleneck evidence.

Stanford CS107 Lecture 23: The Allocator Invariants Behind In-Place realloc

CS107 Lecture 23 advances the explicit free list to in-place realloc: split a useful remainder when shrinking, absorb free right neighbors when growing, and allocate-copy-free only as a fallback, while preserving both the physical heap and logical list.

Stanford CS107 Lecture 13: From Comparators to a Fully Generic Bubble Sort

CS107 Lecture 13 upgrades a Boolean callback to a three-way comparator, then combines void *, element width, and const void * callbacks into a fully generic bubble sort before mapping the design to qsort, bsearch, lfind, and lsearch.

Stanford CS107 Lecture 12: Function Pointers Inject Ordering into Generic C

CS107 Lecture 12 first uses char * for byte-wise generic swap and rotate, then uses a function pointer to separate bubble sort's traversal mechanism from its ordering rule: void * abstracts data types, while callbacks abstract behavior.

Stanford CS107 Lecture 11: How void * Gives C Generics Without Pretending Types Still Exist

CS107 Lecture 11 finishes the heap contracts of calloc, strdup, free, and realloc, then turns several typed swap functions into void * plus a byte count: C generics do not preserve an unknown type; they explicitly transfer responsibility for addresses, widths, and interpretation.

Stanford CS107 Lecture 21: A First Heap Allocator and the Tension Between Speed and Space

CS107 Lecture 21 starts with alignment, throughput, and utilization, then uses a bump allocator and an implicit free list to explain metadata, splitting, placement, internal and external fragmentation, and the need to coalesce freed blocks.

Stanford CS107 Lecture 22: Why an Explicit Free List Lives in Two Orders at Once

CS107 Lecture 22 replaces an implicit list with an explicit free list. Searches visit only reusable blocks, but every free block now has both physical neighbors and logical links, so unlinking, coalescing, and reinsertion must preserve both structures.

Stanford CS107 Lecture 8: A Pointer Is Not Magic, but a Copyable Address

CS107 Lecture 8 starts with address-of and dereference, explains why C pointer parameters are still passed by value, and shows how int *, char *, and char ** can modify caller-owned ints, chars, and pointers respectively.

Stanford CS107 Lecture 9: An Array Is Not a Pointer, but They Cooperate in Expressions

CS107 Lecture 9 uses seven C-string rules to separate array objects, pointer variables, and string literals: arrays often convert to first-element pointers in expressions, but storage, assignment, mutability, and sizeof remain different.

Stanford CS107 Lecture 20: After Reverse Engineering, Ask About Privacy and Trust Before Building a Heap Allocator

CS107 Lecture 20 places reverse-engineering capability in an ethical context: privacy has individual and social models, while trust combines reliance with a risk of betrayal. It then reviews process memory and shifts from heap-allocation client to allocator implementer.

Stanford CS107 Lecture 10: Stack vs. Heap Is About Lifetime and Ownership, Not Just Speed

CS107 Lecture 10 moves from sizeof and pointer arithmetic to stack-frame lifetime: returning a local array leaves a dangling pointer; malloc crosses function returns but makes NULL handling, size arithmetic, ownership, free, and leaks the programmer's responsibility.

Stanford CS107 Lecture 26: Wrap-up, Six Systems Questions, and What Comes Next

CS107 Lecture 26 closes ten weeks through six big questions: representation, text, memory, generics, execution, and allocation. It checks the learning goals through the explicit allocator and points toward CS111 and other systems courses.

Stanford CS109 Lecture 1 | What is Probability?: List outcomes first; only then assign probabilities to events.

List outcomes first; only then assign probabilities to events.

Stanford CS109 Lecture 2 | Conditional Probability: A condition restricts the sample space to outcomes still compatible with the evidence.

A condition restricts the sample space to outcomes still compatible with the evidence.

Stanford CS109 Lecture 3 | Bayes Theorem: Bayes’ theorem turns an easier generative direction into the inferential direction we need.

Bayes’ theorem turns an easier generative direction into the inferential direction we need.

Stanford CS109 Lecture 4 | Counting and Combinatorics: Decide whether order matters and repetition is allowed before choosing a formula.

Decide whether order matters and repetition is allowed before choosing a formula.

Stanford CS109 Lecture 5 | Random Variables and Expectation: A random variable maps outcomes to numbers; expectation is a weighted average, not necessarily an attainable value.

A random variable maps outcomes to numbers; expectation is a weighted average, not necessarily an attainable value.

Stanford CS109 Lecture 6 | Moments: Expectation, LOTUS, and linearity

Expectation compresses a distribution into a weighted average; LOTUS handles transformed values, while linearity makes sums tractable even without independence.

Stanford CS109 Lecture 7 | Variance and Poisson: From spread to rare-event counts

Variance describes a random variable's spread; Poisson models counts in a fixed interval and approximates a large-n, small-p binomial.

Stanford CS109 Lecture 8 | Continuous Random Variables: PDFs, CDFs, Uniform, and Exponential

A continuous variable assigns zero probability to a point and area to intervals; CDFs, Uniform, Exponential, and memorylessness build on that distinction.

Stanford CS109 Lecture 9 | Normal Distribution: Standardization, Phi, and continuity correction

Standardization maps Normal variables to Z; Phi, linear transforms, and continuity correction turn intervals and large binomials into computable probabilities.

Stanford CS109 Lecture 10 | Probabilistic Models: Joints, marginals, independence, and Bayes

A joint distribution retains the full relationship among variables; marginals, conditionals, independence, and Bayes extract different answers from it.

Stanford CS109 Lecture 11 | Inference: Prior times likelihood, then normalize

Inference multiplies each hidden-variable prior by an observation likelihood and normalizes; the same loop handles repeated evidence and discretized continuous beliefs.

Stanford CS109 Lecture 12 | General Inference: Bayesian networks, sampling, and rare evidence

A Bayesian network factorizes a huge joint through conditional independence; ancestral sampling generates joint samples, and rejection sampling filters them into a conditional.

Stanford CS109 Lecture 13 | Multinomial: Category counts, bag of words, and log probability

The Multinomial extends two-category Binomial counts to many categories; the same PMF models documents as word counts for Bayesian authorship with log-scores.

Stanford CS109 Lecture 14 | Beta: Turn an unknown probability into an updatable random variable

A Beta distribution represents full belief about an unknown success rate; success/failure data updates two parameters for posteriors, smoothing, and Thompson-sampling decisions.

Stanford CS109 Lecture 15 | Adding Random Variables and the Central Limit Theorem

A few independent sums have closed forms; general IID sums become approximately Normal under the CLT, with continuity correction for discrete sums.

Stanford CS109 Lecture 16 | Bootstrapping: Sampling statistics, error bars, and p-values

The bootstrap treats a sample histogram as a population proxy, resampling with replacement to approximate a statistic's sampling distribution, error bar, or null p-value.

Stanford CS109 Lecture 17 | Algorithmic Analysis: Conditional expectation, indicators, and recursion

Expected cost in randomized code can be conditioned on the first random choice; counting problems become indicator sums, often avoiding the full distribution entirely.

Stanford CS109 Lecture 18 | Information Theory: Surprise, entropy, information gain, and KL

Surprise turns rare events into bits; entropy is expected surprise, information gain selects uncertainty-reducing questions, and KL measures excess cost from a model distribution.

Stanford CS109 Lecture 19 | Maximum Likelihood Estimation: Hold data fixed and optimize the parameter

MLE fixes observed data and optimizes parameters; log-likelihood turns products into sums, but a maximum can also lie on a boundary.

Stanford CS109 Lecture 20 | Logistic Regression: Derive the gradient from Bernoulli likelihood

Logistic regression turns a linear score into a Bernoulli probability with sigmoid; the gradient xⱼ(y-ŷ) follows directly from the log-likelihood chain rule.

Stanford CS109 Lecture 21 | Comparing Classifiers: Beyond accuracy to calibration, error costs, and fairness

Classifier comparison requires held-out data, baselines, calibration, precision/recall, and an explicit fairness criterion—not accuracy alone.

Stanford CS109 Lecture 22 | Deep Learning: Derive backpropagation with the chain rule

A neural network stacks logistic units; a forward pass computes probabilities, while backpropagation reuses output error to obtain every gradient.

Stanford CS111 Lecture 1: Welcome to CS111!

Lecture 1 follows shared I/O cards in the 1940s, batch processing, multiprogramming, and personal computers to explain how OS responsibilities accumulated as hardware costs and user needs changed.

Stanford CS111 Lecture 2: Threads, Processes, and Dispatching

Lecture 2 defines shared and private process/thread state, then uses fork, execvp, waitpid, and thread creation to show how the kernel creates execution units.

Stanford CS111 Lecture 3: Threads, Processes, and Dispatching, Continued

Lecture 3 follows running, blocked, and ready transitions to show how PCBs, context save/restore, and the dispatcher complete one CPU-control handoff.

Stanford CS111 Lecture 4: Concurrency

Lecture 4 defeats each Too Much Milk attempt with an explicit schedule, deriving race condition, atomicity, critical section, and synchronization requirements from concrete interleavings.

Stanford CS111 Lecture 5: Mutexes, Condition Variables, and Mesa Semantics

Lecture 5 uses an eight-slot circular Pipe to prove that a mutex supplies exclusion, while a condition variable atomically releases the lock and blocks when a predicate is false; under Mesa semantics, wait must return to a while loop that rechecks the predicate.

Stanford CS111 Lecture 6: Implementing Locks

Lecture 6 evolves a one-core interrupt-masking lock through multicore version 5, tracking guard, lock, and wait-queue state to prevent races and lost wakeups.

Stanford CS111 Lecture 7: Deadlock Conditions and Global Lock Ordering

Lecture 7 extracts four necessary deadlock conditions from request/ownership graphs, then compares detection, prevention, and lock ranking; breaking circular wait is common in practice, but every module must obey one global order.

Stanford CS111 Lecture 8: FIFO, Round Robin, Priorities, and Multicore Scheduling

Lecture 8 moves from FIFO and round robin through the unimplementable SRPT ideal to adaptive priority queues and the multicore conflict among queue contention, core affinity, and work conservation.

Stanford CS111 Lecture 9: Linkers and Dynamic Linking

Lecture 9 follows source through assembly, object, executable, and process, explaining the linker's three passes and how a dynamic loader resolves shared-library addresses through a jump table at startup.

Stanford CS111 Lecture 10: Dynamic Storage Management

Lecture 10 moves from predictable LIFO stacks to heap free lists, first/best fit, and slabs, then compares reference counting with mark-and-sweep across dangling pointers, leaks, cycles, and fragmentation.

Stanford CS111 Lecture 11: Dynamic Storage Management, Continued

Lecture 11's official PDF is byte-identical to Lecture 10; this article preserves that artifact gap and focuses on reachability, dangling pointers, leaks, reference-count cycles, and mark/compact garbage collection.

Stanford CS111 Lecture 12: Trust and Operating Systems

Lecture 12 defines trust as voluntary vulnerability, separates over-trust from untrustworthiness, and applies assumption, inference, and substitution to the Linux TCB, the xz attack, and AI-code policy.

Stanford CS111 Lecture 13: Virtual Memory

Lecture 13 starts from the failures of single-tasking and load-time relocation, uses an MMU with base/bound to create isolated virtual and physical address spaces and traps, then introduces segmentation to escape one contiguous region.

Stanford CS111 Lecture 14: Virtual Memory, Continued

Lecture 14's official PDF is byte-identical to Lecture 13; this article records the gap and focuses on how multiple base/bound/protection entries enable growth, sharing, and compaction while retaining fixed-count, fragmentation, and rigid-layout limits.

Stanford CS111 Lecture 15: Paging

Lecture 15 uses fixed pages to remove inter-process external fragmentation, then connects x86-64's four-level walk, sharing and aliasing, and the TLB to trade-offs among translation speed, sparse tables, context switches, and page size.

Stanford CS111 Lecture 16: Page Faults, Demand Fetching, and Prefetch

Demand paging loads pages only when needed; present bits, precise exceptions, and restartable instructions let the kernel safely fill them from executables, zero-fill, or backing store.

Stanford CS111 Lecture 17: From Page Faults to Clock—Who Leaves When Memory Is Full?

Lecture 17 separates demand paging into fetching and replacement: MIN cannot know the future, exact LRU is too expensive, and Clock uses reference/dirty bits to find a page old enough to evict; when active working sets exceed RAM, even a 1% fault rate can cause an approximately 1,000-fold slowdown.

Stanford CS111 Lecture 18: Disk Geometry, Interrupts, and DMA

A disk hides mechanical seek and rotation behind a linear block API; modern I/O then uses memory-mapped registers, DMA queues, and interrupts so the CPU mainly issues commands and receives completions.

Stanford CS111 Lecture 19: File Abstractions, Allocation, and FAT

A file system maps durable byte collections onto disk blocks; contiguous, linked, and FAT allocation trade locality, growth, random access, and metadata cost.

Stanford CS111 Lecture 20: Multilevel Inodes, Index Walks, and Disk Scheduling

The 4.3BSD inode uses direct, single-indirect, and double-indirect tiers so lookup depth scales with file size; FIFO, SPTF, SCAN, and CSCAN then trade seek cost, fairness, and wait time.

Stanford CS111 Lecture 21: Block Cache, Free Bitmaps, and Delayed Allocation

Block cache retains hot indexes, bitmap slack preserves placement choices, and fragments plus delayed allocation trade later, better information for locality.

Stanford CS111 Lecture 22: Directory Lookup, Hard Links, and Symbolic Links

Directories map text names to file-system-local inode numbers; hard links share inode identity and reference counts, while symlinks store paths and permit cross-filesystem references with loops and dangling targets.

Stanford CS111 Lecture 23: From fsck and Ordered Writes to Write-Ahead Logging

A single file-system operation updates several blocks, but a crash can occur between any two writes; this lecture compares how fsck, ordered writes, and write-ahead logging trade recovery time, performance, durability, and consistency.

Stanford CS111 Lecture 24: Journaling, Transactions, and Checkpoints

Lecture 24 continues from the WAL entry point into transactions, idempotent replay, and checkpoints, showing why consistency is not durability and why a journal does not replace fsync or backups.

Stanford CS111 Lecture 25: Truth, Trust, and Technology—How Algorithms, Generative AI, and Deepfakes Reshape Trust

Lecture 25 separates assumption, inference, and substitution as ways to establish trust, then examines how social recommendations, generative AI, and synthetic media amplify over-trust; the response is preserved provenance, independent validation, and coordinated responsibility.

Stanford CS111 Lecture 26: Flash Translation Layers, Garbage Collection, and Wear Leveling

Flash programs pages but erases whole units; an FTL hides the asymmetry with out-of-place mapping, then manages amplification through garbage collection, temperature segregation, wear leveling, and TRIM.

Stanford CS111 Lecture 27: Trap-and-Emulate, Virtual I/O, and Nested Page Tables

A VM expands the process interface into a machine interface; the hypervisor directly executes ordinary instructions, traps privileged operations, and virtualizes interrupts, I/O, and two-stage address translation.

Stanford CS111 Lecture 28: Four Ideas Connecting Concurrency, Memory, and Storage

Lecture 28 reduces the semester to concurrency, memory, and storage, then uses four ideas—virtualization, atomicity, locality, and layering—to explain how operating systems manage shared resources.

Berkeley AI/ML Course Guide: From CS61A to CS288, What Can You Actually Study Online?

Berkeley has no standalone undergraduate AI degree. A workable path builds on the CS BA or EECS BS foundation, enters through either CS188's broad AI curriculum or CS189's mathematical machine learning curriculum, then branches into deep learning, NLP, vision, or reinforcement learning. Many 2025–2026 courses are A3, but the newest class, the newest stable URL, and the best self-study edition are not always the same.

learning deep-dive

CMU's AI Degrees: The First U.S. AI Bachelor's Turned 'What Should AI Students Learn?' into Graduation Requirements

Stanford has no AI degree; AI is a track inside CS. CMU launched the first U.S. B.S. in Artificial Intelligence in 2018, divided AI into four clusters, required one course from each, and made ethics a graduation requirement. At the master's level, MSAII sits not in CS but in the Language Technologies Institute; 84 of its 195 units cover an innovation process ending in a fundable capstone. Two official-page conflicts emerged during verification: whether the AI Core has two or three courses, and whether MSAII totals 192 or 195 units.

CMU AI/ML Course Guide: The New 07-280 Core and a Public Self-Study Route

CMU's current BSAI now runs through 07-280 and 07-380 before branching into an NLP/vision core and four AI clusters, but 07-380 does not debut until Fall 2026. The residual Spring 2026 materials for 07-280 and the complete 10-301/601 site already support self-study; retired 15-281 remains a useful legacy route.

learning deep-dive

The Conference as a Content Factory: AI Engineer's Structural Advantage

AI Engineer reached 600,000 YouTube subscribers in under three years not because it mastered video production, but because it barely needs to produce videos at all: recordings from eight conferences a year create an inexhaustible supply of YouTube material. The real constraint on content creation is structure, not skill.

A Global Map of AI and CS Courses: Which Ones Can You Actually Study in Public?

This map audits AI and CS courses at Stanford, CMU, MIT, and UC Berkeley in 2025–2026 using four access labels: A0 for a visible catalog entry, A1 for a public syllabus, A2 for partial materials, and A3 for a self-study-ready package. A course site or YouTube playlist can exist without giving outsiders access to the current videos, assignments, or starter code.

MIT AI/ML Course Guide: Course 6-4 Is a Real AI Degree, but Its Public Materials Span Three Eras

MIT has offered Course 6-4, a formal BS in Artificial Intelligence and Decision Making, since 2022. For an outside learner, however, the current degree requirements, the 2025–2026 course sites, and the best OCW editions rarely line up. A workable route follows 6-4's programming, algorithms, linear algebra, and probability foundation, then selects among 6.S191, 6.3900, 6.4110, 6.7960, vision, and robotics according to what is actually public.

Stanford CS103: A Math Course Whose First Assignment Is Installing a C++ Compiler

CS103 teaches you how to write proofs, then teaches you what can't be proven — but the part nobody mentions is that it ships C++ programming assignments, starting with PS0: install Qt Creator. Its real asset is a shelf of homegrown 'Guide to X' handouts and a Proofwriting Checklist that graders actually deduct points against, all public. Solutions and practice exams sit behind Stanford login, and the Honor Code page explains why.

Stanford CS107: The Same Course Weights Assignments at 40% One Quarter and 20% the Next

CS107 runs from Unix and C all the way to x86-64 and writing your own malloc, across seven assignments. But line up four archived syllabi and the course stops looking like one course: assignments are worth 40% in three quarters and 20% in Summer 2026, where in-class quizzes take 40%. The resubmission policy exists only in the quarters Cain taught; Troccoli's quarter has none. The one assignment that accepts no late days is the final heap allocator. And what blocks a self-learner isn't the autograder — it's that every starter repo lives on AFS.

Stanford CS109: A Probability Course That Turned "How to Read This Lecture With an LLM" Into Official Coursework

Every lecture in CS109's Summer 2026 offering ships with an official LLM Learning Guide — six concepts, a Learn prompt and a Test me prompt for each, written week by week across the quarter for a total of 23 PDFs. The same course's honor code Rule 4 forbids asking an LLM to solve your homework, and 65% of the grade sits in proctored exam rooms. Those two facts are halves of one design.

Stanford CS111: Nine Assignments Build an Operating System, and the Exams Don't Test Them

CS111's nine assignments run from lambdas to crash recovery in a journaling file system. Reading the site page by page turns up three things the syllabus blurb never mentions: assignment 3 is the point of no return, because assignment 4 compiles your assignment 3 code; a whole block of the final exam asks for definitions of ethics terms, and the public practice sheet ships with answers; and pasting your own code into an AI tool to ask about it is written down, in plain words, as an Honor Code violation.

Stanford CS161: The Algorithms Course That Lists Writing Clearly as Its Third Learning Goal

The first slide of CS161 names three goals: design, analysis, communication. The third one is why handwritten homework scores zero and why solutions have to read like a memo to a colleague. Of the eight problem sets, HW2 is the wall. The lecture notebooks exist to show that timing runs can't tell you which algorithm is faster. And the summer offering is a completely different course wearing the same number.

Stanford CS161 Lecture 1: Why Algorithm Analysis Starts with Karatsuba Multiplication

Splitting two n-digit integers in half still creates four recursive products and leaves the runtime at n². Karatsuba reconstructs the cross term with (a+b)(c+d)-ac-bd, cuts the branching factor to three, and reaches roughly n^1.585.

Stanford CS161 Lecture 2: From an InsertionSort Proof to MergeSort's n log n

Lecture 2 turns 'fast' into a worst-case bound that can be proved. A loop invariant establishes InsertionSort's correctness while its worst case is n²; a recursion invariant and O(n) work per level give MergeSort O(n log n).

Stanford CS161 Lecture 3: Reading a Recursion Tree Through the Master Theorem

For T(n)=aT(n/b)+O(n^d), the central comparison is branching growth a versus per-problem shrinkage b^d. Equality makes every level equally heavy, a<b^d makes the root dominate, and a>b^d makes the leaves dominate; outside the template, use substitution.

Stanford CS161 Lecture 4: How Median of Medians Guarantees Linear-Time Selection

Selection does not require sorting. Median of medians groups elements by five, selects the median of the group medians as a pivot, and guarantees that the larger recursive side has at most 7n/10+5 elements; substitution proves O(n) worst-case time.

Stanford CS161 Lecture 5: Proving Randomized QuickSort's Expected Time

Randomized QuickSort has O(n log n) expected time on every fixed input but Θ(n²) worst-case time. The valid proof does not substitute expected subproblem sizes into a recurrence; it computes the probability that each pair is compared.

Stanford CS161 Lecture 6: Sorting Lower Bounds and Linear-Time Radix Sort

The Ω(n log n) lower bound applies to comparison sorting. When integer keys can index buckets directly, stable Counting Sort can power Radix Sort and achieve O(n) under conditions such as M≤n^c.

Stanford CS161 Lecture 7: Binary Search Trees, Red-Black Trees, and the Source of Worst-Case O(log n)

Ordinary BST operations cost O(h) and can degrade to O(n); five red-black invariants cap the height at 2 log₂(n+1), giving search, insertion, and deletion worst-case O(log n) bounds.

Stanford CS161 Lecture 8: Hashing, Collisions, and What Expected O(1) Actually Guarantees

A universal hash family only needs to keep the collision probability of every distinct key pair at most 1/n; that makes the expected bucket size below 2, yielding expected O(1), not per-operation worst-case O(1).

Stanford CS161 Lecture 9: Graph Representations, DFS, BFS, and Proofs About Search Order

DFS and BFS both scan an adjacency-list graph in O(n+m); DFS finish times produce a topological order for a DAG, while BFS layers equal exact unweighted shortest-path distances.

Stanford CS161 Lecture 10: Why Two DFS Passes Find Strongly Connected Components

Contracting each SCC always produces a DAG; first-pass DFS finish times order those components, and a second pass on the transposed orientation discovers exactly one SCC per DFS tree in O(n+m).

Stanford CS161 Lecture 11: Dijkstra, Bellman-Ford, and Two Orders of Relaxation

Dijkstra finalizes the minimum estimate and relies on nonnegative weights; Bellman-Ford repeatedly relaxes every edge, spending O(nm) to support negative edges and detect a negative cycle reachable from the source.

Stanford CS161 Lecture 12: Dynamic Programming with Bellman–Ford and Floyd–Warshall

Dynamic programming starts by defining subproblems, derives a recurrence from optimal substructure, and evaluates states in dependency order; Bellman–Ford layers by edge count, while Floyd–Warshall layers by allowed intermediate vertices.

Stanford CS161 Lecture 13: Designing Dynamic Programs for LCS, Knapsack, and Independent Set

Lecture 13 turns dynamic programming into five steps: choose a state, derive transitions, fill the table, reconstruct a solution, and then improve the implementation. LCS takes O(mn), both knapsack variants take O(nW) pseudo-polynomial time, and maximum-weight independent set on a tree takes O(|V|).

Stanford CS161 Lecture 14: When a Greedy Algorithm Turns Local Choices into a Global Optimum

A greedy algorithm is not merely 'pick what looks best.' It keeps one choice at each step and needs an exchange argument proving that the choice preserves an optimum. Lecture 14 develops that proof pattern through activity selection, weighted completion time, and Huffman coding.

Stanford CS161 Lecture 15: Proving Prim and Kruskal with the Cut Property

The heart of MST algorithms is an invariant: the selected edges remain contained in some MST. The cut property proves that every step of Prim and Kruskal is safe.

Stanford CS161 Lecture 16: Ford–Fulkerson, Residual Networks, and Max-Flow Min-Cut

Ford–Fulkerson augments through a residual network. When no path remains, residual reachability yields a cut equal to the flow, certifying max flow, min cut, and their equality.

Stanford CS161 Lecture 17: Gale–Shapley and Revocable Greedy Choices

Deferred Acceptance permits tentative choices to be revoked. Monotone proposals prove O(n²) termination and stability, with an outcome favoring the proposing side.

Stanford CS161 Lecture 18: From the Algorithmic Toolbox to LP, Coding, and ML

The finale recaps the CS161 toolbox and points toward LP duality, Reed–Solomon coding, and ML-assisted algorithms. Officially, this lecture has slides but no notes.

A Reading Guide to Stanford's CS Courses: Ordered by Prerequisites, from CS106A to CS336

Stanford CS rests on CS103, CS107, CS109, CS111, and CS161; CS221 names three of those plus CS106B as preparation. This guide combines official prerequisites with an explicitly editorial reading order and marks public-material and offering risks.

In the AI Era, Taste Is an Amplifier

AI pushes execution cost toward zero. People with good taste create more value; people with poor taste create more garbage. The difference is not whether you can use AI, but whether your mind contains something worth amplifying before you use it. This series documents my attempt to sharpen judgment systematically.

learning deep-dive

What Paper Still Earns in a Digital-First Study Stack: Three Places It Works, and One It Doesn't

Once studying went fully digital, paper still holds three places with real evidence: reading (paper over screens at g ≈ −0.21 across 171,055 participants, widening to 0.35–0.48 when scrolling is required), writing while you answer (on screen, harder questions draw less scratch work, not more), and drawing (45% recall against 20% for writing). The one claim most people lean on, that handwritten notes stick better, spans −0.008 to +0.248 across four meta-analyses with no consensus.

AI Makes Things Smooth Exactly Where They Should Be Hard: What Generative AI Does to Learning

The single most-cited meta-analysis on ChatGPT in education (g = 0.867, ~500k views) was retracted by Nature in April 2026. But the positive finding was not overturned — the issue is that it measures performance while the AI is available. Bastani's PNAS RCT measured something else: +48% accuracy during practice with GPT-4, then 17% below never-users once access was removed.

Learning How to Learn: Auditing the Course 4.17 Million People Took — What Holds Up, What's Just a Metaphor

Dunlosky's 2013 review rated 10 study techniques; only self-testing and distributed practice earned 'high utility'. But a 2026 systematic review puts the effect at 0.22–0.46, and Pan & Rickard's transfer meta-analysis finds 'no positive transfer' once publication bias is corrected — making the premise in the framework's own name the piece that tests worst.

learning deep-dive

Evergreen Books Still Trending in 2026: A Reading List Built from Threads, Dcard, and Vocus Signals

24 evergreen books across productivity, life design, brain science, psychology, and money — selected using actual discussion evidence from Threads, Dcard, PTT, and Vocus between late 2025 and mid-2026. Strongest signal: Rewire by Nicole Vignola hit top 3 on both Eslite and Books.com.tw H1 2026 bestseller charts.