“Imagine there are eight roses in your garden; you inspect them one-by-one randomly. Take the first three roses you encounter as sample and go on. Once you encounter a rose more beautiful than any of the first three roses, you pick it up and stop. How likely is it that the one you picked up is the most beautiful one?”
I have finished reading the second chapter of Concrete Mathematics. Here are my notes on the book and solutions to the exercises.
整理了 Miller–Rabin 素性测试的原理及实现方法。