Interactive Demo

Learning Search: Why One Probability Increases While the Other Stays Flat

Move the sliders and watch the live attempt boxes immediately. This page separates the local probability of success on the next attempt from the overall distribution of the first success position.

1. Local view: next attempt

After 0 failed guesses, those wrong combinations are removed. The next guess is selected from the remaining combinations.

P(success next | r failures) = 1 / (N − r)
This probability increases during the process because the search has memory.

2. Overall view: first success position

Before the search starts, the correct combination is equally likely to be in any position of the non-repeated guessing order.

P(X = k) = 1 / N,   k = 1, 2, ..., N
This distribution stays flat: position 1, 2, 3, ..., N are equally likely.

Which probability matters in engineering analysis?

Local / operational question

“Given what has already happened, what is the chance of success now?”

P(success next | r failures) = 1 / (N − r)

Useful while the process is running.

Global / design question

“Before we start, where is the first success likely to occur?”

P(X = k) = 1 / N

Useful for comparing designs, expected effort, and risk.

One tells you what happens next. The other tells you what happens overall. Engineering analysis usually needs the overall distribution because it helps compare designs before the process happens.

Interpretation

Learning does not move the correct combination to a different position in the original random order. It only avoids wasting attempts on repeated wrong guesses.

With memory

No repeated guesses. The expected attempt number is:

E[X] = (N + 1) / 2

Without memory

Repeated guesses are possible. For random guessing with replacement:

E[X] = N