An analysis of the classical gambler's ruin problem through multiple devices variation

In this study, we propose a variant of classic 2-player ruin's problem. We advocate the use of simultaneous operation of multiple devices to conclude upon the game. The suggested scheme is rigorously analysed and shown to be balancing the game duration to a notable extend in order to achieve desirable features of giving both players opportunity to comeback as well as avoiding the stalemates. The proposed scheme, at first, mathematically elaborated by providing general expressions of the ruin probability, the ruin time, the conditional ruin time and the variance of the game. The foundational blocks of the devised game are tested and validated in-concordance with the various pre-fixation adapted by Stern (1975) and Samuels (1975). In pursuit of the objectives, the mathematical outcomes are rigorously verified by simulating various adaptations under diverse parametric settings.


Introduction
The classic gambler's ruin problem was introduced by Pascal -an influential mathematician of his era (seventeenth century); see for example [1]. The significance of the ruin problem can be seen throughout the literature. Despite such a long history of the gambler's ruin problem, it is still a problem of wide interests, see for examples, Morrow [2], Hussain et al. [3], Perotto et al. [4] and Hussain et al. [5]. To further appreciate the extended applicability of the concept in multidisciplinary research, see [6,7] in the field of applied mathematics, [8] in epidemiology, [9] in physics, [10] in the field of hydrology, [11] in quantum mechanics, [12] in biological sciences and [13] in business risk assessment.
In its simplest form, the classic ruin problem starts with two players, playing with k and a−k amount of stakes, say dollars, where a represents the total capital involved in the game. Further, before the start, one of the players either win a predefined amount of capital with probability, p or lose with probability, 1−p = q and vice versa for the other player. The main interest lies in strategizing the probability of ruin/raising and the anticipation of expected ruin time of the game. The ruin probability, say μ k , of absorption of zero and the time remaining in the game, say T k , are given by Feller [14], such as: and, where r = q p . The above expressions are valid for both cases, i.e. when there is no involvement of ties, i.e. p + q = 1 and with the ties, i.e. p + q < 1.
For conditional expectations, Stern [15] provided the expressions of E k and F k , indicating the expected steps a player has to stop the game while suffering from complete loss or gaining maximum fortune, respectively.
The general expressions are given as: and, For the variance of ruin time of the classic 2-player problem, Bach [16] provided the following expression for the symmetric game as: By allowing the tie in a single trial, Andel and Hudecova [17] further derived the expression of the variance of ruin time, when p = q as: For the asymmetric game, Andel and Hudecova [17] derived the following expression for both situations, i.e. either ties are involved or not in the game as: where, r = q/p. In literature, many researchers have been proposed variants of the classic ruin problem. For example, Kmet and Petkovsek [18] and Ethier [19] extended the game for the case of infinite stakes involved. Lefebvre [20] and El-Shehawey [21] introduced a novel mechanism of taking current fortune of the players into account while quantifying the probabilities. Moreover, Lengyel [22] extended this classic game by allowing the occurrence of ties. Harper and Ross [23] involved a variable reward for success and failure in the classic game. Another variant with multidimensional generalized gambler's ruin problem can be seen in [24]. Hussain et al. [3] and Hussain and Cheema [25] solved this game when decision based on successive events. Most recently, Perotto et al. [4] suggested the optimal rule to quit the game with unknown probabilities.
In this article, we propose a novel amendment in the conduction of classical 2-player game. We argue the introduction of multiple devices simultaneously to decide on players' gain or loss. It is proved, mathematically and through rigorous simulation, that with the application of devised strategy, the ruin time of the game increased geometrically with respect to the number of devices. This line of operation is expected to provide both opponents an enhanced chance of making a come back. We offer general expressions for the quantification of ruin probabilities, the ruin time and the conditional of ruin time and the variance of desired game plan. It is important to note that the classical 2player ruin game stays as a sub case of the proposed scheme. The proposed portfolio is thoroughly studied through simulation while considering various parametric settings.
In the next section (Section 2), we provide the mathematical developments for the ruin probabilities, expected and conditionally expected ruin times under the proposed structure and variance of the game. The performance evaluation is measured through numerical findings of the proposed strategy and then verified through a simulation study in Section 3. Finally, we summarize the research work in Section 4.

Mathematical developments
In this section, we aim at deriving the mathematical expressions for the ruin probability, the ruin time, the conditional expectations with respect to an individual's ruin time and variance of the game. The aforementioned statistics are calculated under the proposed scheme, i.e. by involving c simultaneous devices in the play. Thus, after each round of the game, the gambler either wins predefined units of the capital with probability p c or loses with probability q c . Besides that, one may appreciate that the proposed strategy takes the probability of ties into account automatically, i.e. (1 − (p c + q c )). In this article, we advocate the case of "no stake exchanged" in case of ties. For demonstration purposes, we provide results for the proposed scheme, when only two devices (most practical) are involved in the game, i.e. c = 2. It can be noted that Table 1 can be extended for the c number of devices involved in the game for the decision of a play. In the next lines, we derive the required expressions for the proposed scheme. For simplicity, we initiate our calculations for the most practical and simple case, i.e. c = 2. The general expressions are also provided.

The ruin probabilities
Let, μ k be the ruin probability of the player (gambler), playing with k amount of capital. Then the law of total probability, when c = 2 can be written in the following difference equation: For the case of symmetric game, i.e. when both players are playing with equal probabilities of win. Equation (8) has two similar roots, i.e. λ 1 = λ 2 , and we get the following general solution: where, C 0 and C 1 are two constants. By using two boundary conditions driven by two extremes, i.e. μ 0 = 1 and μ a = 0, we get C 0 = 1 and C 1 = −1/a. Hence, Equation (9) reduces to: For c = 3, it remains verifiable that the difference equation will be: , and for symmetric case, this gives the general solution as similar to Equation (9). After simplification, we get same ruin probability as we had with c = 2. Hence, for symmetric case, the ruin probability does not depend on the number of devices, therefore, the expression given in Equation (10) is valid for any c. For the asymmetric case, i.e. when both players are playing with unequal probabilities of win. In this case, Equation (8) satisfies the following difference equation: The above equation gives two different roots, i.e. λ 1 = 1 and λ 2 = q 2 p 2 , and we get the following general solution: The values of the two constants after using the boundary conditions (mentioned earlier) are: C 0 = −r a 1−r a and The general solution after simplification is: For c = 3, Equation (8) gives the following difference equation: and by using similar approach as mentioned above, we get the following solution: Hence, the ruin probabilities given in Equations (11) and (12) are generalized for any c as:

The expected ruin time of the game
The general expression for the calculation of expected ruin time can be written as: where n is the required number of trials to complete the game and k is the initial amount of gambler. By employing our scheme, i.e. c = 2 and under the law of total probability, the above expression is simplified in the following form: After using expectation operation and E(T k ) = d k (say) for simplicity, the above equation reduces to: For the case of symmetric game, i.e. p = q = 1 2 , the difference Equation (14) can be simplified as: Under the boundary conditions such that d 0 = d a = 0, the complementary solution is d k = A 1 + A 2 k, where A 1 and A 2 are constants and the particular solution remains −2k 2 . Thus the general solution is: Next, for c = 3, we can write the following difference equation as: After solving in similar fashion, we get the final solution as: Therefore, the solution can be generalized for c number of simultaneous devices as: Moreover, for a fixed amount of stakes, the expected ruin time of the game increases with respect to the number of devices increased. For the asymmetric case, i.e. p = q, the complementary solution of Equation (14) satisfying the above given boundary conditions is: where B 1 and B 2 are constants. Similarly, the particular solution is given as k q 2 −p 2 . So, the general solution can be written as: By using the above-mentioned two boundary conditions, we can determine the two constant in the above equation as: p . This will lead the final solution after some simplification as: In the case of c = 3, the ruin time is calculated in similar fashion and we get the following result: Hence, for generalization, the expected ruin time is written for any c as:

The conditional ruin time of the game
Let us define E k and F k to be the conditional expectations for the number of plays conditioning on the notion that the game will stop with ruin of the player playing with k amount of stake, or with winning of maximum fortunes involved in the game, respectively. The ruin time of the game while considering the conditional expectations is calculable as: We consider, μ k E k = d k,0 and (1 − μ k )F k = d k,a , then the above equation can be written as: where d k,0 represents the expected ruin time of the game conditional upon the player finishes at "zero" stake and d k,a is the expected ruin time of the game given that player enjoys maximum fortunes. The probability of ruin, μ k , involving the number of plays can be written as: Then the expression of conditional ruin time of the game given that the player playing with k stakes, is written as: The conditional expected ruin time of the game, given that the player enjoys the maximum stakes involved in the game, that is, d k,a can be derived through the expression such as d k,a = d a−k,0 . In the next lines, we derive the solutions for the expression given in above equation for both cases, i.e. symmetric and asymmetric. For the symmetric case, i.e. both players are playing with equal probabilities of win. The d k,0 of Equation (17) satisfies the following difference equation: By using the value of μ k given in Equation (10) and the boundary conditions, i.e. d 0,0 = d a,0 = 0, a complementary solution of Equation (18) is C 1 + C 2 k, where C 1 and C 2 are constants. Similarly, the particular solution is given as 2k 2 k 3a − 1 . Therefore the unique solution of the inhomogeneous equation [Equation (18)] satisfying the boundary conditions can be given as: and hence, Next, by replacing k with a−k in the expression of d k,0 , we attain the conditional expected ruin time of the game given that the gambler wins the whole stakes, F k , as follows: The generalization of the expressions of E k [Equation (19)] and F k [Equation (20)], for "c" number of devices can be written as: Both conditional expectations remain the function of the number of devices for a constant amount of stakes. For the asymmetric case, i.e. both players are playing with unequal probabilities of win. Under this condition, we get the resultant difference equation in the following form: We proceed by using probability generating function and value of μ k given in Equation (12) while satisfying the above-mentioned boundary conditions. The probability generating function is given as: where, and, Next, we proceed by applying usual operations to solve expected number of steps through probability generating function and document them for p > q and p < q. The expected number of steps when p > q are attained by differentiating G k (s) with respect to s and putting s = 1, such that d k,0 = G k (1). By following this line of operations, we observe For p < q, the documented results hold exactly same with interchanged subscript, 1 and 2 in Equation (21). Thus, the expected duration of the game for ruined player, d k,0 is solved as: Since, μ k E k = d k,0 , we get E k as: As, d k,a = d a−k,0 , therefore The expression of F k is provided as: The general expressions for E k and F k while using c number of devices, can be achieved by replacing r 2 with r c in the expressions of Equations (22) and (23).

The variance of the game
Let we define E(T 2 k ) = h k and can be expressed as: By employing the most practical value of the proposed scheme, i.e. c = 2 and under the law of total probability, the above expression is simplified in the following form: After using Equation (14), the above equation can be reduced as: (24) For the symmetric case, i.e. p = q = 1 2 and using Equation (15), the above equation can be simplified as: The complementary solution of Equation (25) We are interested in the variance of the desired game duration as: We can generalize the expression (26) for any number of c, as: It remains verifiable for c = 1 with the above-mentioned expression (5) proposed by Bach [16]. For the asymmetric case, i.e. p = q and using Equation (16), the above Equation (24) can be simplified as: where, r = q p and s = p 2 − q 2 . The complementary solution is h k = D 5 + D 6 (r 2 ) k , where D 5 and D 6 are constants and for a particular solution, we take, h k = D 7 k + D 8 k 2 + D 9 k(r 2 ) k . By imposing this in Equation (27), we get the following results: So, the general solution of Equation (27) will be in the following form: After employing the boundary conditions, i.e. h 0 = h a = 0, we further obtain: and, Finally, we have which simplify as the following expression: The generalization of the expression given in Equation (29), for any number of c, is given as: where, s = p c − q c . We can easily verify with c = 1, the above expression is of the form derived by Andel and Hudecova [17], given in Equation (7), for both situations, when no ties are involved in the game, i.e. p + q = 1 and the ties are involved, i.e. p + q < 1.

Numerical results
In this section, we analyse the results of the ruin probability μ k , the ruin time of the game d k , the conditional ruin times, i.e. E k and F k and the variance of the desired game. Table 1 presents the numerical findings by using respective formulas derived in the previous section for the various parametric settings. For the demonstration purposes, we considered c = 2 and total amount of stakes, i.e. a = 20. Furthermore, the probability of winning is allowed to take values such as p = 0.5, 0.53, 0.58 and 0.65. The above-mentioned structure is then studied for various initial stakes of k, ranging from 1-19. We now document some obvious features of Table 1. It is observable that for every value of winning probability (p), the d k , E k and F k remain equal, as long as both opponents are playing with equal stakes as per Stern [15] findings. However, as an attractive attribute of the proposed scheme, one may notice an increase in the above-mentioned statistics with a decrease in the value of winning probability. Moreover, we witnessed a symmetric behaviour of attribute of our interest with respect to all considered parameters, when p = q = 0.5. Our results also show that an event of ruin time and the event that anyone player is ruined are independent as per Samuels [26] findings.

Monte Carlo simulation study
In this section, we pursue the above-documented finding through a rigorous simulation study. For the purpose of consistent comparison, we consider the above nominated parametric settings. Table 2 presents the outcomes of a simulation-based investigation as a result of 20, 000 simulations. The games are simulated by using MATLAB software while considering various initial selection probabilities. One may appreciate the vividly close match between the values of Tables 1 and 2. Some simulated clicks with various parametric settings are displayed in Figure 1.

Comparative study
In this section, we compare our proposed variant with well-known variations of the gambler ruin's problem in the literature. We consider three most prominent variants of the ruin problem involving: (i) classic framework, (ii) allowing the occurrence of ties and (iii) decision based on successive events. Table 3 documents the comparative performance of contemporary methods with the newly proposed amendment. The comparative performance evaluation is conducted by considering various parametric stetting, which are mentioned in Section 3.1 with 10% involvements of tie in a single trial. For each method, we calculated the ruin probabilities and expected ruin time corresponding the various  influence parameters. The robust performance of the proposed game can be seen throughout the findings in the table. For example, for the case of initial probability 0.65 with initial stake of $1, the classic framework provide the ruin probability as 0.5385 with expected ruin time of 27.43. The game allowing ties reduces the ruin probability by 0.3846 with the increment of one step in game duration. These numbers indicate that the game with ties only favours the stronger player by noticeably reducing his/her ruin probability but on the other hand, it does not offer any advantage to the weaker player by providing minimal extension of the game. Next, the Table 3. Comparison results for classic game (C), involvement of draw (tie) (D), successive trials (S) and proposed game (P). game with successive events, further reduces the ruin probability to 0.2899 and thus favouring the stronger player more openly. On the other hand, we see shocking increase in the game duration from 27 to 88. This un-comprehensible increase in the game duration is due to high likelihood of game resulting in stalemate.
On the other hand, one may notice that, the proposed variant offers minimal ruin probability to the stronger player but with sensible increment in game duration. This trend is vividly observable in all considered parametric settings.

Summary
In this research, we present an extension of the classic 2-player ruin's problem. The proposed variant is based on use of multiple devices simultaneously while deciding a gain or loss. The rationale of the proposition then lies in extended ruin time of the game and thus providing a chance to make a come back to both players. Lengyel [22] extended the game in one direction by allowing ties, i.e. increased the ruin time of the game and this strategy is in the favour of that player who plays with p > 1/2. The proposed strategy is useful in both directions, i.e. increasing the game duration which is in the favour of that player who plays with p < 1/2 and decreases the ruin probability for other one who plays with p > 1/2. The legitimacy of the devised scheme is mathematically established and rigorously verified, numerically and through simulation. In future, it will be interesting to extent the proposed amendment for the more complex formation involving n > 2 players.