JA EN
Learn › Algorithms

Search & Optimization

Exhaustive, greedy, DP, branch and bound, approximation

01 ·Search & Optimization·★ MEMBER·8 min read Dynamic Programming From Scratch — On Remembering Subproblems Why naive recursion explodes exponentially, what memoization and table-filling actually change, and Fibonacci, knapsack and edit distance taken apart in order — ending at the places edit distance shows up in real AI systems, from ASR word error rate to diffusion step schedules. 02 ·Search & Optimization·★ MEMBER·PAPER·8 min read Graph Algorithms from Scratch — Shortest Paths and Where They Lead From transit apps to vector search, the world runs on dots and lines. We build up BFS, Dijkstra, and A* assuming zero background, then follow one unbroken thread all the way to HNSW — the graph search powering retrieval in the LLM era. 03 ·Search & Optimization·★ MEMBER·11 min read Linear Programming from Scratch — The Workhorse of Optimization The oldest and most widely deployed tool for choosing the best option under limited stock, budget and time. From the three-part recipe for writing a model down, to why the answer always sits at a corner, to what duality tells you a kilo of flour is really worth — built up from zero. 04 ·Search & Optimization·★ MEMBER·11 min read Simulated Annealing and Genetic Algorithms — What to Do When Exact Solving Breaks Down Why search methods that guarantee nothing end up running real delivery routes and factory schedules. From the three ingredients of local search, through temperature in annealing and populations in genetic algorithms, to the harder question of when you should not reach for them at all.