Chapter 9: Problem 10
Consider again Algorithm RN in \(\S\) 9.2. On input \(m,\) this algorithm may use up to \(\approx 2 \ell\) random bits on average, where \(\ell:=\left\lceil\log _{2} m\right\rceil .\) Indeed, each loop iteration generates \(\ell\) random bits, and the expected number of loop iterations will be \(\approx 2\) when \(m \approx 2^{\ell-1} .\) This exercise asks you to analyze an alternative algorithm that uses just \(\ell+O(1)\) random bits on average, which may be useful in settings where random bits are a scarce resource. This algorithm runs as follows:
Short Answer
Step by step solution
Key Concepts
These are the key concepts you need to understand to accurately answer the question.