I believe I have a "moral solution". The final paragraph must be made rigorous (or perhaps there is a cleaner way to finish things off), but it looks like this is the right direction:
Reduction:
Finishing touches (hand-wavy):
It remains to show that for fixed $c>0$ that $f(cn,n)=1-o(1)$. I will sketch an approach which I believe could madeThis follows from two observations (thanks to Fedor Petrov in the comments for clarifying my previous hand-wavy argument rigorous).
Let's renormalize this asLemma 1: $f(pn,qn)$ where$f(a,b)\ge a/(a+b)$ for all $p+q= 1$$a,b$. If
Proof: This can either easily be deduced from the original functional definition of $f$, or otherwise can be derived from the probabilistic interpretation. Indeed, $f(a,b)$ is at least the probability that when we run this fororder all $t =\epsilon n$ steps$a+b$ current balls according to what time they are drawn from the jar (which is distributed like a random permutation), that the last ball is white (since then anotherall black balls are recolored before the white balls are consumed). QED.
Lemma 2: Fix an open interval $E\subset [0,1]$. There exists some $\epsilon,\delta>0$ so that for all $p \in E$, we have that $f((1-p)n,pn) \ge f((1-p)(1-\epsilon)n+\delta n-n^{2/3},p(1-\epsilon)n+n^{2/3})-o(1)$ (with the error term tending to zero as $n\to \infty$, uniformly in all choices $p$.
Proof: We shall determine $\epsilon,\delta$ a bit later.
We keep on taking steps until we have picked out $\epsilon n$ balls which were originally in the jar. By a Chernoff bound says we should, asymptotically almost surely havewe eat at most $\approx ((1-\epsilon)p+\epsilon q)n$$(1-p)\epsilon n +n^{2/3}$ of the original white balls, and recolor at least $\approx (1-\epsilon)q n$$p\epsilon n-n^{2/3}$ of the original black balls. Also, assuming that (up to$\epsilon\le p/3$ we deterministically always have $O(\epsilon^2)$ errors$\ge (2/3)pn$ original black balls (which haven't been recolored) and $\le (1/3)pn$ new white balls. But if one looks at the function $$\frac{(1-x-100x^2)p+(x-100x^2)q}{(1-x+100x^2)q}-\frac{p}{q}$$for any
So $p,q\in (0,1)$ satisfying(via more Chernoff bounds and some coupling), almost surely we eat $p+q=1$$<(1/2+.0001)p\epsilon$ of our new white balls (on Desmos, saysince at each step we are at least twice as likely to recolor a black ball then eat a new white ball). Thus, it is clear that thatwe may take $x=0$ is not a local maximum$\epsilon = \min(E)/3, \delta = .4999\epsilon \min(E)$. QED
Thus forNow fix some small $\epsilon$$\eta>0$. By the original reduction, we should gethave that $f(pn,qn)\ge f(p'n',q'n')-o(1)$ for$f(1,n)> f((\eta-4\eta^2)n,n))(1-3\eta)\ge f(\eta/2n,n)-3\eta$ assuming $p'>p$ and$\eta$ is small $n'\ge n/2$(recall $f(a,b)\le 1$ uniformly). And so presumably asTo finish, we iterate thingsnow claim that $f((\eta/2)n,n)> 1-2\eta$ for all large $n$ (replacingwhence $p'$ by$f(1,n) > 1-5\eta$ for all large $p''$ and so on)$n$, we'll get thatso slowly having $f(pn,qn)\ge f((1-\delta)n^*,\delta n^*)-o(1)$ where$\eta\downarrow 0$ gives $n^* = \Omega_{p,\delta}(n)$$f(1,n)>1-o(1)$). From here
To verify this claim, we can use the observation (thanks to Fedor Petrov)first note that $f(a,b)\ge a/(a+b)$ to finish things$f((1-\eta)n',\eta n')\ge 1-\eta$ uniformly (to see why this is true, order the balls according to the time in which they are first removedby Lemma 1). Then we take $\epsilon, \delta$ from Lemma 2 applied to the jar; we have that this is a random permutationinterval $E = ((\eta/2)/(1+\eta/2),1-\eta)$, and if the last ball innote that the orderingfunction $\phi:p\mapsto \frac{(1-p)(1-\epsilon)+\delta}{p(1-\epsilon)} -\frac{1-p}{p}$ is whitecontinuous and non-negative on $(0,1)$, then we will end withthus there is some $c_0>0$ so that $\phi(p)>c_0$ for all balls white$p\in E$ (we can take $c_0:= \delta/\epsilon\max(E)$). So, applying Lemma 2 a bunch of times ($\approx 1/c_0\eta$), we should be able to iteratively increment the ratio $(1-p)/p$ to find some $n'$ so that $f((\eta/2)n, n)\ge f((1-\eta)n',n')-\eta$. This completes the proof.