跳到主要内容
← 返回题库
免费概率中等

1 Leftward Jump

考察公司Jane Street

题目

Seven stones lie in a row, numbered 11 to 77 from left to right. A frog starts on stone 11. Each hop takes it to a stone it hasn't visited yet, chosen uniformly at random from the ones remaining, until it has visited every stone.

What is the probability that exactly one of its hops is to the left?

解析

先自己试一试,卡住了再打开提示。

提示 1

Every order of visiting stones 2,…,72, \dots, 7 is equally likely. Why? Work out the probability of one specific order, then of another.

提示 2

A route with exactly one left hop goes up, drops once, then goes up again. Build such a route by asking each stone whether it is in the first or the second increasing group. How many ways is that, and which of them give no left hop at all?

查看解析

Step 1: Every visiting order is equally likely. The frog visits stones 2,…,72, \dots, 7 in some order, and there are 6!=7206! = 720 possible orders. Take one, say 3,5,6,2,4,73, 5, 6, 2, 4, 7. Its probability is the product of the chances of each choice:

  • 1st hop: 66 unvisited stones, it picks 33: chance 16\tfrac16;
  • 2nd hop: 55 left, it picks 55: chance 15\tfrac15;
  • then 14\tfrac14, 13\tfrac13, 12\tfrac12 and finally 11.

So this route has probability 16⋅15⋅14⋅13⋅12⋅1=1720\tfrac16 \cdot \tfrac15 \cdot \tfrac14 \cdot \tfrac13 \cdot \tfrac12 \cdot 1 = \tfrac{1}{720}. Any other order has the same number of choices at each hop (6,5,4,3,2,16, 5, 4, 3, 2, 1), so it also has probability 1720\tfrac{1}{720}. All 720720 orders are equally likely, and

P(exactly one left hop)=number of orders with exactly one left hop720.P(\text{exactly one left hop}) = \frac{\text{number of orders with exactly one left hop}}{720}.

Step 2: What one left hop looks like. The hop from stone 11 always goes right. After that, a hop goes left exactly when the next stone is smaller than the current one. So a route with exactly one left hop goes up, drops once, then goes up again, such as

3, 5, 6  ∣  2, 4, 7,3,\,5,\,6 \;\big|\; 2,\,4,\,7,

where 6→26 \to 2 is the only left hop.

Step 3: Build these routes by splitting the stones into two groups. Ask each of the stones 2,3,4,5,6,72, 3, 4, 5, 6, 7 one question: are you in the first group or the second group? Then visit the first group in increasing order, followed by the second group in increasing order.

  • Each stone has 22 answers and there are 66 stones, so there are 2×2×2×2×2×2=26=642 \times 2 \times 2 \times 2 \times 2 \times 2 = 2^6 = 64 ways to split.
  • For example, first group {3,5,6}\{3, 5, 6\} gives the route 3,5,6,2,4,73, 5, 6, 2, 4, 7.
  • The groups don't need to be the same size, and either one can be empty.

Every route with exactly one left hop is made this way exactly once: its first group is the stones before the drop. So nothing is counted twice, and we only need to remove the splits that give no drop at all.

Step 4: Remove the splits with no drop. A split gives no drop when the first group is just the smallest stones, because then the route is 2,3,4,5,6,72, 3, 4, 5, 6, 7 with no left hop:

{},  {2},  {2,3},  {2,3,4},  {2,…,5},  {2,…,6},  {2,…,7}.\{\},\; \{2\},\; \{2, 3\},\; \{2, 3, 4\},\; \{2, \dots, 5\},\; \{2, \dots, 6\},\; \{2, \dots, 7\}.

That is 77 splits. For example, first group {2}\{2\} gives 2 ∣ 3,4,5,6,72 \,|\, 3, 4, 5, 6, 7: no left hop. In every other split, some stone in the second group is smaller than the largest stone in the first group, so the route drops exactly once.

So 64−7=5764 - 7 = 57 orders have exactly one left hop.

Check with 3 stones (2,3,42, 3, 4): there are 23=82^3 = 8 splits, and 44 give no drop ({}\{\}, {2}\{2\}, {2,3}\{2, 3\}, {2,3,4}\{2, 3, 4\}). That leaves 44 routes: 3 ∣ 2,43 \,|\, 2, 4, then 4 ∣ 2,34 \,|\, 2, 3, then 2,4 ∣ 32, 4 \,|\, 3 and 3,4 ∣ 23, 4 \,|\, 2. Listing all 3!=63! = 6 orders directly agrees: 2,3,42, 3, 4 has no left hop and 4,3,24, 3, 2 has two.

Answer:

57720=19240≈0.07917.\frac{57}{720} = \frac{19}{240} \approx 0.07917.

In general, with nn stones the probability is 2n−1−n(n−1)!\dfrac{2^{n-1} - n}{(n-1)!}.