Chapter 9: Problem 8
Consider the following algorithm (which takes no input): \(j \leftarrow 1\) repeat $$\begin{aligned} j & \leftarrow j+1, n \stackrel{\phi}{\leftarrow}\\{0, \ldots, j-1\\} \\ \text { until } n &=0 \end{aligned}$$ Show that the expected running time of this algorithm is infinite (even though it does halt with probability 1 ).
Short Answer
Step by step solution
Key Concepts
These are the key concepts you need to understand to accurately answer the question.