The "Monkey Typing Shakespeare" Problem for Compositions

Shalosh B. Ekhad,Doron Zeilberger
DOI: https://doi.org/10.48550/arXiv.1901.04069
2019-01-14
Abstract:Suppose that your mother gave you n candies. You have to eat at least one candy each day. One possibility is to eat all n of them the first day. The other extreme is to make them last n days, and only eat one candy a day. Altogether, you have, famously, 2 to the power n-1 choices. If each such choice is equally likely, what is the probability that you never have three consecutive days, where in the first day you ate at least 2 candies, in the second day you ate at least 5 candies, and in the third day you ate at least 3 candies? This article describes algorithms, fully implemented in two Maple packages, to answer such important questions, and more general ones, of this kind.
Combinatorics
What problem does this paper attempt to address?