Research Article | Open Access

Lee Worden, Travis C. Porco, "Products of Compartmental Models in Epidemiology", *Computational and Mathematical Methods in Medicine*, vol. 2017, Article ID 8613878, 16 pages, 2017. https://doi.org/10.1155/2017/8613878

# Products of Compartmental Models in Epidemiology

**Academic Editor:**Reinoud Maex

#### Abstract

We show that many structured epidemic models may be described using a straightforward product structure in this paper. Such products, derived from products of directed graphs, may represent useful refinements including geographic and demographic structure, age structure, gender, risk groups, or immunity status. Extension to multistrain dynamics, that is, pathogen heterogeneity, is also shown to be feasible in this framework. Systematic use of such products may aid in model development and exploration, can yield insight, and could form the basis of a systematic approach to numerical structural sensitivity analysis.

#### 1. Introduction

Simple epidemic models aim at insight through simplicity; complex models aim at realism through detail [1]. Both simple and complex models are still being developed (e.g., [2–7]). Addition of epidemiological refinements, such as age structure, gender, geographic separation, or pathogen strains, in general changes the behavior of simple models, and thus we must systematically compare models with different features.

In this paper, we show that many structured epidemic models may be described using a straightforward product structure. Such products therefore provide a compact representation for a family of related models and could facilitate model comparison and structural sensitivity analysis. Examples include modeling host susceptibility groups, gender, age structure, multiple subtypes, and geographic separation. Our attention will be restricted to compartmental models [8–10], focusing on mathematical epidemiology [10–17].

The product we describe is related to standard graph products. The relation between compartmental models and graph theoretic or network concepts has been long appreciated [18, 19], and, moreover, Markov processes arising on product spaces have been analyzed by probabilists [20]. The graph structure arises when dynamical variables will be represented as vertices of a graph, representing the number of individuals in a given compartment. Individuals may change state, such changes being represented by an arc from one vertex to another, labeled with the instantaneous rate at which such a transition would occur.

#### 2. Motivating Example: Community-Structured Epidemic Model

Consider a simple SI (susceptible to infective) model describing an epidemic with no recovery. Individuals transition from susceptible to infective and never return to the uninfected state. The number of infected individuals is denoted of susceptible individuals .

This compartmental model is diagrammed in Figure 1. The corresponding ODE system may be writtenHere, is a transmission coefficient, and is the per capita mortality or removal rate due to disease. In this model, we ignore population birth and death due to other causes.

A simple extension to include heterogeneous epidemic dynamics in multiple communities was introduced by Watson et al. [21, 22]. In this model, no migration between communities is assumed. However, individuals in one community cause infection in other communities, with the structure seen in Figure 2. The equations arewhere is the number of communities modeled. In the Watson model, in general the transmission coefficients may differ when considering transmission to susceptibles in one community from infectives in any community (whether the same or not). Each community is additionally assumed to have a different rate of removal of infectives due to mortality (or other causes), though these can be assumed to be identical if desired.

This model extends the one-community SI model, by structuring the population into multiple communities. In the following section, we will show that the structured model developed by Watson can be straightforwardly defined as the product of the single-community SI model and a model describing community structure. We will then illustrate other uses of this product, including age structure, gender, heterogeneity of risk, and cotransmission of multiple diseases.

#### 3. Graph Products

A directed graph is defined as a set of vertices, each identified by a unique label, together with a set of arrows, or arcs, each connecting a source vertex to a target vertex. In this paper, we are concerned only with directed graphs, not undirected ones. A number of different products of directed graphs are defined, two of which are relevant.

##### 3.1. Cartesian Product

Consider finite directed graphs and , with and vertices, respectively. The Cartesian product of these graphs [23] is a graph whose vertex set is the set of ordered pairs for all vertices of and of (that is, the Cartesian product of the vertex sets of the factor graphs and ). The arcs of consist of an arc from to for every , wherever there is an arc from to in the factor graph and an arc from to for every wherever there is an arc from to in .

We can speak of “levels” in the sense that each vertex of a factor model corresponds to a subset, or level, of vertices of the product model. The product replicates all the arcs of at every level of and all the arcs of at every level of . Suppose we have two vertices and , whose second coordinate is the same, that is, which map to the same level of ; it will be helpful to call these “siblings” and to say they “descend” from a common “factor vertex” , similarly for vertices with the same first coordinate.

Figures 3(a), 3(b), and 3(c) illustrate two directed graphs and their Cartesian product, respectively.

**(a)**

**(b)**

**(c)**

**(d)**

More generally, graphs with multiple arcs joining a pair of vertices can be defined, and the Cartesian product definition above can be applied in this case as well.

##### 3.2. Strong Product

The strong product of two directed graphs and includes more arcs than the Cartesian product [23]. This product has the same vertex set, the Cartesian product of the factors’ vertex sets, but in addition to the arcs of the Cartesian product graphs, it also includes all arcs from to where there is an arc from to * and* an arc from to .

Figure 3(d) illustrates the strong product of the graphs of Figures 3(a) and 3(b).

The symbols and for these operations are chosen to evoke the structure of the product graphs, as illustrated in Figures 3(c) and 3(d). These graph products are discussed in more detail in the Appendix.

#### 4. Products of Models

##### 4.1. Linear Compartmental Models

A compartmental model (whether in population biology, epidemiology, or pharmacology) is often represented by a diagram such as in Figure 1, which has the form of a directed graph (formally, a directed multigraph) with labels on arcs. Multiple arcs may connect a single pair of compartments, representing multiple processes influencing that transition with potentially different rates. As before, the vertices of the graph are compartments and its arcs are transitions, with labels specifying the transition rates. (We consider a compartmental model to be an abstract object isomorphic to its directed multigraph diagram.) As is well known, a compartmental model diagram can be represented by a system of ordinary differential equations or a continuous Markov jump process (among others). (For instance, a compartmental model with a single compartment , with a single inflow with rate and outflow with rate , can be represented by the simple stochastic immigration-death process [24] or by the elementary ordinary differential equation model .)

The class of linear compartmental models we consider in this section includes the ordinary differential equation models of the formwhere is a vector of state variables, is a vector of constant inflows, and is an transition rate matrix. The general compartmental model, with sources and sink terms, can be represented in the same graphical way by considering special source and sink vertices in the graph.

A Cartesian product of linear compartmental models will be defined in a way that is similar to the Cartesian product of graphs. Suppose that are the states in model ; let be the states of model . The Cartesian product of with will have states with and . Two states and are* siblings* in the same* level * of the product. If we began, for example, with an epidemic model with states susceptible, infective, removed (SIR), and wished to construct a product with a geographic model of multiple regions, we would expect to have susceptibles, infectives, and removed individuals in each region.

The Cartesian product of graphs, as we saw, replicates each arc of each factor graph for each vertex of the other factor graphs. In a compartmental model of a population system, this would correspond to the very common assumption of competing independent exponential risks. For example, consider once again a simple SIR epidemic model, with infection and recovery, and a model of two communities with migration between them. In a Cartesian product of the two, we may wish to allow infection and recovery within each community as well as migration of susceptibles from one community to another, migration of infectives, and migration of recovered individuals. In the product model, infectives in one community, for example, should be able to move to the other community or recover within their own community—a feature exactly reflected in the structure of a Cartesian graph product.

However, note that, in general, we may well wish to assume differences in these parameters. We may wish to assume, for example, that recovery rates are higher in one community or that migration rates of infectives are lower than for susceptibles. Unlike a Cartesian graph product, a Cartesian product of compartmental models must take into account the arc labels, which are the transition rates; in general, new parameters are necessarily introduced.

We propose the following definition for a Cartesian product of linear compartmental models. If a transition in model from to occurs with rate , then for every state in model , a transition in the product model occurs from to at rate . Similarly, if a transition in model from to occurs with rate , then for every state in model , a transition in the product model occurs from to at rate .

The presence of sources and sinks does not add any fundamental complications. If a transition in model from to a sink occurs with rate , then for every state in model , a transition from to the sink occurs with rate (similarly,* mutatis mutandis*, for transitions in to a sink). Finally, if a transition from a source to state in model occurs at rate , then in the product model, for every state in model , a transition from a source to occurs at rate (and similarly for transitions from the source which appear in model ). These, and only these, transitions constitute the product model.

See the Appendix for more detail on the Cartesian product of linear models.

#### 5. Epidemic Models

How can products like the Cartesian and strong products of graphs be used in formulating epidemic models? As we shall see, the product reviewed above can be extended to this case as well. We must extend the Cartesian product of compartmental models to allow interaction between different populations. (We note that similar considerations apply in the more general ecological modeling setting, including Lotka-Volterra predator-prey and competition equations, but we will not pursue these applications.)

##### 5.1. Structured SI Model

In this section, we return to the classical Watson epidemic model, representing the SI epidemic in multiple regions. We will extend the Cartesian product of linear compartmental models, showing that the Watson model is a product of the simple SI model and a geographic model. In this special case, the geographic model will have no transitions at all.

The SI model of the transmission process is the one discussed above, with two states and , and transitions as pictured in Figure 1.

We now define a factor model which distinguishes individuals by community, to be combined with the SI model. If there are communities, let be the number of individuals in each community. If no migration takes place, and we ignore demographic turnover, this model corresponds to the differential equation system for all . For simplicity, we will illustrate only the case (Figure 4(a)).

**(a)**

**(b)**

The state space of the product model will consist of the numbers of susceptibles and infectives in community 1 and community 2, ordered pairs such as , which can be given names , , , and . Naive application of the Cartesian product for compartmental models would begin with the observation that the SI factor model includes a transition from to at rate . We would then iterate over the levels of the community model. We need a transition from to , but at what rate? Generalizing the Cartesian product formula given above in the most direct way produces a model with transition rates and , corresponding to the graph seen in Figure 4(b). This is a technically valid compartmental model, but it does not account for potential transmission between infectives in one community (e.g., ) and susceptibles in the other (e.g., ).

We must therefore extend the Cartesian product of compartmental models. In this example, we must take into account that the rate of transmission between a susceptible and an infective individual depends on the community membership of the infective as well as that of the susceptible. The extended definition is as follows.

As above, let and be models. The state space for the extended Cartesian product is, as before, the Cartesian product of the state spaces of and of . For , the transition rates include functional forms , that is, functional dependencies on one or more states of .

In the example of the Watson epidemic model, we have the following. The transition rate denoting transmission events in the SI model has rate . We will construct the product model using the rule that, from every compartment , that is, for every compartment descended from the compartment, there is a transition to its corresponding sibling descended from the compartment, at rate , for every . Note that the infective compartment in this definition is distinct from the target vertex of the transition—the transition arc points from to , on the level of the source vertex, but the infective compartment ranges over levels of the product model independently of the source—and this distinction is crucial to defining the correct set of transitions.

Where our earlier definition constructs one arc from each compartment to its corresponding compartment, this definition constructs one arc from each compartment to its compartment* for each* infective compartment that can transmit to those susceptibles. This yields the model shown in Figure 5. This extended Cartesian product yields two arcs for transitions from to , the first reflecting our intent that individuals in community 1 can cause infections in their own community and the second reflecting transmission to community 1 from community 2. This can be canonically represented as a single arc whose rate is the sum of the rates in the individual arcs, which, in this example, is , as in the original presentation of this model by Watson [22]. Similarly, two arcs appear for transitions from to . Thus, the extended Cartesian product correctly represents the Watson model as a product of a within-community epidemic process and a geographic model.

Here we provide a formal definition of this product.

*Definition 1. *A simple Cartesian product of two compartmental models and is a compartmental model whose set of compartments is the set of ordered pairs for every compartment of and of .

For every arc of model , with per capita transition rate , source compartment , and target compartment , the arcs of the product model include all arcs of the formwhere , and range over all compartments of the product model descending from , and , respectively, and is the compartment descending from that is otherwise on the same level as , together with the corresponding arcs derived from the arcs of factor model . The subscripts of distinguish the different arcs by providing the names of the levels to which all of the product compartments belong. The set of arcs of the product model consists of only the above arcs.

The product transition rates can be defined as needed, to generate an appropriately concise form for the transition rate functions, set unneeded transition rates to zero, or to do other works of specifying the details of the combined epidemic dynamics. Examples below demonstrate several ways of using these functions to construct specific models.

Before introducing a series of examples of product models with epidemiological application, we note that the product compartments, defined as ordered -tuples such as , can be assigned variable names such as in a number of ways. We will use several different naming conventions in our examples. Likewise the parameters such as and need to be mapped in product transitions to differentiated variables such as and , as appropriate to the application. We consider this to be part of the definition of the function and other rate functions.

##### 5.2. Community Model Featuring Demographics

We note that the disease process factor model may be generalized to include demographic turnover (“vital dynamics”). For example, this may feature a constant inflow of new susceptibles and an exponential mortality or removal; the SI model could be expressed in the formHere, is a constant recruitment rate, and is a per capita death rate (see, e.g., [10]). If sources and sinks are considered to be special compartments, the above definition encompasses such inflow and outflow transitions. If we construct the extended Cartesian product model of this SI process with the same community model, we obtain the correct product model, with differential equationsThis model is illustrated in Figure 6.

Other elaborations of the epidemic model can be combined with regional models in the same way, including the SIS process (used, for instance, to model gonorrhea (e.g., [25]) and more recently to model infectious trachoma [26]), the SIR model, more complex variants (e.g., [27–29] out of a vast literature), or even models featuring vector-borne transmission (e.g., [30–33]). Useful factor models can include regional models with transportation, host genetics [10, 34, 35], gender, vaccination status, multiple risk groups (e.g., high and low risk of infection), or the presence of a second infectious agent.

##### 5.3. Compartmental Aging

Age-structured models are frequently used in analysis of disease transmission to reflect changes in susceptibility, frequency of complications, or mixing patterns which depend on age. Compartmental model product structure can easily reflect these features, as we illustrate in the following example. Consider the standard SIR model to be the first factor model:where and are transmission and recovery rates as above.

We then use the following compartmental aging process as the second factor model:Here, is simply the rate of aging (one year per year), is a constant recruitment rate, and constants are age-class-specific per capita mortality rates.

The number of age compartments could be chosen to be any positive integer, in principle. Numerically, the use of compartmental aging can yield large stiff systems of equations, but compartmental aging approximates the use of McKendrick-von Foerster equations for aging.

These two models and their Cartesian product model are shown in Figures 7(a), 7(b), and 7(c). In the product model, inflow term represents vertical transmission, while would represent individuals immune at birth. Either of these rates can be set to zero for specific applications.

**(a)**

**(b)**

**(c)**

We note that, in this example, we have built recruitment and mortality into the aging model, while in the previous section we included them in the transmission model. There is flexibility in where to include these demographic processes, depending on what subscripts one wishes to have attached to their rates in the product model. If needed they can even be included in multiple factor models and assigned to constant values including zero as appropriate in the product.

##### 5.4. Risk-Stratified STI Model

Sexual behavior is highly heterogeneous, with some individuals having far more partners per unit time than others. Moreover, such individuals may preferentially mix with similar individuals. The epidemiological role of a relatively small group of highly active people in transmission of a sexually transmitted infection (STI) was explored in a mathematical model of gonorrhea [36], and similar approaches were used in HIV modeling [37].

Consider the following simple example. Suppose that we begin with the factor modelrepresenting disease transmission in a population of MSM (men who have sex with men) [10]. Here represents the transmission probability per partnership, equals a susceptible individual’s rate of acquiring new sexual partners, and is the probability that a susceptible individual’s partner is chosen from a specific population of infectives (in the basic factor model, there is only one population of infectives, and in that model this probability is taken to have a constant value of 1, but these probabilities will be nontrivial in the product model, in which there are multiple infective populations). Here is disease-specific per capita mortality, is a constant inflow rate of susceptibles, and is the disease-independent mortality rate. We will multiply this model by a second factor model in which the population is divided into a high risk group and a low risk group , with transition rates and between them:

The product model is shown in Figure 8. This model can then represent the presence of a high risk core group with a higher rate of acquiring partners than the other, as well as nonrandom mixing between the groups, expressed by the probabilities , , and so forth. Because the mixing probabilities and for a susceptible individual in group must sum to one, and likewise and , we could replace and by and , but it is not necessary to do so. As formulated, this system keeps the biologically distinct roles of and separate, although in some circumstances it may be desirable to combine them, while respecting the constraint that [38]. However, one may desire to have the quantities as functions of the state variables, reflecting that partner choice probabilities may depend on the dynamically varying group sizes [37, 39], in which case it is advantageous to retain them as separate parameters so that they can be replaced by more complex expressions straightforwardly.

##### 5.5. Gender in STI Models

Modeling heterosexual transmission of an STI may proceed by dividing the population into males and females. Such a model can be developed along lines very similar to the risk model in the previous section. We may begin with a similar transmission factor model, here shown as an SIS process:The second factor model will be simplywhere we assume no transitions from male to female or vice versa. In constructing the product model, we incorporate the assumption of heterosexual-only transmission by defining the partner choice probabilities to be one for opposite-gender combinations (, ) and zero for the same-gender combinations. The product model is thenas seen in Figure 9.

##### 5.6. Interacting Transmission of Leprosy and Tuberculosis

The extended Cartesian product of compartmental models can be applied to problems involving two separate infectious disease processes. In the joint leprosy-tuberculosis model appearing in [40], the epidemiological effects of cross-immunity between two mycobacterial species were analyzed using a compartmental model. This model may be represented as a product of two-factor models, the first being a simple tuberculosis model based on susceptible (), latent TB (), and active tuberculosis ():where is a recruitment rate, is an overall mortality rate, is a rate of progression of latent tuberculosis to active disease, is a transmission coefficient (hazard rate per infective) ( in the paper), and is the probability a newly infected individual will develop active tuberculosis rapidly instead of becoming latently infected with tuberculosis (Figure 10).

The second factor model represents the progression of leprosy from susceptible , to latent infection with leprosy (), and to multibacillary disease () or paucibacillary disease (). The leprosy factor model is then (Figure 11)where here is the transmission coefficient for paucibacillary leprosy ( in the paper), is the transmission coefficient for lepromatous leprosy ( in the paper), is the rate at which latently infected individuals develop paucibacillary disease ( in the paper), and is the rate at which latently infected individuals develop multibacillary disease ( in the paper).

The product model (Figure 12) represents the epidemiological interference of the two closely related mycobacterial infections. Individuals latently infected with one may have partial immunity against the other. This product structure could be applied to other settings such as HIV-TB interactions (e.g., [41]).

#### 6. Strong Products

The extended Cartesian product is too restrictive when constructing models of multiple diseases. For instance, one may be infected by two pathogens during a single encounter with a dually infected person. Thus, it may be necessary to allow individuals to proceed to dual infection directly from the susceptible class without passing through the singly infected states. The extended Cartesian product defined earlier does not permit this possibility.

Just as the Cartesian product of graphs can be extended to a strong product of graphs, an analogous strong product is possible for products of compartmental models. As we will show below, a strong product of compartmental models will permit derivation of multistrain or multidisease models featuring simultaneous transmission.

As an example, consider the following simple SIS epidemic model, which we might apply to transmission of* Chlamydia trachomatis*, the etiologic agent of trachoma (a blinding disease) [42, 43]. In principle, multiple strains of the trachoma agent can circulate [44]. Consider a model of a single strain, in which is the number of susceptibles and is the number of infectives:where is a transmission coefficient, is a recovery rate, and is the total population.

We can construct a multistrain model with partial cross-immunity [45, 46] using a suitably defined strong product, defined as follows. Let and be models, with states labeled and , respectively. The vertices of the strong product model are, as in the previously defined products, the Cartesian product of the vertex sets of the factor models. Every arc of each factor model gives rise to one or more arcs within each level of the product model, as in the other products, one for each interaction with product compartments. There are also additional, diagonal arcs in the product model that cross levels, representing more than one of the factor model’s transitions taking place simultaneously.

In Figure 13, we present the strong product of the above SIS model with itself.

The arcs of the Cartesian product of models are present, representing infection of an individual by either strain 1 or 2, but there are additional arcs as well, including the diagonal transition from to representing simultaneous transmission of both strains 1 and 2 to a fully susceptible individual in a single encounter with an individual carrying both strains.

Unlike the Cartesian product, here a single interaction between compartments can manifest in multiple transitions. The interaction between examples and can result in transmission of either or both strains, and these cases are represented by three arcs in the diagram, with transmission rates distinguished by brackets.

A formal definition of the strong product of compartmental models, which generates the above example product, is as follows.

*Definition 2. *A strong product of two compartmental models and is a compartmental model whose set of compartments is the set of ordered pairs for every compartment of and of . Models and are considered to be distinct models for the purpose of this definition, and each model’s transitions are considered distinct from the other, even when a product is taken of a model with itself.

For every set of factor models’ transitions, belonging to distinct factor models, each with source compartment , target compartment , and per capita transition rate , the product model includes all arcs of the form where ranges over the compartments of the product model that descend from all the factor vertices , each ranges over the product compartments that descend from all vertices in the set , and descends from all of and is otherwise on all the same levels as . The arcs of the product model are only those generated by the above definition. As previously, the subscripts to the rate function distinguish the different product arcs by indicating the levels to which all the function’s arguments belong.

In our SI example, we have defined the rate functions to produce appropriate products of transmission () and recovery () transitions, with distinct but compact subscripts, and to omit transitions in which transmission of one strain occurs simultaneously with recovery from the other one.

#### 7. Exploration of a Family of Models

In this section, we illustrate the use of the extended Cartesian product in model development and exploration, using a model of targeted screening for gonorrhea as a simple example. Such a model can be expressed using four components: a natural history model, a partitioning of the population by gender, a division into low and high risk groups, and a process of screening of individuals (Figure 14). For the natural history model, we will use the simple SIS process as in [25] for illustration, while recognizing that for some STIs a more complex transmission model may be needed, for example, to reflect partial immunity [47]. Because within- and between-gender transmission can vary greatly, we include a division of the model population by gender, with the assumption that rates of gender transition and proportions of nonbinary individuals are small in comparison to the model dynamics. We include a high and low risk group as in [36], with transitions between the risk groups, and finally we include an exposure model tracking the individuals exposed to a control measure such as frequent screening [48].

**(a)**

**(b)**

**(c)**

**(d)**

The product of these four models (constructed by extending the above definition of the extended Cartesian product of two models or by taking a product of products) has sixteen compartments and describes a process of transmission with rates affected by the genders, risk group membership, and exposure status of both susceptibles and infectives (Figure 15). The product structure naturally generates a process that includes both homosexual and heterosexual transmission. As drawn here, the effect of the screening program is expressed by changes in the removal rate such that screened individuals are removed from the infective state more quickly than those who are not screened.

Using the extended Cartesian product definition of this model, it is straightforward to generate partial products using subsets of the set of four factor models shown in Figure 14, yielding a spectrum of models of intermediate complexity (Figure 16), which can be evaluated on their ability to fit observed data. Methods to evaluate the goodness of fit of such a model to data might include least squares (e.g., [49]) or likelihood methods (e.g., [50]).

**(a)**

**(b)**

**(c)**

**(d)**

**(e)**

**(f)**

More importantly, it is also straightforward using this formulation to generate models with greater detail, for example, by using more than two risk groups (Figure 17). In this way, models with arbitrarily large numbers of risk groups can be straightforwardly and systematically evaluated for goodness of fit to find the best description of the true process available in this framework, a process which cannot be undertaken without an automated model generation framework of this sort.

#### 8. Discussion

Products of compartmental models, defined as straightforward generalizations of graph products, represent useful operations in developing epidemiological models. Similar mathematical structures arise from addition of age structure, gender, geographic differences, or other forms of heterogeneity to an epidemic model. Such similarities reveal the presence of a “design pattern” [51] that is captured by the extended Cartesian products we define here.

The products presented in this paper by no means represent the full range of possible products of models. For the products we presented, the state space of the product model is the Cartesian product of the state spaces of the factor models. Some cases may require only a subset of this: consider an HIV model in which the infective classes are structured by CD4 count and viral load classes, which are not relevant to the susceptible classes. Such examples can be easily handled by straightforward generalizations of the products given in this paper. More complex products are required when the state space of the product model must include history (for example, the order in which individuals were infected by pathogen strains).

The extended Cartesian product is well suited to the operation of adding host heterogeneity to an epidemic model, and so it may facilitate automated generation of a family of epidemic models. Similarly, the extended strong product is suited to the process of adding pathogen heterogeneity to an epidemic model. We have developed software to implement these products. All models and figures in this paper were generated by this software, which is freely available as a module for the Sage mathematics computing system [52]. This software enables systematic numerical exploration of a large family of related models, to automate evaluation of specific refinements of an epidemic process for relevance to observed dynamics, and could form the basis of a systematic approach to numerical structural sensitivity analysis.

#### Appendix

#### A. Graph Products

Formally a directed graph is a set of vertices together with arcs, defined as a set of ordered pairs of vertices. We consider graph products for which the vertices of the graph product are formed from the Cartesian product of the vertices of each of the factor graphs. Notationally, if are sets of vertices, then their Cartesian product is the set , with the elements of being tuples of elements of the component sets .

For application to mathematical models, the arrows (arcs) will represent transition rates between states represented by vertices. Each arc will therefore require an associated label. We allow multiple arcs between the same vertices and thus we must use multigraphs, represented as a set . Here, is the vertex set of the graph and is its set of arc labels. Each of these tuples is visualized as an arrow from to with label (which we may denote as ).

The Cartesian product of directed graphs is a graph whose vertex set is the Cartesian product of the vertex sets of each graph and whose arcs are of the form , where the two tuples are identical in all but the th position and where there is an arc connecting to in . In this paper, the products defined will yield the arc labels (transition rates) in the product graph.

For each vertex in one of the factor models, each vertex in the other model is replicated. If the first factor is a graph with vertices and , with an arc from to , and the second is a graph with vertices 1 and 2 and an arc from 1 to 2, then the product graph contains vertices which could be denoted as , , , and . Each arc of one graph is replicated for every vertex of the other. Thus, for example, the arc from 1 to 2 in the second factor graph corresponds to an arc from to for the first vertex of the first model and also to an arc from to for the second vertex. Similarly, the arc from to in the first model corresponds to an arc from to (for arc 1 of the second model) and from to (for the other).

The strong product (or strong Cartesian product) of graphs , written , is the graph whose vertex set is the Cartesian product of the graphs’ vertex sets, which has an arc from to if and only if, for every , either there is an arc from to , or . The Cartesian product of directed graphs is a graph whose vertex set is the Cartesian product of the vertex sets of each graph and whose arcs are of the form , where the two tuples are identical in all but the th position and where there is an arc connecting to in .

##### A.1. Adjacency Matrices

The Cartesian product graph can also be defined by its adjacency matrix. Let the adjacency matrices of finite graphs and , respectively, be and . Let and be identity matrices of the same size as and , respectively. The Cartesian product graph has adjacency matrix , where is the Kronecker product. Writing yields an adjacency matrix for the product graph which is the same, except for the ordering of the vertices in the product (and the order in which the Cartesian product of sets of vertices is taken). More generally, graphs with multiple arcs between two vertices can be defined, in which case the elements of the adjacency matrix record the number of directed arcs to from . The Cartesian product definition above can be applied in this case as well.

The strong product of two directed graphs and includes more arcs than the Cartesian product [23]. This product has the same vertex set, the Cartesian product of the factors’ vertex sets, but in addition to the arcs of the Cartesian product graphs, it also includes all arcs from to , where there is an arc from to * and* an arc from to . Using the same notation as above, the adjacency matrix of the strong product graph is .

Products of more than two graphs can be represented by analogous, though more tedious, matrix operations.

##### A.2. Linear Compartmental Models

Suppose we consider a compartmental model with states represented by the first-order linear systemwhere is a vector of exogenous inflow terms and is a transition rate matrix. In general, could contain sink terms; for example, let represent the number of individuals in a population with constant recruitment and constant per capita mortality, so that . In this case, is a matrix .

Consider two continuous time chains, with state spaces and , respectively. Suppose that the transition rate matrix for each is given by and , respectively (assumed time-independent, for simplicity). A transition rate matrix may contain both positive (inflow) terms and negative (outflow) terms. A transition to from state at rate will be represented in by a term in the th element of of and a term in the th element of of Any transition rate matrix can be represented as a sum over arcs:

A Cartesian product of two Markov chains and can then be defined as follows. We will denote the arcs of model by ; for each arc there is a matrix whose elements are 0, except for the inflow and outflow represented by that arc, as illustrated above. The decomposition of the transition rate matrix by arcs is then . Similarly, the transition rate matrix of model , decomposed by arcs, is . If and are identity matrices of the same dimension as and , respectively, a special case of the Cartesian product can be writtenFigure 18 depicts two such models (Figures 18(a) and 18(b)) and their product as defined here (Figure 18(c)). This special case only represents a model in which the two chains behave completely independently.

**(a)**

**(b)**

**(c)**

**(d)**

To obtain a more general product, we replace the identity matrices with general diagonal matrices. The elements of the diagonal matrix are not assumed identical. We let be such a diagonal matrix of the same dimension as , representing a scaling matrix for each arc of model for every state of model . Similarly, , a matrix of the same dimension as , is a scaling matrix for each arc of model for every state of model . A more general product is then expressed byproducing a product process like the one pictured in Figure 18(d).

Note that a given arc connecting two vertices may, in applications, represent two separate processes. For instance, we may have a compartment representing live individuals and another dead and wish to model the rate of death due to two causes, say and . Canonically, we may represent the total transition from live to dead as a single arc with rate (assuming independent competing risks), but in the decomposition above, if we represent the transition by two separate arcs, the Cartesian product formula may be applied in the same way.

Let us use the notation to indicate that compartment descends from factor compartment . The transition matrix for the extended Cartesian product model is where is considered to depend on .

#### Conflicts of Interest

The authors declare they each have no conflicts of interest.

#### Acknowledgments

This study was supported by a Models of Infectious Disease Agent Study (MIDAS) grant from the US NIH/NIGMS to the University of California, San Francisco (U01GM087728). The Department of Ophthalmology acknowledges support from Research to Prevent Blindness.

#### References

- J. L. Aron, “Simple versus complex epidemiological models,” in
*Applied Mathematical Ecology*, S. A. Levin, T. G. Hallam, and L. J. Gross, Eds., vol. 18 of*Biomathematics*, pp. 176–192, Springer, Berlin, Germany, 1989. View at: Publisher Site | Google Scholar - C. M. Saad-Roy, Z. Shuai, and P. van den Driessche, “A mathematical model of syphilis transmission in an MSM population,”
*Mathematical Biosciences*, vol. 277, pp. 59–70, 2016. View at: Publisher Site | Google Scholar | MathSciNet - C. L. Althaus, “Rapid drop in the reproduction number during the Ebola outbreak in the democratic Republic of Congo,”
*PeerJ*, vol. 2015, no. 11, Article ID e1418, 2015. View at: Publisher Site | Google Scholar - S. Blumberg, L. Worden, W. Enanoria et al., “Assessing measles transmission in the United States following a large outbreak in California,”
*PLoS Currents*, vol. 7, 2015. View at: Publisher Site | Google Scholar - F. Liu, W. T. A. Enanoria, J. Zipprich et al., “The role of vaccination coverage, individual behaviors, and the public health response in the control of measles epidemics: An agent-based simulation for California,”
*BMC Public Health*, vol. 15, no. 1, article no. 447, 2015. View at: Publisher Site | Google Scholar - C. M. Macal, M. J. North, N. Collier et al., “Modeling the transmission of community-associated methicillin-resistant Staphylococcus aureus: A dynamic agent-based simulation,”
*Journal of Translational Medicine*, vol. 12, no. 1, article no. 124, 2014. View at: Publisher Site | Google Scholar - S. Merler, M. Ajelli, L. Fumanelli et al., “Spatiotemporal spread of the 2014 outbreak of Ebola virus disease in Liberia and the effectiveness of non-pharmaceutical interventions: a computational modelling analysis,”
*The Lancet Infectious Diseases*, vol. 15, no. 2, pp. 204–211, 2015. View at: Publisher Site | Google Scholar - J. A. Jacquez,
*Compartmental Analysis in Biology and Medicine*, The University of Michigan Press, 2nd edition, 1985. - J. H. Matis and T. R. Kiffe,
*Stochastic Population Models*, vol. 145 of*Lecture Notes in Statistics*, Springer, New York, USA, 2000. View at: Publisher Site | MathSciNet - R. M. Anderson and R. M. May,
*Infectious Diseases of Humans: Dynamics and Control*, Oxford University Press, 1991. - W. O. Kermack and A. G. McKendrick, “A contribution to the mathematical theory of epidemics,”
*Proceedings of the Royal Society A*, vol. 115, no. 772, pp. 700–721, 1927. View at: Publisher Site | Google Scholar - N. T. J. Bailey,
*The Mathematical Theory of Infectious Diseases and its Application*, Griffin, London, UK, 1975. View at: MathSciNet - H. W. Hethcote, “Qualitative analyses of communicable disease models,”
*Mathematical Biosciences*, vol. 28, no. 3/4, pp. 335–356, 1976. View at: Publisher Site | Google Scholar | MathSciNet - H. W. Hethcote, “A Thousand and One Epidemic Models,” in
*Frontiers in Mathematical Biology*, S. A. Levin, Ed., vol. 100 of*Lecture Notes in Biomathematics*, pp. 504–515, Springer, Berlin, Germany, 1994. View at: Publisher Site | Google Scholar - H. W. Hethcote, “The mathematics of infectious diseases,”
*SIAM Review*, vol. 42, no. 4, pp. 599–653, 2000. View at: Publisher Site | Google Scholar | MathSciNet - P. van den Driessche and J. Watmough, “Reproduction numbers and sub-threshold endemic equilibria for compartmental models of disease transmission,”
*Mathematical Biosciences*, vol. 180, pp. 29–48, 2002. View at: Publisher Site | Google Scholar | MathSciNet - M. Martcheva,
*An Introduction to Mathematical Epidemiology*, vol. 61 of*Texts in Applied Mathematics*, Springer, New York, USA, 2015. View at: Publisher Site | MathSciNet - S. J. Mason, “Feedback Theory—Further Properties of Signal Flow Graphs,”
*Proceedings of the IRE*, vol. 44, no. 7, pp. 920–926, 1956. View at: Publisher Site | Google Scholar - E. R. Lewis,
*Network Models in Population Biology*, vol. 7 of*Biomathematics*, Springer, Berlin, Germany, 1977. View at: MathSciNet - L. N. Vasershtein, “Markov processes over denumerable products of spaces describing large system of automata,”
*Problemy Peredachi Informatsii*, vol. 5, no. 3, pp. 64–72, 1969. View at: Google Scholar | MathSciNet - S. Rushton and A. J. Mautner, “The deterministic model of a simple epidemic for more than one community,”
*Biometrika*, vol. 42, pp. 126–132, 1955. View at: Publisher Site | Google Scholar | MathSciNet - R. K. Watson, “On an epidemic in a stratified population,”
*Journal of Applied Probability*, vol. 9, pp. 659–666, 1972. View at: Publisher Site | Google Scholar | MathSciNet - W. Imrich and S. Klavžar,
*Product Graphs: Structure and Recognition*, John Wiley & Sons, New York, NY, USA, 2000. View at: MathSciNet - N. T. Bailey,
*The Elements of Stochastic Processes with Applications to the Natural Sciences*, John Wiley & Sons, Inc., New York, USA, 1964. View at: MathSciNet - A. Lajmanovich and J. A. Yorke, “A deterministic model for gonorrhea in a nonhomogeneous population,”
*Mathematical Biosciences*, vol. 28, no. 3/4, pp. 221–236, 1976. View at: Publisher Site | Google Scholar | MathSciNet - T. M. Lietman, T. Gebre, B. Ayele et al., “The epidemiological dynamics of infectious trachoma may facilitate elimination,”
*Epidemics*, vol. 3, no. 2, pp. 119–124, 2011. View at: Publisher Site | Google Scholar - B. Cvjetanović, B. Grab, and K. Uemura, “Dynamics of acute bacterial diseases. Epidemiological models and their application in public health. Part I. Theory and practice of epidemiological models,”
*Bulletin of the World Health Organization*, vol. 56, Suppl 1, pp. 9–23, 1978. View at: Google Scholar - H. W. Hethcote, H. W. Stech, and P. van den Driessche, “Nonlinear oscillations in epidemic models,”
*SIAM Journal on Applied Mathematics*, vol. 40, no. 1, pp. 1–9, 1981. View at: Publisher Site | Google Scholar | MathSciNet - M. F. Lechat, J. Y. Misson, C. M. Vellut, C. B. Misson, and A. Bouckaert, “Un modèle épidémiométrique de la lèpre,”
*Bulletin of the World Health Organization*, vol. 51, no. 4, pp. 361–373, 1974. View at: Google Scholar - R. Ross, “An Application of the Theory of Probabilities to the Study of a priori Pathometry. Part I,”
*Proceedings of the Royal Society A: Mathematical, Physical and Engineering Sciences*, vol. 92, no. 638, pp. 204–230, 1916. View at: Publisher Site | Google Scholar - R. Ross and H. P. Hudson, “An Application of the Theory of Probabilities to the Study of a priori Pathometry. Part II,”
*Proceedings of the Royal Society A: Mathematical, Physical and Engineering Sciences*, vol. 93, no. 650, pp. 212–225, 1917. View at: Publisher Site | Google Scholar - N. T. Bailey,
*The Biomathematics of Malaria*, Biomathematics of Diseases, no. 1, C. Griffin & Co., London, 1982. - D. L. Smith, K. E. Battle, S. I. Hay, C. M. Barker, T. W. Scott, and F. E. McKenzie, “Ross, Macdonald, and a theory for the dynamics and control of mosquito-transmitted pathogens,”
*PLoS Pathogens*, vol. 8, no. 4, Article ID e1002588, 2012. View at: Publisher Site | Google Scholar - R. M. Anderson and R. M. May, “Coevolution of Hosts and Parasites,”
*Parasitology*, vol. 85, no. 2, pp. 411–426, 1982. View at: Publisher Site | Google Scholar - R. M. May and R. M. Anderson, “Epidemiology and genetics in the coevolution of parasites and hosts,”
*Proceedings of the Royal Society*, vol. 219, pp. 281–313, 1983. View at: Google Scholar | MathSciNet - H. W. Hethcote and J. A. Yorke,
*Gonorrhea Transmission Dynamics and Control*, vol. 56, Springer, New York, USA, 1984. View at: Publisher Site | MathSciNet - R. M. Anderson, S. Gupta, and W. Ng, “The significance of sexual partner contact networks for the transmission dynamics of HIV,”
*Journal of Acquired Immune Deficiency Syndromes*, vol. 3, no. 4, pp. 417–429, 1990. View at: Google Scholar - J. A. Jacquez, C. P. Simon, J. Koopman, L. Sattenspiel, and T. Perry, “Modeling and analyzing HIV transmission: the effect of contact patterns,”
*Mathematical Biosciences*, vol. 92, no. 2, pp. 119–199, 1988. View at: Publisher Site | Google Scholar | MathSciNet - H. W. Hethcote, “Proportionate mixing,” in
*Models for Infectious Human Diseases: Their Structure and Relation to Data*, V. Isham and G. Medley, Eds., vol. 6, Cambridge University Press, 1996. View at: Google Scholar - T. Lietman, T. Porco, and S. Blower, “Leprosy and tuberculosis: The epidemiological consequences of cross-immunity,”
*American Journal of Public Health*, vol. 87, no. 12, pp. 1923–1927, 1997. View at: Publisher Site | Google Scholar - T. C. Porco, P. M. Small, and S. M. Blower, “Amplification dynamics: Predicting the effect of HIV on tuberculosis outbreaks,”
*Journal of Acquired Immune Deficiency Syndromes*, vol. 28, no. 5, pp. 437–444, 2001. View at: Publisher Site | Google Scholar - D. Gao, T. M. Lietman, C.-P. Dong, and T. C. Porco, “Mass drug administration: the importance of synchrony,”
*Mathematical Medicine and Biology. A Journal of the IMA*, vol. 34, no. 2, pp. 241–260, 2017. View at: Publisher Site | Google Scholar | MathSciNet - T. Lietman, T. Porco, C. Dawson, and S. Blower, “Global elimination of trachoma: How frequently should we administer mass chemotherapy?”
*Nature Medicine*, vol. 5, no. 5, pp. 572–576, 1999. View at: Publisher Site | Google Scholar - L. Kari, W. M. Whitmire, J. H. Carlson et al., “Pathogenic diversity among
*Chlamydia trachomatis*ocular strains in nonhuman primates is affected by subtle genomic variations,”*Journal of Infectious Diseases*, vol. 197, no. 3, pp. 449–456, 2008. View at: Publisher Site | Google Scholar - K. Dietz, “Epidemiologic interference of virus population,”
*Journal of Mathematical Biology*, vol. 8, no. 3, pp. 291–300, 1979. View at: Publisher Site | Google Scholar | MathSciNet - M. J. Keeling and P. Rohani,
*Modeling Infectious Diseases in Humans and Animals*, Princeton University Press, Princeton, NJ, USA, 2008. View at: MathSciNet - R. C. Brunham, B. Pourbohloul, S. Mak, R. White, and M. L. Rekart, “The unexpected impact of a Chlamydia trachomatis infection control program on susceptibility to reinfection,”
*Journal of Infectious Diseases*, vol. 192, no. 10, pp. 1836–1844, 2005. View at: Publisher Site | Google Scholar - K. C. Lee, Q. Ngo-Metzger, T. Wolff, J. Chowdhury, M. L. Lefevre, and D. S. Meyers, “Sexually transmitted infections: Recommendations from the U.S. preventive services task force,”
*American Family Physician*, vol. 94, no. 11, pp. 907–915, 2016. View at: Google Scholar - H. W. Hethcote and J. W. Van Ark,
*Modeling HIV Transmission and AIDS in the United States*, vol. 95, Springer Science & Business Media, 2013. - D. J. Blok, R. E. Crump, R. Sundaresh et al., “Forecasting the new case detection rate of leprosy in four states of Brazil: A comparison of modelling approaches,”
*Epidemics*, vol. 18, pp. 92–100, 2017. View at: Publisher Site | Google Scholar - C. Alexander, S. Ishikawa, M. Silverstein, J. R. i Ramió, M. Jacobson, and I. Fiksdahl-King,
*A Pattern Language*, Gustavo Gili, 1977. - L. Worden and T. C. Porco, “Sage box models,” 2017, https://github.com/tcporco/SageBoxModels. View at: Google Scholar

#### Copyright

Copyright © 2017 Lee Worden and Travis C. Porco. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.