Solution: Soup Servings
Explore how to apply top-down dynamic programming with memoization to solve the Soup Servings probability problem. This lesson guides you through normalizing inputs, defining recursive states, and efficiently computing the result using probability and state caching.
We'll cover the following...
We'll cover the following...
Statement
You begin with two types of soup, A and B, each containing n milliliters. During each turn, exactly one of the following four operations is selected uniformly at random (each with probability
Serve
mL of soup AandmL of soup B.Serve
mL of soup AandmL of soup B.Serve
...