Spanning TreeHow can two computers share a piece of secret information without anyone else knowing? Diffie-Hellman key exchange is one of the core algorithms in cryptography for solving this problem. In this video, we build an intuition for how the algorithm works and why it's secure.
***
Spanning Tree is an educational video series about computer science and mathematics. See more at spanningtree.me
To be notified when a new video is released, sign up for the Spanning Tree mailing list at spanningtree.substack.com
Diffie-Hellman Key Exchange: How to Share a SecretSpanning Tree2024-05-27 | How can two computers share a piece of secret information without anyone else knowing? Diffie-Hellman key exchange is one of the core algorithms in cryptography for solving this problem. In this video, we build an intuition for how the algorithm works and why it's secure.
***
Spanning Tree is an educational video series about computer science and mathematics. See more at spanningtree.me
To be notified when a new video is released, sign up for the Spanning Tree mailing list at spanningtree.substack.com
Email me at brian@spanningtree.me to suggest a future topic.Perceptrons: The First Trainable Neural Networks | Teaching Computers to Learn, Part 3Spanning Tree2025-02-10 | Neural networks have become powerful tools for teaching computers to learn. But how did we train the first neural networks? In this video, we explore the first neural network that had the capacity to learn: the perceptron, developed by Frank Rosenblatt in 1957. We explore how the perceptron works and how it's able to learn from data, and we look at how Rosenblatt's perceptron compares to modern perceptrons.
Email me at brian@spanningtree.me to suggest a future topic.How Floating-Point Numbers Are RepresentedSpanning Tree2024-11-28 | Computers need to store real-numbered values, but how do they do it? There are multiple choices for how we could represent real-numbered values, but the floating-point representation standardized in IEEE 754 is the most common choice. Here, we explore how that representation works, the difference between single- and double-precision values, and what the tradeoffs are.
***
Spanning Tree is an educational video series about computer science and mathematics. See more at spanningtree.me
To be notified when a new video is released, sign up for the Spanning Tree mailing list at spanningtree.substack.com
Email me at brian@spanningtree.me to suggest a future topic.Mathematical Origins of Machine Learning | Teaching Computers to Learn, Part 2Spanning Tree2024-08-12 | Many of the ideas that are central to artificial intelligence have their roots in ideas developed hundreds of years ago. In this video, we explore a few key mathematicians and their ideas — Carl Friedrich Gauss searching for a missing planet, Gottfried Wilhelm Leibniz studying functions and how they change, and Augustin-Louis Cauchy trying to optimize orbital models — and understand how their work laid the foundation for the techniques we use in machine learning today, through the development of the method of least squares, the chain rule, and the gradient descent algorithm.
This is Part 2 of Teaching Computers to Learn, a series on the development of artificial intelligence. See Part 1 at youtu.be/HzLom8rk2zo.
***
Spanning Tree is an educational video series about computer science and mathematics. See more at spanningtree.me
Email me at brian@spanningtree.me to suggest a future topic.
0:00 A Missing Planet 1:37 Parameters 2:53 Method of Least Squares 6:04 Calculus 6:50 Chain Rule 9:51 Gradient DescentTeaching Computers to Learn, Part 1Spanning Tree2024-07-28 | As we continue to make new advances in artificial intelligence and machine learning, this series takes a look back at the story of how we taught computers to learn. What are the ideas that made modern AI tools possible? Where did the ideas come from? And what's the logic behind how they work?
***
Spanning Tree is an educational video series about computer science and mathematics. See more at spanningtree.me
To be notified when a new video is released, sign up for the Spanning Tree mailing list at spanningtree.substack.com
Email me at brian@spanningtree.me to suggest a future topic.
0:00 Intelligence 0:45 Theseus 2:07 Turing Test 3:49 Playing Chess 5:30 Artificial NeuronsUnderstanding B-Trees: The Data Structure Behind Modern DatabasesSpanning Tree2024-04-29 | B-trees are a popular data structure for storing large amounts of data, frequently seen in databases and file systems. But how do they really work? What makes them efficient? In this video, we explore the inner workings of the B-tree, aiming to understand the properties that make them useful and the elegant algorithms that make working with them possible.
***
Spanning Tree is an educational video series about computer science and mathematics. See more at spanningtree.me
To be notified when a new video is released, sign up for the Spanning Tree mailing list at spanningtree.substack.com
Email me at brian@spanningtree.me to suggest a future topic.How do computers add numbers so quickly?Spanning Tree2024-02-27 | For computers to be able to perform billions of operations per second, they need strategies to make calculations quickly. Carry-lookahead adders make addition much more efficient by reducing the amount of time circuits spend waiting for carries to be calculated.
***
Spanning Tree is an educational video series about computer science and mathematics. See more at spanningtree.me
To be notified when a new video is released, sign up for the Spanning Tree mailing list at spanningtree.substack.com
Email me at brian@spanningtree.me to suggest a future topic.
0:00 Ripple Carry Adders 2:40 Carry-Lookahead 7:40 Combining CLAsAES: How to Design Secure EncryptionSpanning Tree2023-08-22 | In 1997, a contest began to develop a new encryption algorithm to become the Advanced Encryption Standard. After years of debate, one algorithm was chosen as the AES. But how does AES work? And what makes for a secure encryption algorithm?
***
Spanning Tree is an educational video series about computer science and mathematics. See more at spanningtree.me
To be notified when a new video is released, sign up for the Spanning Tree mailing list at spanningtree.substack.com
Email me at brian@spanningtree.me to suggest a future topic.
***
0:00 The Contest 1:02 Encryption 3:57 Confusion and Diffusion 5:44 Block Cipher 6:55 KeyExpansion 7:34 AddRoundKey 8:14 Substitution Cipher 8:55 SubBytes 11:30 MixColumns 12:53 ShiftRows 13:21 The AlgorithmUnderstanding the Halting ProblemSpanning Tree2023-05-07 | The halting problem is an important problem in computer science that asks whether we can construct an algorithm to determine whether a computer program will run forever. It turns out that the halting problem can't be solved, and in this video, we look at the proof to understand why.
***
Spanning Tree is an educational video series about computer science and mathematics. See more at spanningtree.me
To be notified when a new video is released, sign up for the Spanning Tree mailing list at spanningtree.substack.com
Email me at brian@spanningtree.me to suggest a future topic.Minimax: How Computers Play GamesSpanning Tree2023-04-19 | An introduction to Minimax, an algorithm that can be used to find the best move to play in an adversarial game like Tic-Tac-Toe, Chess, Go, and more. We explore how the algorithm works and some techniques we can use to make the algorithm more efficient.
0:00 Introduction 0:24 Minimax 5:12 Algorithm Pseudocode 8:42 Game Trees 10:28 Alpha-Beta Pruning 12:19 Evaluation Functions
***
Spanning Tree is an educational video series about computer science and mathematics. See more at spanningtree.me
To be notified when a new video is released, sign up for the Spanning Tree mailing list at spanningtree.substack.com
Email me at brian@spanningtree.me to suggest a future topic.An Introduction to Propositional LogicSpanning Tree2022-12-11 | An introduction to propositions, truth tables, and logical equivalence, and logical operators — including negation, conjunction, disjunction, and implication.
***
Spanning Tree is an educational video series about computer science and mathematics. See more at spanningtree.me
To be notified when a new video is released, sign up for the Spanning Tree mailing list at spanningtree.substack.com
Email me at brian@spanningtree.me to suggest a future topic.
0:00 Logic 0:54 Propositions 1:35 Negation (Not) 1:59 Conjunction (And) 2:26 Disjunction (Or) 3:01 Truth Tables 4:21 Exclusive Or (Xor) 4:50 Implication 7:00 Equivalence 9:19 Biconditional 9:55 ConclusionCan You Always Win a Game of Tetris?Spanning Tree2020-09-07 | If you played the game perfectly, could you always win a game of Tetris? Or is there some sequence of blocks that could force you to lose the game, no matter how good at the game you are? Here, we take a look at some of the mathematics behind a theoretical game of Tetris and reason through whether it's possible to win.
For the full proof described in this video, see Heidi Burgiel's "How to Lose at Tetris": https://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.55.8562&rep=rep1&type=pdf
***
Spanning Tree is an educational video series about computer science and mathematics. See more at spanningtree.me
To be notified when a new video is released, sign up for the Spanning Tree mailing list at spanningtree.substack.com
Email me at brian@spanningtree.me to suggest a future topic.How Fast Could a Computer Be?Spanning Tree2020-08-22 | In theory, a 1-kilogram computer could process no more than 1.36 × 10⁵⁰ bits per second. This is Bremermann's limit: a limit on the maximum rate at which computers can process information. But where does the limit come from? And are there computations that are still impractical, even for a computer that could reach the limit?
This video is part of the MegaFavNumbers video series.
***
#MegaFavNumbers
***
Spanning Tree is an educational video series about computer science and mathematics. See more at spanningtree.me
To be notified when a new video is released, sign up for the Spanning Tree mailing list at spanningtree.substack.com
Email me at brian@spanningtree.me to suggest a future topic.
***
Earth texture: solarsystemscope.com/texturesHow Dijkstras Algorithm WorksSpanning Tree2020-08-15 | Dijkstra's Algorithm allows us to find the shortest path between two vertices in a graph. Here, we explore the intuition behind the algorithm — what information we need to keep track of, in what order we need to explore vertices, and what the limitations of the algorithm are.
***
Spanning Tree is an educational video series about computer science and mathematics. See more at spanningtree.me
To be notified when a new video is released, sign up for the Spanning Tree mailing list at spanningtree.substack.com
Email me at brian@spanningtree.me to suggest a future topic.When to Launch a Mars MissionSpanning Tree2020-08-06 | When's the right time to launch a spacecraft from Earth to Mars? Ideally, we want to find the perfect launch window when the planets are aligned for a journey that will minimize the amount of fuel needed. In celebration of NASA's launch of Perseverance and the 8th anniversary of the landing of Curiosity, we explore some orbital mechanics, the Hohmann transfer orbit, and what it takes to get a spacecraft to Mars.
***
Spanning Tree is an educational video series about computer science and mathematics. See more at spanningtree.me
To be notified when a new video is released, sign up for the Spanning Tree mailing list at spanningtree.substack.com
Email me at brian@spanningtree.me to suggest a future topic.
***
Images textures courtesy of solarsystemscope.comWhat Is the Pigeonhole Principle?Spanning Tree2020-08-02 | The Pigeonhole Principle is a simple-sounding mathematical idea, but it has a lot of various applications across a wide range of problems. Learning to recognize pigeons and pigeonholes as they appear in different problems can help in discovering possible solutions.
Email me at brian@spanningtree.me to suggest a future topic.
***
Earth texture courtesy of solarsystemscope.com/texturesA Computer Built With DominosSpanning Tree2020-07-27 | By arranging enough dominos into just the right structure, we can build a computer. But how do we arrange dominos in such a way that they can perform computation? Here, we explore the process of building domino logical circuits by carefully arranging dominos into configurations that can compute logical functions.
0:00 A Domino Computer 0:56 OR 1:39 XOR 2:47 AND 4:30 Half Adder 6:06 Full Adder 7:20 The Circuit
I first saw this concept in Matt Parker's 10,000 Domino Computer (youtube.com/watch?v=OpLU__bhu2w), which I'd absolutely recommend watching: computer simulations make for great visualizations, but building the physical domino circuit is an entirely different type of impressive.
***
Spanning Tree is an educational video series about computer science and mathematics. See more at spanningtree.me
To be notified when a new video is released, sign up for the Spanning Tree mailing list at spanningtree.substack.com
Email me at brian@spanningtree.me to suggest a future topic.Randomness and Kolmogorov ComplexitySpanning Tree2020-07-23 | What does it mean for something to be "random"? We might have an intuitive idea for what randomness looks like, but can we be a bit more precise about our definition for what we would consider to be random? It turns out there are multiple definitions for what's random and what isn't, but a particularly interesting idea is that of Kolmogorov randomness. Here, we take a look at Kolmogorov randomness (defined in terms of Kolmogorov complexity) to understand what the intuition behind it is and to develop a sense for what it really means for a sequence of values to be random.
Email me at brian@spanningtree.me to suggest a future topic.What Is a Binary Heap?Spanning Tree2020-07-16 | Binary heaps are very practical data structures used in a variety of algorithms — including graph searching algorithms, compression algorithms, and more. Here, we explore how binary heaps work: what they're used for, how to add new data into them, and how to remove data from them once we're done.
Note that the tree shapes presented in this video differ slightly from the traditional implementation of binary heaps, where the lowest level of the tree is filled with nodes from left to right. The implementation presented in this video is adapted from Stuart M. Shieber's "Programming Well: Abstraction and Design in Computation".
***
Spanning Tree is an educational video series about computer science and mathematics. See more at spanningtree.me
To be notified when a new video is released, sign up for the Spanning Tree mailing list at spanningtree.substack.com
Email me at brian@spanningtree.me to suggest a future topic.Race Conditions and How to Prevent Them - A Look at Dekkers AlgorithmSpanning Tree2020-07-12 | When two programs both need access to some shared data, how do we ensure that they don’t try to manipulate the data at the same time? This is the mutual exclusion problem, and it’s often solved with hardware. But even without any special hardware, Dekker’s Algorithm offers a way to ensure that programs can only access the shared data one at a time. Here, we take a visual look at Dekker’s Algorithm: what’s the intuition behind it? How does it work? And why does it prevent race conditions?
Email me at brian@spanningtree.me to suggest a future topic.Getting Unstuck 2020 - 10 days of Scratch projects!Spanning Tree2020-07-05 | This year, I'm participating in Getting Unstuck 2020, a project run by the Harvard Graduate School of Education's Creative Computing Lab. It's 10 days of 10 Scratch projects, and it's an opportunity for creating, sharing, and learning in Scratch — a block-based visual programming language. If computer science and education is of interest to you, I'd encourage you to sign up at https://gettingunstuck.gse.harvard.edu/!
Thank you to Karen, Paulina, and the rest of the Getting Unstuck team for making this event possible!
This video is made by me, a participant in the program, and is not an official video from the Creative Computing Lab.
***
Brian YuThe Science Behind ElevatorsSpanning Tree2020-07-03 | What algorithm should an elevator follow to decide which floor to visit next? What if there are multiple elevators? What should the elevators prioritize? In this video, we take a look at some of the algorithms and priorities that elevator systems might take into account.
0:00 The Elevator 2:09 Multiple Elevators 3:24 A Modern Approach
Interested in reading more about the science of elevators? Check out this Popular Mechanics article, which served as one of the inspirations for this video.
Email me at brian@spanningtree.me to suggest a future topic.Pattern Matching in Python?Spanning Tree2020-06-24 | Python Enhancement Protocol (PEP) 622 proposes introducing support for structural pattern matching into Python 3.10, much like other functional programming languages like Haskell and ML. It's still a draft, and Python 3.10 is still more than a year away from an official release, but there's a working implementation to try! Here, I take a look at pattern matching in action.
0:00 PEP 622 0:46 Structural Pattern Matching 2:23 Extracting Values from Patterns 5:41 Guards 6:41 Maximum 8:56 Closing
***
Spanning Tree is an educational video series about computer science and mathematics. See more at spanningtree.me
To be notified when a new video is released, sign up for the Spanning Tree mailing list at spanningtree.substack.com
Email me at brian@spanningtree.me to suggest a future topic.What Are Bloom Filters?Spanning Tree2020-06-22 | Why are bloom filters such useful data structures? How do they work, and what do they do? This video is an introduction to the bloom filter data structure: we'll explore what they are, how they work, and build an understanding for why they're so efficient.
***
Spanning Tree is an educational video series about computer science and mathematics. See more at spanningtree.me
To be notified when a new video is released, sign up for the Spanning Tree mailing list at spanningtree.substack.com
Email me at brian@spanningtree.me to suggest a future topic.How Googles PageRank Algorithm WorksSpanning Tree2020-06-17 | Google's PageRank algorithm is one of the most important algorithms on the Internet. The algorithm attempts to rank pages according to their importance. But what does it mean for a web page to be "important"? In this video, we explore the "random surfer" model, which allows us to calculate a page's PageRank by simulating a random surfer who browses the web one page at a time.
0:00 PageRank 1:39 Random Surfer Model 3:40 Damping Factor
***
Spanning Tree is an educational video series about computer science and mathematics. See more at spanningtree.me
To be notified when a new video is released, sign up for the Spanning Tree mailing list at spanningtree.substack.com
Email me at brian@spanningtree.me to suggest a future topic.Understanding Logic GatesSpanning Tree2020-06-15 | We take a look at the fundamentals of how computers work. We start with a look at logic gates, the basic building blocks of digital circuits. These gates include NOT, AND, OR, NAND, NOR, XOR, and XNOR.
0:00 Transistors 1:21 NOT 2:13 AND and OR 3:28 NAND and NOR 5:17 XOR and XNOR
***
Spanning Tree is an educational video series about computer science and mathematics. See more at spanningtree.me
To be notified when a new video is released, sign up for the Spanning Tree mailing list at spanningtree.substack.com
Email me at brian@spanningtree.me to suggest a future topic.How to Send a Secret MessageSpanning Tree2020-06-11 | How do you send a secret message if someone might be eavesdropping? How can you give someone a locked box to open without giving them the key? Here, we take a look at the three-pass protocol and man-in-the-middle attacks.
0:00 Locks and Keys 1:20 Three-Pass Protocol 3:28 Man in the Middle
***
Spanning Tree is an educational video series about computer science and mathematics. See more at spanningtree.me
To be notified when a new video is released, sign up for the Spanning Tree mailing list at spanningtree.substack.com
Email me at brian@spanningtree.me to suggest a future topic.Hamming Codes - How Data Corrects ItselfSpanning Tree2020-06-07 | What happens if a mistake happens when data is transferred? With Hamming codes, we give data the ability to correct its own mistakes. Here, we explore how that works.
0:00 Errors in Data 0:56 Parity Bits 2:14 Correcting Errors 3:38 Hamming Code
***
Spanning Tree is an educational video series about computer science and mathematics. See more at spanningtree.me
To be notified when a new video is released, sign up for the Spanning Tree mailing list at spanningtree.substack.com
Email me at brian@spanningtree.me to suggest a future topic.The Mathematical Danger of Democratic VotingSpanning Tree2020-06-02 | Elections might seem like they produce results people want, but that isn't always the case.
Email me at brian@spanningtree.me to suggest a future topic.How to Count Dice Rolls - An Introduction to Dynamic ProgrammingSpanning Tree2020-05-31 | Dynamic programming is a common technique in computer science for solving problems more efficiently. Here, we introduce the ideas and motivations for dynamic programming by counting the number of ways to roll dice.
Email me at brian@spanningtree.me to suggest a future topic.How Do You Calculate a Minimum Spanning Tree?Spanning Tree2019-11-24 | A story based on Kruskal's Algorithm
***
This video is part of a project I worked on in graduate school for Professor Karen Brennan's beautiful course T550: Designing for Learning by Creating. Spanning Tree is now an educational video series about computer science and mathematics. See more at spanningtree.me
To be notified when a new video is released, sign up for the Spanning Tree mailing list at spanningtree.substack.com