
Jessica M. answered 01/21/24
PhD with 5+ years of tutoring Logic
Hi Seamus,
I understand that you're presenting a scenario involving asymmetric communication between two users. The model involves probabilities, branching processes, and the question of whether the communication will almost surely end in a finite time. To address this, we need to implement the model with specified parameters and simulate paths to observe the outcomes.
I'll start by implementing the model for user 1. The vector μ1(0)=(1,0) represents the initial population, indicating one incoming message from user 2 at t=0. At each step, user 1 decides to answer or not, drawing from a Poisson distribution to determine the number of messages sent to user 2. User 2 then acts, and this process continues.
Let's begin with a function that generates random descendants for a single message from user 2 as a two-vector.
Here's a simple implementation in Python for the first part of the model, where user 1 generates random descendants for a single message from user 2:
This function simulates the number of messages sent by user 1 in response to a single message from user 2, following a Poisson distribution.
Next, we'll move on to the second part, where we'll write a function to handle a general population input and output a random draw from the population one step ahead.
Continuing with the implementation, let's create a function that deals with a general population input (i1,i2) and outputs a random draw from the population one step ahead:
This function takes the current population as input and calculates the new population one step ahead based on the communication dynamics.
Now, we can move on to simulating paths for different choices of λ and z, as well as checking whether extinction occurs in finite time by simulating 100 paths for each scenario.