[Expected DP] Question sorting

This is a collection of topics about expectation dp
Discrete expectation is the weighted average of random variables
1. Tree-climbing beetle
Question meaning: The beetle wants to climb a tree with a height of n. It starts at the root of the tree with a height of 0. When it tries to climb from a height of i -1 to a height of i, there is a probability that it will fall back into the tree. Root, find the expected value of the time it takes when it climbs from the root to the top of the tree.
The tree-climbing beetle
(The single-stop condition is: the expected number of trials when an event succeeds k times in a row)
2. Flying chess throws dice/sheep jumps on spring
Meaning of the question: From the starting point 0 to the point n, each time you throw the dice to advance, you can throw 1, 2, 3, 4, 5, 6 in 6 situations. How many times do you throw and advance? Of course, the corresponding flight channel can go directly to a point y through 2>Flying ChessFlying Chess (Note: dp[n], dp[n+1]…dp[n+5]=0 when reverse reasoning )




3. Continuously toss coins, stop when encountering "head, tail, tail", and find the average number of coin tosses.
Continuously toss coins and stop when encountering "head, tail, tail"

Guess you like

Origin blog.csdn.net/qq_50653422/article/details/134542714