On a Variation of Gambler's Ruin Problem
arXiv:2506.00990
Abstract
Assume that letters (from a finite alphabet) in a text form a Markov chain. We track two distinct words, and . A gambler gains 1 point for each occurrence of (including overlapping occurrences) and loses 1 point for each occurrence of (also including overlapping occurrences). We determine the probability of gaining points before losing points, where and are integers. Additionally, we find the expected waiting time until one of the two events -- gaining points or losing points -- occurs.