I'm afraid I'm stuck on something that seems way too simple. I'm trying to calculate the chances of a brute force attack succeeding within a given time period. Simplified problem statement:
Say I have 10 possible combinations (0-9) and 2 choices (say I'm done when I find 3 or 7) and I get to try twice per day. This would give the following 'chances of finding in a given number of days' I believe:
day 1: 2/10 = 20%
day 1: 2/ 9 = 22%
day 2: 2/ 8 = 25%
day 2: 2/ 7 = 29%
day 3: 2/ 6 = 33%
day 3: 2/ 5 = 40%
day 4: 2/ 4 = 50%
day 4: 2/ 3 = 66%
day 5: 2/ 2 = 100%
So there is a chance of > 50% that you will succeed within 4 days.
Is this correct? Is there a forumla I can plug into a calculator to play with these numbers?
Let $A_i$ be the event of 'first correct guess on try $i$'.
Calculate $\Pr(A_i)$ as $1-\Pr(A_i^c)$
$\Pr(A_1)=1-\frac8{10}=\frac15$
$\Pr(A_2)=1-\frac8{10}\cdot\frac79=\frac{17}{45}$
$\Pr(A_3)=1-\frac8{10}\cdot\frac79\cdot\frac68=\frac{7}{15}$
and so on.
You have a better than $50\%$ of getting a correct guess within your first 4 tries (in fact it's a $\frac23$ chance within 4 tries).
EDIT:
As per bobbym's comment, $\Pr(A_3)=\frac8{15}.$ So already within 3 guesses, there is a better than $50\%$ chance of a correct guess.