Top Five Ideas from Every Class
Dec 2022
When in an MIT semester so dearly we work to glean insight into the world, decency toward the remembrance of the future self impels us to enumerate the top ideas from each field.
6.106 Performance Engineering
- Bithacks are magic.
- Profile to see the real bottlenecks.
- Lesson in software engineering: interfaces enable beautiful, clean abstraction.
- Lesson in leadership: estimate how long things will take and what benefit they will confer. Take on tasks the team can finish. (Otherwise, no endgame table or parallelism.)
- Heuristics for perspective and life: in Leiserchess, tuning the heuristics let the top team demolish the competition. We all viewed heuristic tuning as a maximization problem with the hugely expensive evaluation of 1000-game tournaments. The top team instead viewed heuristic weights as aiming to predict who will win the game; then they plugged 10M labeled games into least squares. Perspective. Let it stand as a lesson for life: know what you want, and the search will become easier.
Serial slowdowns: unwise algorithms, cache misses, branches, memory lookup, divisions.
Parallel problems: lock contention, false sharing, wasted work, low span, malignant races.
Speedy suggestions: prune early, precompute, vectorize, use builtins, approximate.
In the words of the venerable Jon Bentley, “Pull your head out of your butt.”
6.122 Design and Analysis of Algorithms
- Median of an unsorted array in O(n) time: split into blocks of 5, find median of medians recursively, partition on it, repeat. Median of medians is guaranteed close to middle.
- Union find: MAKE-SET(x), UNION(x, y), FIND(x) in O(\alpha(n)) amortized time per operation: n is the number of MAKE-SET and \alpha is the inverse Ackerman function.
- Minimum spanning trees: lightest edge on a cut is in some MST; heaviest edge on a cycle is in no MST; Kruskal’s finds MST in O(|E| \log |V|) time.
- Max flow: the unexpected hero. It solves questions you wouldn’t expect.
- Select uniformly random element from stream of unknown length with O(1) memory: set r = r_1, then at step j with probability 1/j set r = r_j. When the stream closes, return r.
“Zark Muckerberg has recently challenged Melon Usk to a ping pong game on Mars...”
– Every other 6.1220 pset
18.675 Theory of Probability
- If two measures agree on a pi-system with a sequence converging to the whole space, then the two measures agree everywhere. Proof: pi-lambda theorem.
- Fatou’s Lemma: E[\liminf f] \leq \liminf E[f]. Exercise: derive the Dominated Convergence Theorem, stating if f_n \to f and f_n \leq g for integrable g, then E[f_n] \to E[f].
- Conditional expectation Y = E[X | G] is G-measurable s.t. E[Y 1_H] = E[X 1_H] for all H \subset G. Another perspective: project X on to the subspace of G-measurable maps. If G is the trivial sigma algebra, then E[X | G] = E[X]. If G is the whole sigma algebra, then E[X | G] = X. Remember that sigma algebras tell us the amount of information we know.
- Characteristic function E[exp(itX)] determines the distribution of a random variable X.
- Optional Stopping Theorem: in expectation, a stopped martingale ends where it starts. Condition is \tau finite and {X_i} bounded, or E[\tau] finite and |X_i - X_{i-1}| bounded.
“Okay, so today we are going to pick up where we left off with uniform integrability...”
– Yair Shenfeld, at least once
“These psets take 20 hours the week they are due... aaaagh!”
– Me, at least once
11.011 The Art and Science of Negotiation
- Moves and turns: add deft perspective to name, interrupt, or reframe (Kolb and Porter).
- Body language: feet are honest; they point and bounce. Torso leans away from the unpleasant. Steepled hands project confidence.
- Spoilers: look out for them in important settings. Notice the signs: chameleon interests, too quiet, or too loud. Still, trust first.
- Big picture: look to the best for the company at large. As the manager, give affiliation, status, appreciation. Learn the real story.
- Inner Yes: the most powerful No has roots in a Yes to something bigger. Our faces leak our true feelings, so feel magnanimously.
- Implementability: overcome motivated blindness. Everyone loses if the deal is founded on even the sweetest lies.
Miscellaneous thoughts:
- Negotiation geniuses are calm and alert, patient and proactive, practical and creative.
- What frames do we impose on ourselves? What frames would empower us with agency? We can make our vision so much loftier than we normally allow.