A cow is standing in front of an infinite fence . On the other side is grass. The cow wants to get to this grass. Somewhere along this fence is a hole through which the cow can get to the other side. The distance d from the cow to the hole has a probability distribution f(d) associated with it i.e. the probability that the hole is k steps away from the cow is given by f(k). Note that we think of all distances as discrete i.e. they are always measured in terms of steps taken by the cow.The cow can take negative integer steps as well as positive integer steps, i.e. k steps to the left and steps to the right respectively. Also, we know that ∑(k=-∞)^∞|k|⋅f(k)<∞. We want to describe an algorithm that can find the hole with probability 1.
Problem 1 What is a sufficient condition for an algorithm to be able to find the hole with probability 1? Problem 2 Describe such an algorithm.