Tags → #cp
-
Week 4 Day 5: Problem Solving Session - Mixing It All Up
Applying expected value, total probability, and combinatorics to solve hard CP problems.
-
Week 4 Day 4: Randomized Algorithms - Using Chaos for Good
Sometimes the best solution is a random one. Learn Fisher-Yates shuffle and Freivalds’ Algorithm.
-
Week 4 Day 3: Probability in Counting - Law of Total Probability
Combining combinatorics and probability. Solving problems by breaking them into disjoint cases.
-
Week 4 Day 2: Expected Value - The Most Likely Outcome
What is the average result if you repeat an experiment infinite times? Mastering Linearity of Expectation.
-
Week 4 Day 1: Probability Basics - Rolling Dice & Flipping Coins
Understanding independent vs dependent events, conditional probability, and the math behind games of chance.
-
Week 3 Day 5: Classic Counting - Stars, Bars, and Catalan
How to distribute candies among children? How many valid parenthesis sequences? Two powerful formulas you must know.
-
Week 3 Day 4: Inclusion-Exclusion Principle - Avoiding Double Counting
How to calculate the size of the union of multiple sets. A fundamental tool for solving complex counting problems.
-
Week 3 Day 3: Lucas Theorem - The Giant Slayer
How to compute nCr % p when n is huge (like 10^18) but p is small.
-
Week 3 Day 2: Pascal’s Triangle - DP for Counting
nCr without factorials? Pascal’s Triangle is the dynamic programming approach to finding combinations.
-
Week 3 Day 1: Basics of Combinatorics - Counting is Hard
How many ways can you arrange 5 books? How many ways to choose 3 toppings from 10? The art of counting without counting.