猫狗排队:求狗的比例
Cat Dog Line
题目详情
在一条无限长的人行道上,动物排成一列。
你观察到:
- 每 7 只猫里有 6 只后面紧跟一只狗;
- 每 4 只狗里有 1 只后面紧跟一只猫。
问:人行道上动物中狗所占比例是多少?
You're walking down an infinite street, and you notice that six out of every seven cats on a sidewalk are followed by a dog, while one out of every four dogs is followed by a cat. What proportion of animals on the sidewalk are dogs?
解析
设猫与狗的比例分别为 ,。
由“猫后面跟狗”的结构,可得狗的比例满足
代入 得 ,所以
Original Explanation
Let and , respectively, be the proportion of cats and dogs on the sidewalk. We know . Let's find in terms of . Note that of all the cats, are followed by a dog. Then, of those dogs, of them are followed by another dog. Of those dogs, are followed by another dog, etc. Therefore, we can write
Substituting this into our initial equation,
so
This means
Alternatively, you can create a Markov chain representing this scenario. Namely, if state is dog and state is cat, the Markov chain is
The steady state of this Markov chain yields the same answer as above.