Markov models for the tipsy cop and robber game on graphs
MMARKOV MODELS FOR THE TIPSY COP AND ROBBER GAME ON GRAPHS
VIKTORIYA BARDENOVA, VINCENT CIARCIA, ERIK INSKO
Abstract.
In this paper we analyze and model three open problems posed by Harris, Insko, Prieto-Langarica, Stoisavljevic, and Sullivan in 2020 concerning the tipsy cop and robber game on graphs. Thethree different scenarios we model account for different biological scenarios. The first scenario is when thecop and robber have a consistent tipsiness level though the duration of the game; the second is when thecop and robber sober up as a function of time; the third is when the cop and robber sober up as a functionof the distance between them. Using Markov chains to model each scenario we calculate the probabilityof a game persisting through M rounds of the game and the expected game length given different startingpositions and tipsiness levels for the cop and robber. Introduction
The game of cops and robbers on graphs was introduced independently by Quilliot [1] and Nowakowskiand Winkler [6]. In this game, a cop and a robber alternate turns moving from vertex to adjacent vertexon a connected graph G with the cop trying to catch the robber and the robber trying to evade the cop.In 2014, Komarov and Winkler studied a variation of the cop and robber game in which the robber is tooinebriated to employ an escape strategy, and at each step he moves to a neighboring vertex chosen uniformlyat random [4].In 2020, Harris, Insko, Prieto-Langarica, Stoisavljevic, and Sullivan introduced another variant of the copand robber game that they call the tipsy cop and drunken robber game on graphs [5]. Each round of thisgame consists of independent moves where the robber begins by moving uniformly and randomly on thegraph to an adjacent vertex from where he began, this is then followed by the cop moving to an adjacentvertex from where she began; since the cop is only tipsy, some percentage of her moves are random and someare intentionally directed toward the robber.In this paper, we generalize the work of Harris et al. to analyze the tipsy cop and tipsy robber game.One inspiration for this study to model is the biological scenario illustrated in the YouTube video [2] where a neutrophil chases a bacteria cell moving in randomdirections. While the bacteria’s movement seems mostly random, the neutrophil’s movement appears slightlymore purposeful but a little slower.Harris et al. modeled the game by having the players alternate turns. In this paper we use a slightlydifferent model of the game that was suggested to us by Dr. Florian Lehner. We let the cop and robber beany amount of tipsy and rather than assume that the players alternate turns and flip a coin to determineif the player moves randomly or not, we use a spinner wheel to determine the probability of whether thenext move will be a sober cop move, a sober robber move, or a tipsy move by either player. We model thisscenario on vertex-transitive graphs (both finite and infinite examples) and on non-vertex transitive graphs(friendship graphs) using the theory of Markov chains. Given a set of initial conditions on each player’stipsiness and their initial distance, the questions we consider are: • What is the probability P ( i, j, M ) that the game, beginning in state i , will be in state j after exactly M rounds? • What is the probability G M ( d ) that the game lasts at least M rounds if they start distance d away? • What is the expected number E ( d ) of rounds the game should last if they start distance d away?For some of these graphs we are able to identify when the expected capture time is finite and when therobber is expected to escape. Date : May 2020. a r X i v : . [ m a t h . C O ] F e b n Section 2 we introduce our model of the tipsy cop and robber game on both vertex-transitive andnon-vertex transitive graphs. In Section 3 we analyze the game on regular trees and compare it to thefamous Gambler’s ruin problem [3]. In Section 4 we present our general method for analyzing the gameusing Markov chains, and we then apply these methods to analyze the game on specific families of graphsin Sections 5- 8. In Section 5 we analyze the game on cycle graphs. In Section 6 we analyze the game onPetersen graphs. In Section 7 we analyze the game on friendship graphs. In Section 8 we analyze the gameon toroidal grids. In Section 9 we present a model for the game where players start off drunk and soberup as the game progresses, answering Question 6.1 from Harris et al. [5] Finally, in Section 10 we present amodel for the game where the players’ tipsiness increases as a function of the distance between them, thusproviding an answer to Question 6.6 from Harris et al. [5]. While we present our methods with specificexamples from each family of graphs we analyze, we also include our Cocalc (Sage) code in the Appendix sothat any reader may adapt our methods to their own models.2. Background and introduction of our model
In this paper we model the tipsy cop and tipsy robber game on a graph G by first placing the cop on onevertex and the robber on another vertex on the graph G . Rather than require the players alternate turnsas in previous models of the cops and robbers game, we allow for four possible outcomes in each round ofthe game: a sober robber move r , a sober cop move c , a tipsy robber move t r , or a tipsy cop move t c , where c + r + t c + t r = 1. The outcome of each round is assigned at random, perhaps by a probability spinner asdepicted in Figure 1. r30%c 30% t c t r Figure 1.
Probability of each move based on spinner. • r is the probability of a sober robber move (in yellow) • c is the probability of a sober cop (in green) • t r is the probability of a tipsy move by the robber (in red) • t c is the probability of a tipsy move by the cop (in blue)If the game is played on a non-vertex transitive graph the probability of transition from one state to anotherdepends on the starting location of the players. One such graph is a friendship graph, where n copies of thecycle graph C are joined by a common vertex (see Figure 2 for an example of a friendship graph with 3copies of the C cycle graph).A vertex-transitive graph is a graph, where every vertex has the same local environment, so that novertex can be distinguished from any other based on the vertices and edges surrounding it. On a non-vertex-transitive graph a tipsy move by the cop is not necessarily equivalent to a tipsy move by the robber, as itmay increase, keep the same, or decrease the distance between the players based on each player’s startingstate. For example, the first part of Figure 2 gives us the possible movements of the cop (in blue) if she isin the center of a friendship graph with 3 triangles. If the cop makes a tipsy move to a green vertex (whichaccounts for of t c moves), the distance between her and the robber (in red) increases to 2. If she movestipsy to the vertex in orange the distance will not change ( of t c moves), and if she moves to the vertexin red (that move can be either of t c moves or the only sober move) she will catch the robber (distancewill be 0). On the other hand, if the cop’s starting position is on an outer vertex (second part of Figure2) there are only two possible outcomes, she moves closer to the robber (in black-either of t c or the onlysober move) or keeps the same distance (in orange, of t c moves). igure 2. Possible cop (double circles) moves on a friendship graph with 3 triangles.Similarly, the starting state of the robber determines the probability of moving to the next state. The firstpart of Figure 3 depicts the possible movements of the robber (in red) if he is in the center of a friendshipgraph with 3 triangles. If the robber makes a sober or tipsy (which accounts for of t r moves) move toa green vertex, the distance between him and the cop (in blue) increases to 2. If he moves tipsy ( of t r moves) to the vertex in orange the distance will not change, and if he moves to the vertex in blue (a differenttipsy move of t r moves) he will get caught (distance will be 0). On the other hand, if the robber’s startingposition is on an outer vertex (second part of Figure 3) there are only two possible outcomes, he moves closerto the cop (in black, of t r moves) or keeps the same distance (in orange, of t r moves or a sober move).We will analyze the friendship graph game in more detail in Section 7. Figure 3.
Possible robber (single circles) moves on a friendship graph with 3 triangles.The game is simpler to model on vertex-transitive graphs. A sober cop move will always decrease thedistance between the two (as the cop is chasing the robber). A sober robber move will always increase thedistance between the two, or if they are at a maximum distance from each other on a finite graph, he candecide to stay in the same place. Finally, a tipsy move by either player is a random move, and therefore mayincrease or decrease the distance between the two. When modeling the game on a vertex-transitive graph, atipsy move by the cop is equivalent to a tipsy move by the robber, so we regroup all tipsy moves together.Every move in the game is guaranteed to fall in one of those three categories hence, c + r + t = 1.r30%c 30% t40% Figure 4.
Probability of each move based on spinner where tipsy moves are grouped to-gether. • r is the probability of a sober robber move (in yellow) • c is the probability of a sober cop (in green) • t is the probability of a tipsy move by either player (in red)For example, if the game is played on an infinite path (Figure 5), the probability that the distance betweenthe cop and robber increases by one in a round is equal to the probability of a sober robber move, since asober robber will always run from the cop, plus one half of the probability of a tipsy move by either player,since half of all random moves will increase the distance between them. We will employ Markov chains andtransformation matrices to model how the players move from one state to another on these graphs. t c t c c t r t r r Figure 5.
Move of a tipsy cop (blue) and tipsy robber (red)3.
Regular trees and the Gambler’s ruin problem
On an infinite regular tree of degree ∆, the distance between the two players decreases with probability and increases with probability ∆ − when either player makes a tipsy move. When the cop makes a sobermove, the distance always decreases, and when the robber makes a sober move the distance always increases.Hence, if we assume that the cop calls off the hunt when the distance between the players reaches a specifieddistance d = n , then the Markov chain in Figure 6 models the game where the probability of the distanceincreasing is p = t (cid:0) ∆ − (cid:1) + r and the probability of the distance decreasing is 1 − p = c + t ∆ .0 1 2 ... n − n − n − p − pp p p p pp − p − p − p − p Figure 6.
Markov chain on infinite regular trees.Those familiar with the gambler’s ruin problem will immediately realize that this Markov chain is thesame as the gambler’s ruin chain with a probability of the gambler winning a round given by p = t (cid:0) ∆ − (cid:1) + r and the gambler losing a round given by 1 − p = c + t ∆ .It is well-known that the expected game length of the gambler’s ruin problem is given by the equation E ( d ) = d ( n − d ) when p = [7, p. 79] and E ( d ) = − n − p (cid:18)(cid:16) − pp (cid:17) d − (cid:19)(cid:16)(cid:16) − pp (cid:17) n − (cid:17) + d − p when p (cid:54) = [7, p. 79].After finding a common denominator and factoring out − p we can rewrite E ( d ) using our notation as(1) E ( d ) = (cid:18) − p (cid:19) (cid:32) d − n · p n − d · (cid:32) p d − (1 − p ) d p n − (1 − p ) n (cid:33)(cid:33) . When p < (favoring cop success) then the right hand side of Equation (1) has a limit of d as n → ∞ . Soif the cop never gives up, we get the formula E ( d ) = d − p = d ∆∆ − − c ) (∆ − − r = d ∆(2 c −
1) ∆ + 2 (1 − c ) − r . If c > , then as ∆ → ∞ E ( d ) = d c − . If R ( d ) and C ( d ) represent the probability of the robber or cop winning respectively when starting thegame from distance d away from each other, then of course R ( d ) + C ( d ) = 1. Formulas for R ( d ) and C ( d ) an easily be derived from well-known formulas modeling the gambler’s ruin problem. For instance, when p = , the probability of the robber escaping R ( d ) is the same as the probability of the gambler’s successin the fair gambler’s ruin problem R ( d ) = d n and when p (cid:54) = , we have R ( d ) = − ( − pp ) d − ( − pp ) n is the same as theprobability of the gambler’s success in the unfair gambler’s ruin problem [3, Equation 1.2].Substituting p = t ∆ − + r (transition probability to increase distance) and 1 − p = c + t ∆ (transitionprobability to decrease distance) we can find R ( d ) to be R ( d ) = 1 − (cid:16) c + t ∆ t ∆ − + r (cid:17) d − (cid:16) c + t ∆ t ∆ − + r (cid:17) n . Numerical Examples.
As an example, we consider the game on an infinite regular tree of degree∆ = 4, where the proportion of moves follows the distribution of c = 0 . r = 0 . t = 0 .
3, and the cop callsoff the chase if the robber reaches a distance of n = 10. The following table gives the expected game time E ( d ), and the probability of the robber or cop winning from each possible starting distance d .Distance Measure d E ( d ) R ( d ) C ( d )1 12 .
10 0 . . .
76 0 . . .
55 0 . . .
03 0 . . .
11 0 . . .
37 0 . . .
12 0 . . .
567 0 . . .
838 0 . . d = 9, then it has the lowest expected game time of any possiblestarting distance. This makes sense as 40% of the time the robber will escape in the first move, or withprobability 22 .
5% either player will move drunkenly to allow the robber to escape in the first move; hence,the robber has a 66 .
5% chance of escaping in the first move if the game begins at d = 9.4. General Matrix Method for Analyzing Markov Processes
In this section we describe how to use various matrix equations to find the critical data points of thegame. These include, the probability of transitioning from one vertex to another in exactly M rounds, theprobability the game lasts at least M rounds, and the expected game time. To calculate these values fora finite Markov chain we will use its probability matrix P , where P i,j is the probability of transitioningfrom state i to state j in one round of the Markov process. We will use these matrix methods repeatedly toanalyze various families of graphs in the subsequent sections of this paper.4.1. Calculating probability of moving from state i to state j in M rounds. The probability ofstarting in state i and ending in state j in exactly M moves is(2) P ( i, j, M ) = e i · P M · e j where e i and e j are the row and column basis vectors respectively associated with state i and state j .For example, given the Markov chain in Figure 7,the probability matrix for this Markov chain is P = − p p
00 1 − p p . − p − pp p Figure 7.
Sample for a Markov chain with four states.Some probabilities of going from one state to another are displayed in the table belowFrom state to state in M rounds P ( i, j, M ) i = 3 j = 0 M = 1 P (3 , ,
1) = 0 i = 3 j = 0 M = 2 P (3 , ,
2) = 0 i = 3 j = 0 M = 3 P (3 , ,
3) = 0 i = 2 j = 0 M = 1 P (2 , ,
1) = 0 i = 2 j = 0 M = 2 (1 − p ) i = 2 j = 0 M = 3 (1 − p ) · − p ) · pi = 2 j = 0 M = 4 (1 − p ) · + (1 − p ) · p Note that in this example, state 0 and state 3 are both absorbing states, and that it is possible whencalculating P ( i, a, M ) for an absorbing state a , that the robber reaches the absorbing state a in m < M moves, and then sits there for the remaining M − m moves.4.2. Calculating the probability G M ( d ) that the game will last at least M rounds. To calculatethe probability that the cop will still be actively chasing the robber through M rounds of this game witha starting distance d between the players, we restrict attention to the matrix T = P transient modeling onlythe non-absorbing states of the Markov chain. Note that in this case, T is the matrix obtained from P byremoving the columns and rows associated with any absorbing states in P . The probability of the gamelasting at least M rounds of the game if the players start at distance d from each other is then given by thefollowing product of matrices(3) G M ( d ) = e d · T M · where e d denotes a standard basis row vector with 1 in column d and zero elsewhere, and is the columnvector with 1 in each entry.4.3. Calculating Expectation E ( d ) . As the number of rounds goes to infinity the likelihood that thegame is still going on goes to zero. If we sum all the G M ( d ) probabilities for all M we can find the expectednumber of rounds the game should last. That is, E ( d ) = e d · (cid:2) ( I + T + T + T + · · · + T M + · · · ) (cid:3) · (4) = e d · − T · (5) = e d · ( I − T ) − · (6)where I is the identity matrix. 5. Cycle Graphs
The study of cycle graphs breaks down into two families of cases based on if the number of vertices n is even or odd. We start by analyzing the case when n is even, and then explain how the odd case differsslightly.For a cycle graph C n with n nodes, where n is even we have the states where the robber and the cop are0 (cop catches the robber or the robber is tipsy and stumbles upon the cop herself), 1, 2, 3, . . . or n movesaway from each other. e assume that the cop always moves until they are at distance 0 away. Also, if they are at distance n away, and the robber is sober, he will stay at the same location since it is the furthest from the cop. TheMarkov chain for a cycle graph with n nodes has n states as shown in Figure 8.0 1 2 ... n c + t c + t r + t r + t c + t r + t rc+t Figure 8.
Markov chain cycle graph with n nodes, where n is even.From this Markov chain we find the probability matrix P to be a tridiagonal ( n + 1 × n + 1) matrix ofthe following form: P , = 1, P n +1 , n = c + t , P n +1 , n +1 = r and the upper and lower diagonal entries are P k +1 ,k = c + t for 1 ≤ k ≤ n −
1, and P k +1 ,k +2 = r + t for 1 ≤ k ≤ n −
1, and finally P i,j = 0 otherwise.The transition matrix T is derived by removing the first row and column corresponding to the absorbingstate of P . Hence, T is an ( n × n ) matrix with T n , n − = c + t , T n , n = r , T k +1 ,k = c + t for 1 ≤ k ≤ n − T k,k +1 = r + t for 1 ≤ k ≤ n −
1, and T i,j = 0 otherwise.When n is odd, the only difference in the Markov chain is that the probability of transitioning from state n to itself is r + t and the probability of transitioning from n to n − c + t . Hence P n +1 , n = c + t , P n +1 , n +1 = r + t , since the robber and cop move all the time.We may now use our formulas involving T to find the probability that the game lasts at least M roundsas in Subsection 4.2 and the expected game time Subsection 4.3. It is also important to note that becauseour model does not guarantee turns alternate, and this graph is finite where the cop never calls off the chase, C ( d ) = 1 for all values of d , c , r , t , and n .5.1. Numerical Examples.
For cycle graph with n = 6 nodes we have the states where the robber and the cop are 0 (cop catches therobber or the robber is tipsy and stumbles upon the cop himself), 1, 2 or 3 moves away from each other(Figure 9). Figure 9.
Distance between cop (blue double circle) and robber (red single circle) on acycle C graph.We assume that the cop always moves until they are at distance 0 away. Also, if they are at distance 3away and the robber is sober he will stay at the same location since it is the furthest from the cop. We canthen create the Markov chain in Figure 10 for a cycle graph with 6 nodes.0 1 2 3 c + t c + t r + t r + t rc+t Figure 10.
Markov chain on C graph. c + t r + t
02 0 c + t r + t c + t r We use a stochastic matrix, P (below), to represent the transition probabilities of this system (rows andcolumns in this matrix are indexed by the possible states listed above, with the pre-transition state as therow and post-transition state as the column). Transition probability matrix P = c + t r + t c + t r + t c + t r This transition probability matrix P can be restricted to a transient transition matrix T with absorbingstate 0 removed T = r + t c + t r + t c + t r Using our general matrix method as in Section 4 we can solve the following numerical example.5.2.
Numerical Examples.
We assume the tipsy moves by either player account for half of all moves t = 0 . c + r = 1 − t = 0 .
5. The following tables gives the probability the cop will still be chasing therobber after M = 7 rounds provided the cop and the robber start at distance d = 1 , c + r = 0 . r = 0 r = 0 . r = 0 . r = 0 . r = 0 . r = 0 . c = 0 . c = 0 . c = 0 . c = 0 . c = 0 . c = 0 . G (1) 0 .
020 0 .
073 0 .
169 0 .
307 0 .
473 0 . G (2) 0 .
084 0 .
195 0 .
349 0 .
526 0 .
702 0 . G (3) 0 .
084 0 .
222 0 .
402 0 .
59 0 .
759 0 . E (1) 1 .
89 2 .
69 4 .
14 7 .
07 13 .
91 34 E (2) 3 .
56 4 .
83 6 .
98 11 .
04 19 .
86 44 E (3) 4 .
56 5 .
94 8 .
23 12 .
47 21 .
53 46The table shows the game will last longest, and the chase has the largest probability of still continuing after7 rounds, if the starting distance is 3 and the robber takes the maximum percentage of sober moves possible.The accompanying CoCalc code for these computations is included in Appendix A.1, so the interested readercan adapt these calculations to model the game for any values of M , r, c, t they choose.6. Petersen Graph
The Petersen graph is a vertex-transitive graph where the cop and robber can only be 0, 1, or 2 movesaway from each other as (Figure 11).
Figure 11.
Distance between cop (blue double circle) and robber (red single circle) on aPetersen graph. e assume that the cop moves until eventually she captures the robber. Also, if robber is distance 2 awayfrom the cop, and the robber is sober, he will stay at the same location since it is the furthest from the cop.Hence the Markov chain for the Petersen graph is as depicted in Figure 12.0 1 2 c + t c + t r + t r + t Figure 12.
Markov chain for Petersen graph.0 1 20 1 0 01 c + t r + t c + t r + t We use a stochastic matrix P to represent the transition probabilities of this system. The rows and columnsin this matrix are indexed by the possible states listed above, with the pre-transition state as the row andthe post-transition state as the column. P = c + t r + t c + t r + t The states where there is a distance between the cop and the robber do not contribute to the survival averageso state 0 can be ignored. The initial state and transition matrix can be reduced to a transition matrix withabsorbing state 0 removed T = (cid:18) r + t c + t r + t (cid:19) We may now use our formulas involving T to find the probability that the game will last at least M rounds as in Subsection 4.2 and the expected number of rounds as in Subsection 4.3.6.1. Numerical Examples.
In the table below, we assume the tipsy moves by either player account for half of all moves t = 0 . c + r = 1 − t = 0 .
5. We then calculate the probability the cop will still be chasing the robber after M = 7rounds based on their starting distances d = 1 or 2 and on the percentage of the sober moves allocated tothe cop and the robber.Measure Proportion of Sober moves c + r = 0 . r = 0 r = 0 . r = 0 . r = 0 . r = 0 . r = 0 . c = 0 . c = 0 . c = 0 . c = 0 . c = 0 . c = 0 . G (1) 0 .
039 0 . .
204 0 .
352 0 .
536 0 . G (2) 0 .
078 0 .
175 0 .
318 0 .
496 0 .
687 0 . E (1) 2 .
25 3 .
11 4 .
59 7 .
44 14 .
06 40 E (2) 3 .
75 4 .
87 6 .
73 10 .
17 17 .
81 42We have published the accompanying CoCalc code for these computations in Appendix A.1, so the inter-ested reader can change these calculations to model the game for any values of M , r, c, t that they choose. . Friendship Graphs
As friendship graphs are not vertex-transitive, we cannot simply model the game on them with a Markovchain where each state is determined by the distance between the cop and robber, and we must treat tipsycop moves and tipsy robber moves separately as the transition probabilities from state to state depend onwho is moving. Hence, in this section the spinner we use has four distinct possible outcomes satisfying r + c + t r + t c = 1.The following notation will be used to model the tipsy cop and tipsy robber game on friendship graphsof n triangles. The states 1 e , 1 cc , and 1 rc all refer to the cop and robber being distance 1 away from eachother but, 1 e means both players are on the same outer edge, 1 cc means the cop is in the center, and 1 rc means the robber is in the center as depicted in Figure 13.State 1e State 2 State 1rc State 1cc Figure 13.
All possible states of Friendship Graphs of n = 2 triangles.Friendship graphs with n = 2 , , and 4 triangles are shown in Figure 14. Since the cop never calls offthe chase on this finite graph, the cop will win eventually C ( d ) = 1 even if the robber is completely soberthroughout. Figure 14.
Examples of friendship graphs with n = 2 , , n triangles is shown in Figure 15.0 1e 1cc1rc 21 c + t c + t r c + t c n + t r c + t r n + t c c + t c t c r + t r r + t c + t r t c · n − nt r r + t r · n − nt c t r n r + t r t c n Figure 15.
Markov chain for tipsy cop and tipsy robber game on friendship graphs of n cliques rom \ To 2 1 cc rc e r + t c + t r c + t c t r cc t c · n − n r + t r t c n c + t c n + t r rc r + t r · n − n t c t r n c + t r n + t c e t c r + t r c + t c + t r P and transition matrix with absorbingstate 0 removed TP = r + t c + t r c + t c t r t c · n − n r + t r t c n c + t c n + t r r + t r · n − n t c t r n c + t r n + t c t c r + t r c + t c + t r T = r + t c + t r c + t c t r t c · n − n r + t r t c n r + t r · n − n t c t r n t c r + t r Sample calculations.
In this subsection we compute the expected game times and probability of thegame lasting through M = 10 rounds on a friendship graph with n = 5 cliques. In these computations weassume that the cop and robber each get 50% of the moves so r + t r = c + t c = 0 .
5, but we vary the tipsinessof the cop and robber. The code for these computations is available in Appendix A.4.Measure Proportion of Tipsy movesRobber t r = 0 . t r = 0 . t r = 0 . t c = 0 . t c = 0 . t c = 0 . t c = 0 . t c = 0 . t c = 0 . t c = 0 . t c = 0 . t c = 0 . G (2) 0 . . . . . . . . . G (1 cc ) 0 . . . . . . . . . G (1 rc ) 0 . . . . . . . . . G (1 e ) 0 . . . . . . . . . E (2) 4 .
628 6 .
914 12 .
09 4 .
093 5 .
697 8 .
668 3 .
689 4 .
893 6 . E (1 cc ) 2 .
540 4 .
505 9 .
344 2 .
160 3 .
543 6 .
333 1 .
878 2 .
914 4 . E (1 rc ) 3 .
419 4 .
979 8 .
590 3 .
051 4 .
159 6 .
270 2 .
765 3 .
603 5 . E (1 e ) 2 .
665 3 .
804 6 .
735 2 .
252 3 .
002 4 .
618 1 .
923 2 .
445 3 . Toroidal Grids
A toroidal grid is the Cartesian product of two cycle graphs C m (cid:3) C n and represents a grid that can beembedded on the surface of a torus, as shown in Figure 16. Since our model does not guarantee turnsalternate, and the cop never calls off the chase, the cop will eventually win C ( d ) = 1 on any toroidal grid. Figure 16.
Toroidal Grid. Generated using Blender open-source imaging software. he Markov chain for our model on a 7 × C m × C n grows.0 1,0 2,0 3,01,1 2,1 3,12,2 3,23,31 c + t t r + t c + t c + t r + t t t c + t c + t c + t t c + t c + t t t t r + t r + t r + t r + t r + t r + t r + t c + t t t Figure 17.
Markov chain for a 7 × \ To (3,3) (3,2) (3,1) (3,0) (2,2) (2,1) (2,0) (1,1) (1,0) 0(3,3) r + t c + t r + t t t c + t r + t t t c + t r + t t c + t r + t c + t r + t t t c + t r + t t c + t r + t c + t r + t t c + t P = r + t c + t r + t t t c + t r + t t t c + t r + t t c + t r + t c + t r + t t t c + t r + t t c + t
00 0 0 0 0 r + t c + t
00 0 0 0 0 0 r + t t c + t = r + t c + t r + t t t c + t r + t t t c + t r + t t c + t r + t c + t r + t t t c + t
00 0 0 r + t t c + t r + t c + t r + t t Numerical Examples.
In this section we model the game on a 7 × r = 0 . c = 0 . t = 0 .
3. The table below shows the probability of the robber evadingthe cop through the first 50 rounds of the game as well as the expected game length based on each of theplayers’ possible starting configurations. The CoCalc code for these calculations is available to the interestedreader in Appendix A.2Measure Initial State d (3,3) (3,2) (3,1) (3,0) (2,2) (2,1) (2,0) (1,1) (1,0) G ( d ) 0 . . . . . . . . . E ( d ) 78 .
18 95 .
95 71 .
21 65 .
62 71 .
42 63 .
66 54 .
75 51 .
65 34 . Modeling the game where players sober up over time
Harris et al. asked how to model a tipsy cop and drunk robber game when the cop is sobering up overtime [5, Question 6.1]. In this section, we model the game where both players begin completely drunk andsober up as time passes. We define our probability of a tipsy move by either player t as a function of m rounds that have passed t = f ( m ). Additionally, we set the proportion of sober cop moves to be c = ab (1 − t )and the proportion of sober robber moves to be r = b − ab (1 − t ), where a and b are any desired integers thatdetermine the proportion of sober moves that is assigned to the cop and to the robber. As we assume theplayers are sobering up as time passes, we choose to use a function f with the following properties: f (1) = 1lim m →∞ f ( m ) = 0With these assumptions, the probability of surviving M rounds, given an initial state d , is given by:(7) G M ( d ) = e d · (cid:32) M (cid:89) m =1 T m (cid:33) The expected game time is given by the series:(8) E ( d ) = e d · (cid:32) N = ∞ (cid:88) n =1 (cid:32) n − (cid:89) m =1 T m (cid:33)(cid:33) · We conclude this section with some sample calculations in tables. The code for the calculations is attachedin Appendix A.3, so the interested reader can change these calculations to model the game for any values of a, b, t = f ( m ) , or N they choose.9.1. Numerical Examples.
Assuming the game is played on a cycle graph of six nodes Figure 9, itsaccompanying Markov Chain is given in Figure 10.
Example 9.1.1
Let the tipsiness function be given by the formula t = f ( m ) = 4 m + 3 as it is an example ofa function that follows the rules stated above. Then, the following table shows the probability of the gamelasting 5 rounds from varying starting positions and proportions of sober moves allotted to each player. Italso shows estimates for expected game times from each starting position where we use E ( d ) = e d · (cid:32) N (cid:88) n =1 (cid:32) n − (cid:89) m =1 T m (cid:33)(cid:33) o approximate the infinite sum in Equation (8). We chose either N = 1000 or N = 3000 to approximatethese values because these values of N are sufficiently large to approximate the expected game time accuratelyto at least five digits as we vary the proportion of sober moves allocated to the robber .Measure Percentage of Sober Moves that are Robber Moves t = m +3
0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100% G (1) 0 . . . . . . . . . . . G (2) 0 . . . . . . . . . . . G (3) 0 . . . . . . . . . . . E (1) 3 . ∗ . ∗ . ∗ . ∗ . ∗ . ∗ . ∗ . ∗ . ∗ . ∗∗ ∞ E (2) 4 . ∗ . ∗ . ∗ . ∗ . ∗ . ∗ . ∗ . ∗ . ∗ . ∗∗ ∞ E (3) 5 . ∗ . ∗ . ∗ . ∗ . ∗ . ∗ . ∗ . ∗ . ∗ . ∗∗ ∞ *Sum calculated to N = 1000, ** N = 3000The expected game time for 80% was also calculated at N = 3000, and found to be the same for at leastthe first five digits. It seems only at 90% and above is N = 1000 not sufficiently large. Example 9.1.2
Let tipsiness be the function given by the formula t = f ( m ) = 42 m + 2 , because itchanges exponentially and follows the rules state above. Then, the following table shows the probability ofthe game lasting 5 rounds from varying starting positions and proportions of sober moves allocated to eachplayer. It also shows estimates for expected game times from each starting position where we use E ( d ) = e d · (cid:32) N (cid:88) n =1 (cid:32) n − (cid:89) m =1 T m (cid:33)(cid:33) to approximate the infinite sum in Equation (8). We chose either N = 500 or N = 1000 to approximatethese values because these values of N are sufficiently large for their respective proportion of sober movesallocated to the robber to accurately approximate the expected game time to at least five digits.Measure Percentage of Sober Moves that are Robber Moves t = m +2
0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100% G (1) 0 . . . . . . . .
384 0 . . . G (2) 0 . . . . . . . . . . . G (3) 0 . . . . . . . . . . . E (1) 2 . ∗ . ∗ . ∗ . ∗ . ∗ . ∗ . ∗ . ∗ . ∗∗ . ∗∗ ∞ E (2) 3 . ∗ . ∗ . ∗ . ∗ . ∗ . ∗ . ∗ . ∗ . ∗∗ . ∗∗ ∞ E (3) 4 . ∗ . ∗ . ∗ . ∗ . ∗ . ∗ . ∗ . ∗ . ∗∗ . ∗∗ ∞ *Sum calculated to N = 500, ** N = 1000The expected game time for 70% was also calculated at N = 1000 and found to be the same for at least fivedigits. However, we are certain that for the expected game time at 90% N = 1000 is not sufficiently large,yet trying to calculate the sum with any larger N causes the CoCalc server to timeout.10. Modeling the game where tipsiness is a function of distance
Mentioning that it may be more biologically realistic, Harris et al. also asked how to model a tipsy cop anddrunk robber game where the players’ tipsiness is determined by the distance between them [5, Question 6.6].In this section, we model the tipsy cop and robber game where the players sober up as they get closer toeach other. This models the scenario where the cop’s ability to track the robber improves the closer theyget, and the robber senses that the cop is on his trail so he moves more deliberately. The transition matrix T δ represents the stochastic matrix, where both the cop and robber sober up as they get closer to each otherand get more tipsy as the distance between the two increases. If n is the maximum distance the two canbe apart on a finite graph (or the distance at which the cop calls off the hunt), then we assume that the unction δ ( d ) has the following properties: δ (1) = 0lim d → n δ ( d ) = 1Additionally, we set the proportion of sober cop moves to be c = ab (1 − t ) and the proportion of sober robbermoves to be r = b − ab (1 − t ), where a and b are any desired integers that determine what fraction of all sobermoves is assigned to the cop and to the robber.10.1. Linear Increase of Tipsiness.
In this scenario, we choose to use the function δ ( d ) = d − n , where d isthe distance between the cop and the robber when they start the chase and n is the maximum distance theycan be apart; this value n is specified to be either the radius of the graph on finite graphs, or the maximumspecified distance before the cop calls off the chase on an infinite graph. The probability of the game lastingat least M rounds when starting in state d is G M ( d ) = e d · T M δ · . The expected game time is E ( d ) = e d · ( I − T δ ) − · . Exponential Increase of Tipsiness.
Now, we choose to use the function δ ( d ) = 1 − . (1 − d ) . (1 − d ) , where d is the distance between the cop and the robber when they start the chase. The probability of the gamelasting through M rounds is given by: G M ( d ) = e d · T M δ · The expected game time is given by: E ( d ) = e d · ( I − T δ ) − · We conclude this section with some sample calculations in tables. We have published the accompanyingCoCalc code for these computations in Appendix A.5, so the interested reader can change these calculationsto model the game for any values of n , m, d, r that they choose.10.3. Numerical Example on Cycle Graph.
Given a cycle graph of n = 10 nodes, we will have thepossibilities of starting at distances 0 to 5 away with maximum distance n = n / c + t c + t r + t r + t c + t r + t c + t r + t r c + t Based on the Markov chain we get the transformation matrix based on distance T δ T δ = r + t c + t r + t c + t r + t
00 0 c + t r + t c + t r Note that for each distance d , r d + c d + t d = 1. In our model we specify what percentage of all sober moves(1 − t d ) are given to the robber.The probability of surviving 20 rounds when starting at distance d apart G ( d ) and the expected durationof the chase E ( d ) using the linear growth of the tipsiness t = δ ( d ) = d − n is shown in the table below. easure Percentage of Sober Moves that are Robber Moves0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100% G (1) 0 0 . . .
015 0 .
057 0 .
148 0 .
299 0 .
491 0 .
689 0 .
864 1 G (2) 6 E − .
001 0 .
009 0 .
041 0 .
125 0 .
277 0 .
48 0 .
69 0 .
86 0 .
958 1 G (3) 0 . . .
025 0 .
085 0 .
208 0 .
391 0 .
599 0 .
784 0 .
912 0 .
978 1 G (4) 0 . . .
039 0 .
118 0 .
261 0 .
454 0 .
657 0 .
824 0 .
932 0 .
984 1 G (5) 0 . . .
053 0 .
144 0 .
295 0 .
489 0 .
683 0 .
839 0 .
938 0 .
985 1 E (1) 1 1 .
29 1 .
81 2 .
78 4 .
77 9 .
25 20 .
58 53 .
89 177 . . ∞ E (2) 2 .
30 2 .
97 4 .
06 5 .
93 9 .
41 16 . .
64 75 .
55 220 . ∞ E (3) 4 .
02 5 .
04 6 .
59 9 . .
45 21 .
75 39 .
64 85 . . ∞ E (4) 5 .
87 7 .
09 8 .
88 11 .
65 16 .
32 25 . .
36 89 .
49 239 . ∞ E (5) 6 .
87 8 .
14 9 .
97 12 .
79 17 .
51 26 .
25 44 .
68 90 .
88 241 . ∞ Similarly, the probability of surviving 20 rounds when starting distance d apart G ( d ) and the expectedduration of the chase E ( d ) using the exponential growth for tipsiness t = δ ( d ) = 1 − . (1 − d ) . (1 − d ) is shown inthe table below.Measure Percentage of Sober Moves that are Robber Moves0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100% G (1) 0 1 . E − . . .
049 0 .
152 0 .
325 0 .
532 0 .
726 0 .
881 1 G (2) 4 E − . E − . .
025 0 .
109 0 .
287 0 .
529 0 .
755 0 .
906 0 .
978 1 G (3) 9 E − . . . .
181 0 .
404 0 .
656 0 .
852 0 .
957 0 .
993 1 G (4) 1 . E − . .
012 0 . .
234 0 .
477 0 .
722 0 .
891 0 .
972 0 .
997 1 G (5) 8 . E − . .
018 0 . .
269 0 .
515 0 .
749 0 .
904 0 .
976 0 .
997 1 E (1) 1 1 .
27 1 .
72 2 .
59 4 .
52 9 .
58 25 . . . ∞ E (2) 2 . .
67 3 .
59 5 .
29 8 .
79 17 .
16 41 . . ∞ E (3) 3 .
33 4 .
19 5 .
56 7 .
93 12 .
52 22 .
74 50 . ∞ E (4) 4 .
64 5 .
74 7 .
41 10 .
18 15 .
31 26 .
31 54 . . . ∞ E (5) 5 .
64 6 .
82 8 .
58 11 .
46 16 .
73 27 .
89 56 . . . ∞ Based on the results in the tables the chase is longer if the tipsiness is increasing exponentially and thepercentage of all sober moves (1 − t d ) are given to the robber is less than 50%. In the case that the percentageof all sober moves (1 − t d ) are given to the robber is greater than 50% the chase is longer if the tipsinessis increasing linearly. Assuming the robber is given the choice, the robber should pick a strategy based onthe percentage of sober moves assigned to him–if he gets to move more than 50% of the sober moves histipsiness should increase linearly, otherwise (he gets to move 50% or less of all sober moves) he has a betterchance of surviving if the tipsiness changes exponentially.10.4. Infinite Regular Trees.
If we play the game on an infinite regular tree, and the cop calls off the huntif the robber reaches a distance of n nodes away from the cop, then the matrix P is an ( n +1 × n +1) tridiagonalmatrix with P , = 1, P n +1 , n +1 = 1 and the upper and lower diagonal entries are P k +1 ,k = c k +1 + t k +1 ∆ for1 ≤ k ≤ n −
1, and P k +1 ,k +2 = t k +1 ∆ − + r k +1 for 1 ≤ k ≤ n −
1, and finally P i,j = 0 otherwise. To obtainthe matrix T we remove from P the first and last rows and columns corresponding to both absorbing states.0 1 2 3 4 5 c + t ∆ r + t − r + t − r + t − r + t − c + t ∆ c + t ∆ c + t ∆ Figure 18.
Markov chain for regular tree with maximum distance of n = 5.For example, on an infinite regular tree of degree ∆ with maximum specified distance n = 5, the accom-panying Markov Chain is in Figure 18. Based on the Markov chain we get the transformation matrix based n distance T δ T δ = r + t − c + t ∆ r + t − c + t ∆ r + t − c + t ∆ . Note that in this case we remove states 0 and 5 because they are absorbing. Similarly in the numericalexample on cycle graphs, we specify what percentage of all sober moves (1 − t d ) are given to the robber.10.5. Numerical Example on Infinite Regular Tree with ∆ = 4 and Maximum Distance n = 10 . The probability that the game continues for M = 30 rounds when starting distance d apart G ( d ) and theexpected duration of the chase E ( d ) when ∆ = 4 when tipsiness increases linearly t = δ ( d ) = d − n is shownin the table below. Note that we assume the cop calls off the chase if the distance reaches n = 10.Measure Percentage of Sober Moves that are Robber Moves0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100% G (1) 0 4 . E − . .
006 0 .
022 0 .
045 0 .
051 0 .
033 0 .
012 0 .
002 0 . G (2) 1 . E − . . .
016 0 .
046 0 .
073 0 .
067 0 .
034 0 .
009 0 . . G (3) 0 . . . .
035 0 .
077 0 .
099 0 .
077 0 .
034 0 .
008 0 . . E − G (4) 0 . . . .
048 0 .
083 0 .
088 0 .
057 0 .
021 0 .
004 0 . . E − G (5) 0 . . . .
063 0 .
089 0 .
08 0 .
046 0 .
016 0 .
003 0 . . E − G (6) 0 . . .
031 0 .
054 0 .
065 0 .
051 0 .
025 0 .
008 0 .
001 0 . . E − G (7) 0 . . . .
046 0 .
047 0 .
033 0 .
015 0 .
005 0 . . . E − G (8) 0 . . . .
024 0 .
022 0 .
014 0 .
006 0 . . . E − . E − G (9) 0 . . . .
01 0 .
009 0 .
005 0 .
002 0 . . . E − . E − E (1) 1 1 .
29 1 .
82 2 .
86 4 .
75 7 . .
58 11 11 . . . E (2) 2 . .
88 4 .
09 6 .
21 9 .
38 12 . . . . . . E (3) 3 .
72 4 . . .
68 13 . . . . . . . E (4) 5 .
64 7 .
29 9 .
62 12 . .
15 16 14 . . . .
38 8 . E (5) 7 .
81 9 .
61 11 .
77 13 . .
19 14 . . . .
17 7 .
99 7 . E (6) 9 .
54 10 .
97 12 .
37 13 . . . . .
63 7 .
41 6 .
53 5 . E (7) 9 .
75 10 .
44 10 .
92 10 . . .
99 7 .
58 6 .
44 5 .
61 5 .
01 4 . E (8) 7 . .
86 7 .
75 7 .
37 6 .
67 5 .
76 4 .
91 4 .
25 3 .
78 3 .
42 3 . E (9) 4 .
11 3 .
99 3 .
79 3 .
51 3 .
14 2 .
73 2 .
37 2 .
11 1 .
91 1 .
75 1 . d apart G ( d ) and the expected duration of the chase E ( d ) when the game takes place on a regular tree of degree∆ = 4 and tipsiness is modeled using the exponential function t d = δ ( d ) = 1 − . − d . − d . Again we assumethe cop calls off the chase if the distance reaches n = 10. easure Percentage of Sober Moves that are Robber Moves0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100% G (1) 0 0 . . . . .
014 0 .
019 0 .
021 0 .
02 0 .
017 0 . G (2) 0 . . . . .
015 0 .
02 0 .
022 0 .
021 0 .
017 0 .
013 0 . G (3) 0 . . .
012 0 .
017 0 .
021 0 .
024 0 .
024 0 .
021 0 .
016 0 .
012 0 . G (4) 0 . . . .
013 0 .
015 0 .
015 0 .
014 0 .
012 0 .
009 0 .
007 0 . G (5) 0 . . . .
011 0 .
012 0 .
012 0 .
01 0 . .
007 0 .
005 0 . G (6) 0 . . .
005 0 . .
006 0 .
005 0 .
005 0 . .
003 0 .
002 0 . G (7) 0 . .
003 0 .
003 0 . .
003 0 .
003 0 . . . . . G (8) 0 .
001 0 .
001 0 .
001 0 . . .
001 0 . . . . . G (9) 0 .
004 0 . . . . . . . . . . E (1) 1 1 .
47 2 .
22 3 .
32 4 . . .
55 10 . . . . E (2) 3 . . .
09 7 .
73 9 . . . . . . . E (3) 7 .
41 8 .
53 9 .
71 10 . . . . . . . E (4) 9 .
85 10 . . . . . . . . E (5) 9 .
88 10 . . . . . . .
81 9 . . E (6) 8 .
38 8 . . .
38 8 .
33 8 .
26 8 .
16 8 .
04 7 .
91 7 .
79 7 . E (7) 6 .
33 6 .
31 6 .
28 6 .
25 6 .
21 6 .
15 6 .
09 6 .
02 5 .
96 5 .
89 5 . E (8) 4 .
18 4 .
17 4 .
15 4 .
13 4 . .
07 4 .
04 4 .
01 3 .
98 3 .
95 3 . E (9) 2 .
07 2 .
06 2 .
05 2 .
05 2 .
04 2 .
03 2 .
02 2 1 .
99 1 .
98 1 . Future Directions and Open Questions
We end this paper by pointing out a few possible areas of future study and posing a few open questions:Modeling the game on infinite grids is considerably more difficult than on infinite regular trees because thereare multiple states for a given distance, and it is not immediately clear what strategy the cop should use todecrease distance or the robber should use to increase distance.(1) On an infinite grid, what are the optimal strategies for the cop and robber?(2) Who is more likely to win on an infinite grid, if both players employ their optimal strategies?(3) How will the game change if the cop and the robber do not take turns, but instead move simultane-ously? 12.
Acknowledgements
We would like to thank Drs. Pamela Harris, Florian Lehner, and Alicia Prieto-Langarica for many helpfuland inspiring conversations and suggestions regarding this project. We also thank Drs. Katie Johnson andShaun Sullivan for reading and providing helpful feedback regarding earlier drafts of this manuscript. Thiscollaboration was supported by the FGCU Seidler Collaboration Fellowship.
References [1] Quilliot A. Some results about pursuit games on metric spaces obtained through graph theory techniques.
European Journalof Combinatorics , 7(1):55 – 66, 1986.[2] ImmiflexImmuneSystem. Neutrophil phagocytosis - white blood cell eats staphylococcus aureus bacteria. [Video], 2013.[3] El-Shehawey M. A. On the gambler’s ruin problem for a finite markov chain.
Statist. Probab. Lett. , 79(14):1590–1595, 2009.[4] Komarov N. and P. Winkler. Catching the drunk robber on a graph.
Electron. J. Combin. , 21, 2014.[5] Harris Pamela, Insko Erik, Prieto-Langarica Alicia, Stoisavljevic Rade, and Sullivan Shaun. Tipsy cop and drunken robber:a variant of the cop and robber game on graphs. 2020.[6] Nowakowski Richard and Winkler Peter. Vertex-to-vertex pursuit in a graph.
Discrete Mathematics , 43(2):235 – 239, 1983.[7] Dunbar Steven. Mathematical modeling in economics and finance: Probability, stochastic processes, and differential equa-tions. Volume 49 of AMS/MAA Textbooks:78–84, 2019. ppendix A. SageMath code
The code described in the previous Sections is provided in this appendix.
A.1.
Sage Code for Petersen Graph. var (’c,t,M,i,p’)def check_rt(r,t):check=1if r<0:check=0print("r cannot be negative")if t<0:check=0print("t cannot be negative")if t+r>1:check=0print("r+t cannot be greater than 1")return checkdef define_P(n=4): rint()T=define_T(n)print(T)print()I = identity_matrix(n)print(I)one=[]for i in range(n):one.append(1)N=vector(one)print(N)print("c=",c,"r=",r)for d in range(1,n+1):e_d = I.column(d-1)print("d=",d,"n=",n,"M=",M)G = e_d*(T^M)*Nprint("Survival probability of M rounds from distance ", d, " is ", G)E = e_d*((I-T)^(-1))*Nprint("Expected number of rounds from distance ", d, " is " , E) .2. Sage Code for × Toroidal Grid. var(’r,t,c’)r=0.4 .3. Sage Code for Cycle Graphs Sobering up Overtime. from sage.calculus.calculus import symbolic_sumvar (’t,M,N,i,p’)M=5 eturn vector(L) .4. Sage Code for Friendship Graphs. var(’r,tr,tc,n,c’)tr=.4 .5. Sage Code for Regular Tree with Exponential Change of Tipsiness as a Function of Distance. var (’c,t,M,i,p’)M=30 Florida Gulf Coast University, 10501 FGCU Boulevard, Fort Myers, FL 33965
Email address : [email protected], [email protected], [email protected]@fgcu.edu, [email protected], [email protected]