Constructing hitting sets for randomized algorithms
Suppose that $H$ consists of $m$ seeds chosen uniformly at random (thus $|H|$ could be smaller than $m$). For each $x \notin L$, the probability that $A(x,r) = 1$ for all $r \in H$ is at most $2^{-m}$. Since there are at most $2^n$ inputs of length $n$ not in $L$, we get that the probability that $H$ is not a hitting set is at most $2^n/2^m$. Choosing $m = n+1$, we see that the probability that $H$ is not a hitting set is at most $1/2$, and in particular there must exist a hitting set of size at most $n+1$. If $L \cap \Sigma^n \neq \emptyset$, we can improve this to $m = n$.