scieee AI-readable full text Open interactive document viewer

The embedding problem for Markov matrices

Casanellas Rius, Marta,Fernández Sánchez, Jesús,Roca Lacostena, Jordi

Abstract

Characterizing whether a Markov process of discrete random variables has a homogeneous continuous-time realization is a hard problem. In practice, this problem reduces to deciding when a given Markov matrix can be written as the exponential of some rate matrix (a Markov generator). This is an old question known in the literature as the embedding problem [11], which has been solved only for matrices of size 2 × 2 or 3 × 3. In this paper, we address this problem and related questions and obtain results along two different lines. First, for matrices of any size, we give a bound on the number of Markov generators in terms of the spectrum of the Markov matrix. Based on this, we establish a criterion for deciding whether a generic (distinct eigenvalues) Markov matrix is embeddable and propose an algorithm that lists all its Markov generators. Then, motivated and inspired by recent results on substitution models of DNA, we focus on the 4 × 4 case and completely solve the embedding problem for any Markov matrix. The solution in this case is more concise as the embeddability is given in terms of a single condition.

Full text

Publ. Mat. 67 (2023), 411–445 DOI: 10.5565/PUBLMAT6712308 THE EMBEDDING PROBLEM FOR MARKOV MATRICES Marta Casanellas, Jes´ us Fern´ andez-S´ anchez, and Jordi Roca-Lacostena Abstract: Characterizing whether a Markov process of discrete random variables has a homogeneous continuous-time realization is a hard problem. In practice, this problem reduces to deciding when a given Markov matrix can be written as the exponential of some rate matrix (a Markov generator). This is an old question known in the literature as the embedding problem [11], which has been solved only for matrices of size 2 ×2 or 3 ×3. In this paper, we address this problem and related questions and obtain results along two different lines. First, for matrices of any size, we give a bound on the number of Markov generators in terms of the spectrum of the Markov matrix. Based on this, we establish a criterion for deciding whether a generic (distinct eigenvalues) Markov matrix is embeddable and propose an algorithm that lists all its Markov generators. Then, motivated and inspired by recent results on substitution models of DNA, we focus on the 4 ×4 case and completely solve the embedding problem for any Markov matrix. The solution in this case is more concise as the embeddability is given in terms of a single condition. 2020 Mathematics Subject Classification: 60J10, 60J27, 15B51, 15A16. Key words: Markov matrix, Markov generator, embedding problem, rate identifiability. 1. Introduction Markov matrices are used to describe changes between the states of two discrete random variables in a Markov process. As the entries of Markov matrices (or transition matrices) represent the conditional probabilities of substitution between states, Markov matrices have nonnegative entries and rows summing to 1. Among them, embeddable matrices are those that are consistent with a homogeneous continuous-time Markov process, so that changes occur at a constant rate over time and time is conceived as a continuous concept. The instantaneous rates of substitution are usually displayed as the entries of real matrices with non-negative off-diagonal entries and rows summing to 0, so-called rate matrices. In the homogeneous continuous-time setting, the transition matrices of a Markov process can be computed as M(t) = eQt, where Qis the rate matrix ruling the process and t≥0 accounts for the time 412 M. Casanellas, J. Fern´ andez-S´ anchez, J. Roca-Lacostena elapsed in the process. In this case, Mis said to be embeddable. Equivalently, a Markov matrix Mis embeddable if it can be written as the exponential of a rate matrix Q,M=eQ(with no reference to time t). Any rate matrix Qsatisfying M=eQis called a Markov generator of M. Almost a century ago, Elfving ([11]) formulated the problem of deciding which Markov matrices are embeddable, the embedding problem. Solving the embedding problem results in giving necessary and sufficient conditions for a Markov matrix Mto be the exponential of a rate matrix Q,M=eQ. Although the question is quite theoretical, it has practical consequences and, as such, it may appear in any applied field where discrete and continuous-time Markov processes are considered. For instance, in economic sciences [20, 15], in social sciences [29], and in evolutionary biology [32, 21], the embedding problem is crucial for deciding whether a Markov process can be modeled as a homogeneous continuous-time process or not. Although the embedding problem is solved for 2 ×2 and 3 ×3 matrices [24, 10, 22, 4], it has remained open for larger matrices so far. Some partial results on the necessary conditions for a Markov matrix to be embeddable were given in the second part of the twentieth century [28, 24, 9]. Moreover, there exist sufficient and necessary conditions on the embeddability of Markov matrices with different and real eigenvalues. This is a consequence of a result due to Culver [8] and characterizes embeddability of this type of matrices in terms of the principal logarithm; see Corollary 2.8. There are also some inequalities that need to be satisfied by the determinant or the entries of the matrix in order to be embeddable [16, 13]. At the same time, there is a discrete version of the embedding problem, which consists in deciding when a Markov matrix can be written as a certain power of another Markov matrix (see [29, 17, 18] for instance). A related issue is that of deciding whether there is a unique Markov generator for a given embeddable Markov matrix. Note that each Markov generator provides a different embedding of the Markov matrix into a homogeneous continuous-time Markov process. We refer to this question as the rate identifiability problem. It is well known that for diagonally dominant embeddable matrices the number of Markov generators reduces to one [9, Theorem 4]. The same happens if the matrix is close to the identity; for example, if either ||M−I|| <0.5 or det(M)>0.5 [20]. However, the situation becomes really complicated as the determinant of the matrix decreases. The first example of a Markov matrix with more than one Markov generator was given in [30], and further examples were provided in [10, 20]. In all these examples, however, the principal logarithm happens to be a rate matrix. The Embedding Problem for Markov Matrices 413 In this paper we provide a solution to the embedding problem for Markov matrices of any size with pairwise different eigenvalues (not necessarily real); see Theorem 4.5. This situation covers a dense open subset of the space of Markov matrices, so it solves the embedding problem almost completely (the set of matrices with repeated eigenvalues has measure zero within the whole space of matrices). For such matrices, we bound the number of Markov generators in terms of the real and imaginary parts of the eigenvalues and establish a criterion for deciding whether a Markov matrix with different eigenvalues is embeddable. Based on this criterion, we provide an algorithm that gives all Markov generators for Markov matrices with different eigenvalues (Algorithm 4.7). We also give an improvement in the bounds on the determinant mentioned above; see Corollary 3.3. The main techniques are the description of the complex logarithms of a matrix (see [14]) and a careful study of the complex region where the eigenvalues of a rate matrix lie (Section 3). In addition to these results, we completely solve the embedding problem for 4 ×4 Markov matrices (with repeated or different eigenvalues). The solution to the embedding problem provided in this case (see Section 5) is much more satisfactory because we are able to characterize embeddability by checking a single condition (and not looking at a list of possible Markov generators). We have devoted special attention to 4×4 matrices not only because it was the first case that remained still open, but also because our original approach and motivation arises from the field of phylogenetics, where Markov matrices rule the substitution of nucleotides in the evolution of DNA molecules. In recent years, new results and advances concerning the embedding problem have appeared in this field, providing deep insight and illustrative examples of the complexity of the general situation; see [21, 27, 1, 5]. The present work builds on some previous contributions by the authors in this setting. For 4 ×4 Markov matrices Mwith different eigenvalues (real or not) we prove that the embeddability can be checked directly by looking at the principal logarithm Log(M) together with a basis of eigenvectors: Theorem 1.1. Let M=Pdiag(1, λ1, λ2, λ3)P−1be a 4×4Markov matrix with λ1∈R>0,λ2∈C,λ3∈Cpairwise different. If λ2, λ3/∈R, define V=Pdiag(0,0,2πi, −2πi)P−1, L:= max (i,j):i6=j, Vi,j >0−Log(M)i,j Vi,j ,U:= min (i,j):i6=j, Vi,j <0−Log(M)i,j Vi,j , and define V= 0,L=U= 0 if all eigenvalues are real. Set N:= {(i, j) : i6=j, Vi,j = 0,and Log(M)i,j <0}. 414 M. Casanellas, J. Fern´ andez-S´ anchez, J. Roca-Lacostena Then, Mis embeddable if and only if N=∅,L≤U, and λi/∈R≤0 for i= 1,2,3. In this case, the Markov generators of Mare the matrices Log(M) + k V , where k∈Zsatisfies L ≤ k≤ U. As a byproduct we give an algorithm that outputs all possible Markov generators for such a matrix. Apart from this general case of matrices with different eigenvalues, we also study all other cases within the 4×4 case and we give an embeddability criterion for each (see Subsection 5.1, Cases I, II, III, IV, and Subsection 5.2). The case of diagonalizable matrices with two real repeated eigenvalues (Case III) turns out to be much more involved; still we are able to provide necessary and sufficient conditions for the embeddability in terms of eigenvalues and eigenvectors, and to propose an algorithm that checks whether a Markov matrix in this case is embeddable (Corollary 5.14, Algorithm 5.16). The outline of the paper is as follows. In Section 2 we state with precision the embedding problem and recall some known results needed in the sequel. Section 3 is devoted to bounding the real and the imaginary part of the eigenvalues of any rate matrix (Lemma 3.1). These bounds are used in Section 4 in order to provide a sufficient and necessary condition for an n×nMarkov matrix with pairwise different eigenvalues to be embeddable. In the same section, we also give the algorithm that outputs all Markov generators of such matrices. We devote Section 5 to 4×4 matrices, studying their embeddability in full detail by splitting them into all possible Jordan canonical forms. The proof of Theorem 1.1 is also given there. In the last section of the paper, Section 6, we summarize the results on the rate identifiability for embeddable 4 ×4 matrices (see Table 2). Appendix A is devoted to details concerning the implementation of Algorithm 5.16. 2. Preliminaries In this section we recall some definitions and relevant facts about the embedding problem of Markov matrices. Definition 2.1. A real square matrix Mis a Markov matrix if its entries are non-negative and all its rows sum to 1. A real square matrix Qis a rate matrix if its off-diagonal entries are non-negative and its rows sum to 0. A Markov matrix Mis embeddable if there is a rate matrix Qsuch that M=eQ; in this case we say that Qis a Markov generator for M. Embeddable Markov matrices are also sometimes referred to as matrices that have a continuous realization [31]. The embedding problem ([11]) consists in deciding whether a given Markov matrix is embeddable or not, in other words, determining which Markov matrices can be embedded into the multiplicative semigroup ({eQt :t≥0},·) for some rate matrix Q. The Embedding Problem for Markov Matrices 415 The following notation will be used throughout the paper. Id denotes the identity matrix of order n. We write GLn(K) for the space of n×n invertible matrices with entries in K=Ror C. For λ∈C\{0}, we use the notation logk(λ) to denote the k-th branch of the logarithm of λ, that is, logk(λ)=log |λ|+(Arg(λ)+2πk)i, where Arg(λ)∈(−π, π] is the principal argument of λ. For ease of reading the principal logarithm log0(λ) will be denoted as log(λ). Given a square matrix M, we denote by σ(M) the set of all its eigenvalues and by Comm∗(M) the commutant of M, that is, the set of invertible complex matrices that commute with M. Remark 2.2.If Dis a diagonal matrix, D= diagm1 z }| { λ1, . . . , λ1, m2 z }| { λ2, . . . , λ2,..., ml z }| { λl, . . . , λl with λi6=λj, then Comm∗(D) consists of all the block-diagonal matrices whose blocks are taken from the corresponding GLmi(C). In particular, the commutant of Ddoes not depend on the particular values of the entries λi. If m1=m2=··· =ml= 1, then Comm∗(D) is the set of invertible diagonal matrices. If Mis diagonalizable, the following result describes all possible logarithms of M(that is, all the solutions Qto the equation M=eQ). Theorem 2.3 ([14,§VIII.8]).Given a non-singular matrix Mwith an eigendecomposition Pdiag(λ1, λ2, . . . , λn)P−1, where λi∈C,i= 1, . . . , n, and P∈GLn(C), the following are equivalent: (i) Qis a solution to the equation M=eQ, (ii) Q=P A diag(logk1(λ1),logk2(λ2),...,logkn(λn))A−1P−1for some k1, k2, . . . , kn∈Zand some A∈Comm∗(diag(λ1, λ2, . . . , λn)). Remark 2.4.With respect to the previous result, we want to point out the following. (i) If uis an eigenvector of Qwith eigenvalue a, then uis also an eigenvector of M=eQwith eigenvalue ea. The converse is not true in general. (ii) If Comm∗(diag(λ1, . . .,λn))=Comm∗(diag(logk1 (λ1), . . .,logkn (λn))), then the description of the logarithms is slightly simpler, as every logarithm can be written as Q=Pdiag(logk1(λ1),...,logkn(λn))P−1. Moreover, in this case, Mand Qhave the same eigenvectors. This occurs, for example, when all the eigenvalues of Mare pairwise distinct or also when k1=k2=··· =kn. 416 M. Casanellas, J. Fern´ andez-S´ anchez, J. Roca-Lacostena The well-known formula det eQ=etr Qimplies that the determinant of every embeddable matrix is a positive real number. Hence, throughout this paper we implicitly assume that all Markov matrices are nonsingular and have a positive determinant. Note that this is not a restriction of the original problem, but a necessary condition for a Markov matrix to be embeddable. Since both Markov and rate matrices have only real entries, the study about the existence of real logarithms of real matrices by [8] is relevant for solving the embedding problem. The following proposition is a direct consequence of that work. Proposition 2.5 (see [8, Theorem 1]).Let Mbe a real square matrix. Then, there exists a real logarithm of Mif and only if det(M)>0and each Jordan block of Massociated with a negative eigenvalue occurs an even number of times. In [8, Theorem 2], Culver also proved that matrices with pairwise distinct positive eigenvalues have only one real logarithm, namely, the principal logarithm: Definition 2.6. The principal logarithm of M, which will be denoted by Log(M), is the only logarithm whose eigenvalues are the principal logarithm of the eigenvalues of M(see [19, Theorem 1.31]). In particular, if Mis diagonalizable, then Log(M) = Pdiag(log(λ1),...,log(λn))P−1. If Mis a Markov matrix, then its principal logarithm Log(M) has row sums equal to 0 (although it may not be a real matrix). Remark 2.7.Note that the above definition of the principal logarithm (Definition 2.6) extends the usual definition (e.g. see [19, p. 20]), which requires that the matrix Mhas no negative eigenvalues. This is required in order to use the spectral resolution of the logarithm function. In this paper, however, we mainly deal with diagonalizable matrices, for which the principal logarithm can be defined directly by taking the principal argument of the eigenvalues. The only non-diagonalizable Markov matrices that we deal with are 4 ×4 (see Subsection 5.2) which, according to Proposition 2.5, have no negative eigenvalues if they have a real logarithm. As a byproduct of the results explained above, we get the following embeddability criterion for Markov matrices with pairwise distinct real eigenvalues in terms of its principal logarithm. The Embedding Problem for Markov Matrices 417 Corollary 2.8. Let Mbe a Markov matrix with pairwise distinct real eigenvalues. Then: (i) If Mhas a non-positive eigenvalue, then Mis not embeddable. (ii) If Mhas no negative eigenvalues, Mis embeddable if and only if Log(M)is a rate matrix. 3. Bounds on the eigenvalues of rate matrices It is well known that the eigenvalues of a Markov matrix have modulus smaller than or equal to 1 [25,§8.4]. Here we bound the real and the imaginary part of the complex eigenvalues of rate matrices. To this end, if Qis an n×nrate matrix with n≥3 and λ∈σ(Q) is a non-real eigenvalue, we define bn(λ) := min p2 tr(Q) Re(λ)−(Re(λ))2,−Re(λ) tan(π/n), Bn:= min (−√3 2tr(Q),−tr(Q) 2 tan(π/n)). The following technical result is used in the next section and is also useful to improve a result of [20] (see Corollary 3.3). Lemma 3.1. Let Qbe an n×nrate matrix. Then for any eigenvalue λ∈ σ(Q)we have (i) Re(λ)≤0. Moreover, if λ6∈ R, then tr(Q) 2≤Re(λ)≤0. (ii) |Im(λ)| ≤ bn(λ)≤Bnif λ /∈R. Moreover, the bound on |Im(λ)|given by bn(λ)is tight for n≥3. Proof: (i) If Qis a rate matrix, then eQis a Markov matrix. In particular, the eigenvalues of Qare logarithms of the eigenvalues of a Markov matrix. Since the modulus of the eigenvalues of a Markov matrix is bounded by 1, we get Re(λ)≤0 for any λ∈σ(Q). Moreover, as nonreal eigenvalues of Qappear in conjugate pairs, we have that tr(Q) = X λ∈σ(Q) λ=X λ∈σ(Q)∩R λ+X λ∈σ(Q)\R Re(λ). Therefore, if λ /∈R, then Re(λ) appears twice in this expression, and so Re(λ)≥tr(Q)/2. (ii) We prove first that, for any non-real eigenvalue λ∈σ(Q), we have (1) |Im(λ)| ≤ p2 tr(Q) Re(λ)−(Re(λ))2≤ −√3 2tr(Q). 418 M. Casanellas, J. Fern´ andez-S´ anchez, J. Roca-Lacostena Let us take r=−tr(Q). Since Qis a rate matrix we get that e Q= Q+rIdnis a matrix with non-negative entries whose rows sum to r. Then any eigenvalue e λ∈σ(e Q) has modulus smaller than or equal to r (see [25,§8.3]). Now, if λis an eigenvalue of Q, we have that λ+r∈σ(e Q). Therefore, (Re(λ) + r)2+ Im(λ)2=|λ+r|2≤r2and we obtain (2) |Im(λ)| ≤ pr2−(Re(λ) + r)2=p2 Re(λ) tr(Q)−Re(λ)2. The second inequality in (1) follows by using 0 ≥Re(λ)≥tr(Q)/2 in (2). We prove now that (3) |Im(λ)| ≤ − Re(λ) tan(π/n)≤ − tr(Q) 2 tan(π/n) for any non-real eigenvalue λof Q. If n < 3, then Qhas no complex eigenvalue, because 0 is an eigenvalue of any rate matrix and complex eigenvalues of real matrices appear in conjugate pairs. If n≥3, the first theorem in [28] claims that the principal argument of any eigenvalue λ∈ σ(Q) is bounded as (4) 1 2+1 nπ≤ |Arg(λ)|. Then the first inequality in (3) is obtained by using that Im(λ) = tan(Arg(λ)) Re(λ), Re(λ)≤0, and that |tan|restricted to (−π, −π/2− π/n]∪[π/2 + π/n, π] attains its maximum at (5) tan −π 2−π n=tan π 2+π n=1 tan(π/n)>0. The second inequality follows by using Re(λ)≥tr(Q)/2. From the first inequality in both (1) and (3), we have |Im(λ)| ≤ bn(λ). On the other hand, the inequality bn(λ)≤Bnfollows from the definition of bn(λ) and the second inequalities in (1) and (3). This concludes the proof of (ii). Next, we show that the bound on |Im(λ)|given by bn(λ) is tight for n≥3. As shown in [28, Theorem on p. 537], for each n≥3, there is an n×nrate matrix Qwith at least one eigenvalue satisfying (4) with equality. Such a matrix is given by qij =     −αif i=j, αif i≡j−1 mod n, 0 otherwise, where αis an arbitrary positive number. It can be seen that this matrix Q has at least a non-real eigenvalue λsatisfying |Im(λ)|=Re(λ) tanπ 2+ π n. Using that Re(λ)<0 together with (5), we get −Re(λ) tan(π/n)= The Embedding Problem for Markov Matrices 419 |Im(λ)| ≤ bn(λ). The definition of bn(λ) implies that |Im(λ)|=bn(λ), so the inequality is tight. Remark 3.2.Note that for n≥2 we have tan(π/n)>tan(π/(n+ 1)). As for n= 6 tan(π/n) is 1/√3, we obtain that Bn=       −tr(Q) 2 tan(π/n)if n= 3,4,5,6, −√3 2tr(Q) if n≥6. Although for n > 6 the value in the minimum defining bn(λ) depends on λ, for n≤6 we have bn(λ) = −Re(λ) tan(π/n). Indeed, if n∈ {3,4,5,6}, then −Re(λ) tan(π/n)≤ −Re(λ)√3 =p4 Re(λ)2−Re(λ)2≤p2 tr(Q) Re(λ)−(Re(λ))2. Figure 1 illustrates both the remark above and Lemma 3.1. X X X y y Bn Bn bn(λ) λ tr(Q) 2 tr(Q) bn(λ)=p2 tr(Q)Re(λ)−(Re(λ))2 bn(λ0) = −Re(µ) tan(π/n) λ0 λ tr(Q) 2 tr(Q) x x y=x tan(π/n)y=x tan(π/n) y=−x tan(π/n)y=−x tan(π/n) n≤6n≥7 Figure 1. The shaded area is the complex region containing the eigenvalues of n×nrate matrices (Lemma 3.1) according to the two cases described in Remark 3.2. For n≤6, we have that Bn=−tr(Q) 2 tan(π/n)and bn(λ) = −Re(λ) tan(π/n), while for n≥7, Bn= −√3 2tr(Q) and the expression for bn(λ) depends on the value of λ as illustrated by the eigenvalues λand λ0in the figure. All these bounds are represented in black in the figure. 426 M. Casanellas, J. Fern´ andez-S´ anchez, J. Roca-Lacostena generality. Under this assumption, let Qbe a Markov generator for M. By Remark 2.4(i), the eigenvalues of Qare logk1(1), logk2(1), logk3(λ2), logk4(λ3) for some ki∈Z. Since the sum of the rows of Qvanish, 0 is an eigenvalue of Qand therefore either k1= 0 or k2= 0. Using that Qis real we deduce that both of them are 0 because non-real eigenvalues of Q must appear in conjugate pairs. Again, since Qis real, the eigenvalues of Qcorresponding to the non-repeated real eigenvalues of Mare their respective principal logarithms, so that k3=k4= 0. As Log(M) is the only logarithm whose eigenvalues are the principal logarithms of the eigenvalues of Mwe get Q= Log(M). Case II. Markov matrices Min Case II have non-real eigenvalues and an eigendecomposition as (6) M=Pdiag(1, λ, µ, µ)P−1with λ∈(0,1], µ∈C\R,and P∈GL4(C). Without loss of generality, we assume Im(µ)>0 in order to simplify the notation used in this section. If λ6= 1, Proposition 4.3 claims that the Markov generators of these matrices are of the form Logk(M) = Pdiag(0,log(λ),logk(µ),logk(µ))P−1 =Pdiag(0,log(λ),log(µ)+2πk i, log(µ)−2πk i)P−1. The next result shows that the Markov generators are of this form even if λ= 1. Proposition 5.3. Let Mbe a Markov matrix with an eigendecomposition Pdiag(1,1, µ, ¯µ)P−1with µ, ¯µ∈Csuch that µ6= 0 and Im(µ)>0. Then, (i) If e Pdiag(1,1, µ, ¯µ)e P−1is another eigendecomposition of M, Pdiag(0,0,logk(µ),logk(µ))P−1=e Pdiag(0,0,logk(µ),logk(µ)) e P−1. (ii) A matrix Qis a real logarithm of Mwith rows summing to 0if and only if Qhas the form Logk(M) = Pdiag(0,0,logk(µ),logk(µ))P−1. Proof: (i) If e Pdiag(1,1, µ, ¯µ)e P−1is another eigendecomposition of M, then e P=PA for some matrix A∈Comm∗(diag(1,1, µ, ¯µ)). As Comm∗(diag(1,1, µ, ¯µ)) = Comm∗(diag(0,0,logk(µ),logk(µ))), we obtain the desired result. (ii) By (i), the definition of Logk(M) does not depend on Pand it is a logarithm of M(see Theorem 2.3). Note that (1,1,1,1)tis an eigenvector The Embedding Problem for Markov Matrices 427 of Mwith eigenvalue 1 because Mis a Markov matrix. Hence we can assume that the first column vector of Pis (1,1,1,1)tand the rows of Logk(M) sum to 0. Conversely, we prove now that any real logarithm Qof Mwith rows summing to 0 is of the form Logk(M). From Theorem 2.3 we have that Q=P A diag(logk1(1),logk2(1),logk3(µ),logk4(¯µ))A−1P−1 for some k1, k2, k3, k4∈Zand some A∈Comm∗(diag(1,1, µ, ¯µ)). Since the rows of Qsum to 0 we get k1=k2= 0 as in the proof of Lemma 5.2. As Qis real, we get that logk3(µ) and logk4(¯µ) must be conjugate pairs: logk4(¯µ) = logk3(µ) = log−k3(¯µ) and hence, k4=−k3. Since the matrix Acommutes with (0,0,logk3(µ),logk3(µ)) (see Remark 2.2), Qis equal to Logk(M) (taking k=k3). Now that we know that all logarithms in Case II are of type Logk(M), in order to proceed with the study of embeddability we decompose Logk(M) as (7) Logk(M) = Log(M)+k·V, where V=Pdiag(0,0,2πi, −2πi)P−1. Next we show that the values of kfor which Logk(M) is a Markov generator form a sequence of consecutive numbers. Lemma 5.4. Let Mbe a Markov matrix as in (6). If Logk1(M)and Logk2(M)are rate matrices with k1< k2, then Logk(M)is a rate matrix for all k∈[k1, k2]. Proof: The proof is immediate because the entries of Logk(M)=Log(M)+ k·Vdepend linearly on k. Note that we could use Lemma 3.1 to bound the values of kfor which Logk(M) might be a Markov generator, as we did in Section 4. However, Lemma 5.4 allows a precise description of those logarithms of Mthat are Markov generators (not only giving a necessary condition). Theorem 5.5. Let M,P, and Vbe as above. Define L:= max (i,j):i6=j, Vi,j >0−Log(M)i,j Vi,j ,U:= min (i,j):i6=j, Vi,j <0−Log(M)i,j Vi,j  and set N:= {(i, j) : i6=j, Vi,j = 0,and Log(M)i,j <0}. Then, Logk(M)is a rate matrix if and only if N=∅and L ≤ k≤ U. Proof: By (7) we have that Logk(M) = Log(M) + k·V. Now, assume we choose k∈Zsuch that Logk(M) is a rate matrix. In this case, Log(M)i,j +kVi,j ≥0 for all i6=j. Hence, for i6=jwe have: 428 M. Casanellas, J. Fern´ andez-S´ anchez, J. Roca-Lacostena •0≤Log(M)i,j for all i,jsuch that Vi,j = 0. In particular, N=∅. • −Log(M)i,j Vi,j ≤kfor all i,jsuch that Vi,j >0. In particular, L ≤ k. • −Log(M)i,j Vi,j ≥kfor all i,jsuch that Vi,j <0. In particular, U ≥ k. Conversely, let us assume that N=∅and that there is k∈Zsuch that L ≤ k≤ U. We want to check that Logk(M) is a rate matrix. Indeed, take (i, j) with i6=j, then: •If Vi,j = 0, we have Logk(M)i,j = Log(M)i,j. Since N=∅it follows that Log(M)i,j ≥0, thus Logk(M)i,j ≥0. •If Vi,j >0, then Logk(M)i,j ≥Log(M)i,j +L·Vi,j ≥Log(M)i,j + −Log(M)i,j Vi,j Vi,j = 0. •If Vi,j <0, then −Logk(M)i,j ≤−Log(M)i,j−U·Vi,j ≤−Log(M)i,j− −Log(M)i,j Vi,j Vi,j = 0. Moreover, the rows of Logk(M) sum to 0, as proved in Propositions 4.3 and 5.3. The theorem above lists all Markov generators of M. As an immediate consequence, we get the following characterization of 4 ×4 embeddable matrices with a conjugate pair of (non-real) eigenvalues. Corollary 5.6. Let M=Pdiag(1, λ, µ, ¯µ)P−1for some λ∈(0,1] and µ, ¯µ∈C\R. Let L,U, and Nbe as in Theorem 5.5. Then, Mis embeddable if and only if N=∅and L≤U. Now we can prove Theorem 1.1 in the introduction using Lemma 5.2 and Corollary 5.6: Proof of Theorem 1.1: Assume that M=Pdiag(1, λ1, λ2, λ3)P−1is a 4×4 Markov matrix with λ1∈R>0,λ2∈C,λ3∈Cpairwise distinct. We know that |λi| ≤ 1 and, if Mis embeddable, λi/∈R≤0for any i= 1,2,3. Therefore, Mlies in Case I if all its eigenvalues are real and in Case II otherwise. If Mlies in Case I, then Mis embeddable if and only if Log(M) is a rate matrix (Lemma 5.2). As the rows of the principal logarithm of a Markov matrix sum to 0, by setting V= 0 we have that Log(M) is a rate matrix if and only if N=∅. Moreover, in this case Log(M) is the only Markov generator (Lemma 5.2). If Mlies in Case II, then the statement is precisely Corollary 5.6. In addition, from Theorem 5.5 we obtain that the Markov generators in this case are Logk(M) for k∈[L,U], which coincide with Log(M) + 2πkV as defined in the statement of Theorem 1.1. Next, we present an algorithm that solves both the embedding problem and the rate identifiability problem for 4 ×4 Markov matrices in Cases I and II. The Embedding Problem for Markov Matrices 429 Remark 5.7.We already know that the embeddability of a Markov matrix is not always determined by the principal logarithm [5]. In the 4×4 case, we can prove that the set of embeddable Markov matrices whose principal logarithm is not a Markov generator is not a subset of zero measure; on the contrary, it is a set of full dimension. Moreover, for any k∈Zthere is a non-empty Euclidean open set of embeddable Markov matrices, all of them in Case II, whose unique Markov generator is Logk(M). See [6] for details. Algorithm 5.8. input : M, a 4×4Markov matrix with distinct eigenvalues as in Theorem 1.1. output: All its Markov generators if Mis embeddable, an empty list otherwise. generators=[ ] compute eigenvalues of M if Mhas no negative or zero eigenvalue, then set Principal = Log(M) if all the eigenvalues are real, then add Principal to generators if it is a rate matrix else compute Pand Vas in Theorem 1.1 compute L,U, and N if N=∅,then for k∈Zsuch that L ≤ k≤ U do compute Logk(M) = Principal +k V add Logk(M)to generators if it is a rate matrix if generators = [ ], then return “Mnot embeddable” else return generators Case III. Let Mbe a Markov matrix as in Case III with an eigendecomposition as (8) M=Pdiag(1, λ, µ, µ)P−1with λ∈(0,1], µ ∈[−1,1), µ 6=λ, 0, and P∈GL4(R). Note that the matrix Pcan be assumed to be real since all the eigenvalues of Mare real. Note also that this case can be seen as a limit case of 430 M. Casanellas, J. Fern´ andez-S´ anchez, J. Roca-Lacostena Markov matrices with a conjugate pair of complex eigenvalues (Case II) and, analogously to that case, Mhas infinitely many real logarithms with rows summing to 0. However, in the present case one has to be careful when using Theorem 2.3 in order to take into account the commutant of the diagonal form of M. We introduce the following matrices. Definition 5.9. Let M,P,λ, and µbe as in (8) above. For any k∈Z and x, y, z ∈R, we define the matrix Qk(x, y, z) = L+ (2πk + Arg(µ))V(x, y, z), where L=Pdiag(0,log(λ),log |µ|,log |µ|)P−1and V(x, y, z) := Pdiag 0,0,−y x −z yP−1. Remark 5.10.If µ > 0, we have Q0(x, y, z) = Log(M) for all (x, y, z)∈ R3. For later use, note that V(ax, ay, az) = a V (x, y, z) for all a∈R, and hence Qk(x, y, z) = (Q−k(−x, −y, −z) if µ > 0, Q−k−1(−x, −y, −z) if µ < 0. As in the previous case, we start by enumerating all the real logarithms of Mwith rows summing to 0. To this end, we define V ⊂ R3as the algebraic variety V={(x, y, z)∈R3|xz −y2= 1}. The next theorem shows that those logarithms with real entries and rows summing to 0 are of the form Qk(x, y, z) with (x, y, z)∈ V. Furthermore, Vis a 2-sheet hyperboloid with one of its sheets V−in the orthant x, z < 0 and the other sheet V+in the orthant x, z > 0. The restriction of (x, y, z) to either of these components gives a bijection between the set of matrices Qk(x, y, z) and the real logarithms of Qwith rows summing to 0 (other than Log(M)). Theorem 5.11. Let Mbe a Markov matrix as in (8). Then, the following are equivalent: (i) Qis a real logarithm of Mwith rows summing to 0, (ii) Q=Qk(x, y, z)for some (x, y, z)∈ V,k∈Z. Moreover, if Q6=Log(M), there is a unique k∈Zand a unique (x, y, z)∈ V+such that Q=Qk(x, y, z). The Embedding Problem for Markov Matrices 431 Proof: (i) ⇒(ii) We know by Theorem 2.3 that any logarithm Qof M is of type Q=P A diag(logk1(1),logk2(λ),logk3(µ),logk4(µ))A−1P−1 for some k1, k2, k3, k4∈Zand some A∈Comm∗(diag(1, λ, µ, µ)). Since the rows of Qsum to 0, (1,1,1,1)tis an eigenvector of Mwith eigenvalue 0. Since non-real eigenvalues of Qmust appear in conjugate pairs it follows that k1=k2= 0 (even if λ= 1). Moreover, we also deduce that logk3(µ) and logk4(µ) are a conjugate pair. This implies that k4=−k3if µ > 0 and k4=−k3−1 if µ < 0. Therefore, if we take k=k3, we have Q=P A diag(log(1),log(λ),logk(µ),logk(µ))A−1P−1 =P A diag(0,log(λ),log |µ|+ (2πk + Arg(µ))i, log |µ| −(2πk + Arg(µ))i)A−1P−1. (9) If all the eigenvalues of Qare real, we deduce that Arg(µ) = 0 and k= 0. In this case, the eigenvalues of Qare given by the principal logarithm of the respective eigenvalues of Mand hence Q= Log(M). Now assume that Qhas a conjugate pair of complex eigenvalues log |µ| ± (2πk + Arg(µ))i. Hence, the third and fourth column vectors of P A must be a conjugate pair (up to scalar). Furthermore, we have that Pis a real matrix and hence it is the third and fourth column vectors of Athat are a conjugate pair. This fact together with the fact that Acommutes with diag(1, λ, µ, µ) leads to: A=    z10 0 0 0z20 0 0 0 a+bi z(a−bi) 0 0 c+di z(c−di)     with z, z1, z2∈C\{0}and a, b, c, d ∈Rsatisfying ad −bc 6= 0 because Ais a non-singular matrix. We can decompose Aas A=A1A2, where: (10) A1=    1 0 0 0 0 1 0 0 0 0 a b 0 0 c d    , A2=    z10 0 0 0z20 0 0 0 1 z 0 0 i−zi    . 432 M. Casanellas, J. Fern´ andez-S´ anchez, J. Roca-Lacostena Let us define J:= A2diag(0,log(λ),log |µ|+ (2πk + Arg(µ))i, log |µ| −(2πk + Arg(µ))i)A−1 2 (11) =    0 0 0 0 0 log(λ) 0 0 0 0 log |µ|2πk + Arg(µ) 0 0 −(2πk + Arg(µ)) log |µ|    .(12) Using this notation, the matrix Qin (9) can be written as Q= PA1JA−1 1P−1. Note that A1commutes with diag(0,log(λ),log |µ|,log |µ|) and hence Q=Pdiag(0,log(λ),log |µ|,log |µ|)P−1 + (2πk + Arg(µ))P A1diag 0,0,0 1 −1 0A−1 1P−1. A final computation shows that A1diag0,0,0 1 −1 0 A−1 1equals V(x, y, z) with x=a2+b2 ad −bc, y =ac +bd ad −bc, z =c2+d2 ad −bc. It is immediate to show that xz −y2= 1, thus (x, y, z)∈ V. This proves that (i) implies (ii). (ii) ⇒(i) We know that Qk(x, y, z) is real by Definition 5.9: it is straightforward to check that (1,1,1,1)tis an eigenvector with eigenvalue 0 of both Land V, and so it is also an eigenvector of Qk(x, y, z) with eigenvalue 0. Hence it is enough to check that if (x, y, z)∈ V, then Qk(x, y, z) is a logarithm of M. To this end, consider the matrix Jintroduced in (12) and the matrix B:=     1 0 0 0 0 1 0 0 0 0 1 0 0 0 y x 1 x    . The Embedding Problem for Markov Matrices 433 If (x, y, z)∈ V, then we have z=1+y2 x. A straightforward computation shows that P−1Qkx, y, 1+y2 xP−BJB−1= 0. Hence, it follows from (11) that Qkx, y, 1 + y2 x=P A diag(0,log(λ),log |µ|+ (2πk + Arg(µ))i, log |µ| −(2πk + Arg(µ))i)A−1P−1 with A=BA2(A2is defined in (10)). Since both Band A2commute with diag(1, λ, µ, µ) it follows from Theorem 2.3 that Qkx, y, 1+y2 xis a logarithm of M, which concludes the first part of the proof. In the first part of the proof, we already proved that there exists k∈Z and (x, y, z)∈ V such that Q=Qk(x, y, z). By Remark 5.10, we can take (x, y, z)∈ V+without loss of generality. To prove that kand (x, y, z) are unique we assume that Qk(x, y, z) = Qe k(ex, ey, ez) for some e k∈Zand (ex, ey, ez)∈ V+. In this case, we have (2πk + Arg(µ))V(x, y, z) = (2πe k+ Arg(µ))V(ex, ey, ez). Since Q6= Log(M) then (2πk + Arg(µ)) 6= 0 and hence: x=2πe k+ Arg(µ) 2πk + Arg(µ)ex, y =2πe k+ Arg(µ) 2πk + Arg(µ)ey, z =2πe k+ Arg(µ) 2πk + Arg(µ)ez. Now, using that (x, y, z),(ex, ey, ez)∈ V we get xz−y2=2πe k+Arg(µ) 2πk+Arg(µ)2(exez− ey2) = 1. Moreover, since x, z, ex, ez > 0, we deduce that 2πe k+Arg(µ) 2πk+Arg(µ)= 1, so e k=kand (ex, ey, ez)=(x, y, z). Remark 5.12.Because of Remark 5.10, every real logarithm of Mwith rows summing to 0 can also be realized as some Qk(x, y, z) for a unique k∈Zand a unique (x, y, z)∈ V−. In order to characterize those logarithms that are rate matrices, for any k∈Zwe define the set Pk={(x, y, z)∈R3:Qk(x, y, z) is a rate matrix}. Note that the entries of Qk(x, y, z) depend linearly on x,y,z, and hence Pkis the space of solutions to a system of linear inequalities (i.e. a convex polyhedron). From Theorem 5.11 we obtain that the set of Markov generators for a Markov matrix in Case III is SkPk∩V+. The following corollary is an immediate consequence of Lemma 3.1 and Theorem 5.11 and shows that there is a finite set of integers ksuch that Pk∩V+6=∅. 434 M. Casanellas, J. Fern´ andez-S´ anchez, J. Roca-Lacostena In Appendix A we show a procedure to check whether the intersection Pk∩V+is not empty and get a point in it. Using the notation introduced in Section 4, if Qis a Markov generator of a Markov matrix Mwith eigenvalues 1, λ, and µas in (8), then it has at most one conjugate pair of non-real eigenvalues, logk(µ) and logk(µ). It follows from Lemma 3.1 that their imaginary part is bounded by β4(µ) = −log |µ|and as a consequence, we obtain the next result. Corollary 5.13. Let Mbe a Markov matrix as in (8). If Qis a Markov generator of M, then Q=Qk(x, y, z)for some (x, y, z)∈ V+and some k∈Zsatisfying −Arg(µ) + log |µ| 2π≤k≤−Arg(µ)−log |µ| 2π. As a byproduct, we give an embeddability criterion for 4 ×4 Markov matrices with two repeated eigenvalues. Corollary 5.14. Let Mbe a Markov matrix as in (8). (i) If µ > 0,Mis embeddable if and only if Pk∩V+6=∅for some k with log |µ| 2π≤k≤−log |µ| 2π. (ii) If µ < 0,Mis embeddable if and only if Pk∩V+6=∅for some k satisfying −1 2+log |µ| 2π≤k≤−1 2−log |µ| 2π. In particular, if µ < −e−π, then Mis not embeddable. Proof: Since k∈Z, the bounds on kare a straightforward consequence of Corollary 5.13. Indeed, it is enough to take Arg(µ) = 0 for µ > 0 and Arg(µ) = πfor µ < 0. In the case of µ < 0, it is immediate to check that −1 2+log |µ| 2π≤−1 2−log |µ| 2πif and only if log |µ|<−π. Hence, if µ < −e−π, there is no ksatisfying the embeddability conditions in the statement. Remark 5.15.Example 4.3 in [5] shows an embeddable Markov matrix as in (8) with µ=−e−π. Thus, the bound on Corollary 5.14 is sharp. From Corollary 5.14 we derive an algorithm that tests the embeddability of Markov matrices lying in Case III. The Embedding Problem for Markov Matrices 435 Algorithm 5.16 (Markov generators of 4×4 matrices with two repeated eigenvalues). input : M(Markov matrix) and Pas in (8). output: One of its Markov generators Qk(x, y, z)for each k∈Z (if they exist). generators = [ ] compute the eigenvalues of M:1,λ,µ,µ if det(M)>0and µ≥ −e−π,then Compute L=Pdiag(0,log(λ),log |µ|,log |µ|)P−1 set L=−Arg(µ)+log |µ| 2πand U=−Arg(µ)−|log(µ)| 2π for L ≤ k≤ U (k∈Z):do if Pk∩V 6=∅(see Appendix A), then choose (x, y, z)∈ Pk∩V+(see Appendix A) add Qk(x, y, z) = L+k V (x, y, z)to generators if generators = [ ], then return “Mnot embeddable” else return generators Remark 5.17.If Qk(x, y, z)6= Log(M), then each choice of (x, y, z)∈ Pk∩V+in the algorithm above would give a different Markov generator for M(5.11). Thus, the set of all Markov generators of Mis obtained by considering, for each possible k, all (x, y, z)∈ Pk∩V+(this can produce infinitely many Markov generators). In Appendix A we show how to compute #Pk∩V+for a fixed k. Case IV. Here, we deal with 4 ×4 Markov matrices with an eigenvalue of multiplicity 3 or 4. This case corresponds to the equal-input matrices used in phylogenetics. The reader is referred to [1] and [2] for a recent and parallel study on this class of matrices with special emphasis on embeddability. Proposition 5.18. Let Mbe a diagonalizable 4×4Markov matrix with eigenvalues 1,λ,λ,λ. Then the following are equivalent: (i) Mis embeddable. (ii) det(M)>0. (iii) Log(M)is a rate matrix. Proof: If M= Id, that is, λ= 1, then it follows from Theorem 2.3 that Log(M) is the zero matrix and hence it is a Markov generator for M. Moreover, it follows from Corollary 3.3 that the zero matrix is the only Markov generator of the identity matrix. 442 M. Casanellas, J. Fern´ andez-S´ anchez, J. Roca-Lacostena •If there is not such a pair of vertices but there is some vertex v satisfying f(v) = 0, then we take P=v. •If the evaluation of fat all the vertices of Pkhas the same sign (and none is equal to 0), then we proceed to Step 2. Step 2. Find the vanishing points of f(x, y, z) on the edges of Pk. To do so, we restrict fto the lines containing these edges and look for solutions P= (x, y, z) of f= 0 lying on the corresponding edge. •If we find two solutions in such a line, V+cuts the interior of Pk and hence there are infinitely many generators. •If the edges of Pkdo not intersect V+, then we proceed to Step 3. Step 3. We assume that Vdoes not intersect any edge of Pk. For i6= jconsider the intersection Hi,j ∩ V+, where Hi,j is the plane defined by (A.1). If this intersection is not empty, choose a point in it (see next paragraph) and check whether it belongs to Pkor not. This intersection lies either completely in the corresponding face of the polyhedron or completely outside the polyhedron. •If we find a point P= (x, y, z) which belongs to the polyhedron in this way, then Mhas infinitely many generators and Qk(x, y, z) is one of them. •If we fail to find a point in any of the faces, then Mhas no generator with the current value of k. To conclude, we give some insight on how to find P∈Hi,j ∩V+(when this intersection is not empty). For ease of reading we write Ax+By+Cz =D for the equation of Hi,j (see (A.1) for the precise coefficients). Given (x, y, z)∈ V, we can write z=1+y2 xbecause x6= 0. Therefore, by multiplying the equation Ax +By +Cz =Dby xand rearranging the terms in the equality, we conclude that Cy2+(Bx)y+(Ax2−Dx+C)=0 if and only if x, y, 1 + y2 x∈V∩Hi,j. Hence, V+∩Hi,j is not empty if there exists x > 0 for which the discriminant ∆(x) := (B2−4AC)x2+ (4CD)x−4C2 is non-negative. We study below whether this is possible depending on the coefficients of ∆(x): The Embedding Problem for Markov Matrices 443 (i) If B2−4AC < 0, compute the roots of ∆(x) = 0. If they are non-real or negative, then V+∩Hi,j =∅. If both roots are real and positive, then all values between them satisfy ∆(x)≥0. Note that in this case both roots have necessarily the same sign (because V ∩{x= 0}=∅). (ii) If B2−4AC > 0, then ∆(x)>0 when x0. (iii) If B2−4AC = 0 and CD > 0, then ∆(x)>0 when x0. (iv) If B2−4AC = 0, CD ≤0, and C6= 0, then ∆(x)<0 for all x≥0. In this case, we have V+∩Hi,j =∅. (v) If ∆(x) is identically 0, then Hi,j ∩V+is unbounded with respect to x, that is, for any x0>0, there are points P= (x0, y, z)∈ Hi,j ∩V+. Note that in cases (ii), (iii), and (v) we have that ∆(x)≥0 when x0 and hence the set Hi,j ∩ V+is unbounded with respect to x. Therefore, if we know that the polyhedron Pkis bounded, then the intersection of V+with the face (i, j) is necessarily empty in any of these cases. Acknowledgements All authors are partially funded by AGAUR Project 2017 SGR-932 and MINECO/FEDER Projects MTM2015-69135, PID2019-103849GB- I00, and MDM-2014-0445. J. Roca-Lacostena has also received funding from the Secretaria d’Universitats i Recerca de la Generalitat de Catalunya (AGAUR 2018FI B 00947) and European Social Funds. M. Casanellas and J. Fern´andez-S´anchez were also partially funded by project CEX2020-001084-M from the Spanish Government. References [1] M. Baake and J. Sumner, Notes on Markov embedding, Linear Algebra Appl. 594 (2020), 262–299. DOI: 10.1016/j.laa.2020.02.016. [2] M. Baake and J. Sumner, On equal-input and monotone Markov matrices, Adv. in Appl. Probab. 54(2) (2022), 460–492. DOI: 10.1017/apr.2021.39. [3] D. Barry and J. A. Hartigan, Asynchronous distance between homologous DNA sequences, Biometrics 43(2) (1987), 261–276. DOI: 10.2307/2531811. [4] P. Carette, Characterizations of embeddable 3 ×3 stochastic matrices with a negative eigenvalue, New York J. Math. 1(1995), 120–129, electronic. [5] M. Casanellas, J. Fern´ andez-S´ anchez, and J. Roca-Lacostena, Embeddability and rate identifiability of Kimura 2-parameter matrices, J. Math. Biol. 80(4) (2020), 995–1019. DOI: 10.1007/s00285-019-01446-0. [6] M. Casanellas, J. Fern´ andez-S´ anchez, and J. Roca-Lacostena, An open set of 4 ×4 embeddable matrices whose principal logarithm is not a Markov 444 M. Casanellas, J. Fern´ andez-S´ anchez, J. Roca-Lacostena generator, Linear and Multilinear Algebra (2020), 1–12. DOI: 10.1080/03081087. 2020.1854165. [7] J. T. Chang, Full reconstruction of Markov models on evolutionary trees: Identifiability and consistency, Math. Biosci. 137(1) (1996), 51–73. DOI: 10.1016/ S0025-5564(96)00075-2. [8] W. J. Culver, On the existence and uniqueness of the real logarithm of a matrix, Proc. Amer. Math. Soc. 17 (1966), 1146–1151. DOI: 10.2307/2036109. [9] J. R. Cuthbert, On uniqueness of the logarithm for Markov semi-groups, J. London Math. Soc. (2) 4(1972), 623–630. DOI: 10.1112/jlms/s2-4.4.623. [10] J. R. Cuthbert, The logarithm function of finite-state Markov semi-groups, J. London Math. Soc. (2) 6(1973), 524–532. DOI: 10.1112/jlms/s2-6.3.524. [11] G. Elfving, Zur Theorie der Markoffschen Ketten, Acta Soc. Sci. Fennicae. N. Ser. A 2 8(1937), 1–17. [12] J. Felsenstein, Evolutionary trees from DNA sequences: A maximum likelihood approach, J. Mol. Evol. 17(6) (1981), 368–376. DOI: 10.1007/BF01734359. [13] B. Fuglede, On the imbedding problem for stochastic and doubly stochastic matrices, Probab. Theory Related Fields 80(2) (1988), 241–260. DOI: 10.1007/ BF00356104. [14] F. R. Gantmacher,“The Theory of Matrices”, Vol. 1, Translated by K. A. Hirsch Chelsea Publishing Co., New York, 1959. [15] J. Geweke, R. C. Marshall, and G. A. Zarkin, Mobility indices in continuous time Markov chains, Econometrica 54(6) (1986), 1407–1423. DOI: 10.2307/ 1914306. [16] G. S. Goodman, An intrinsic time for non-stationary finite Markov chains, Z. Wahrscheinlichkeitstheorie und Verw. Gebiete 16 (1970), 165–180. DOI: 10. 1007/BF00534594. [17] M.-A. Guerry, On the embedding problem for discrete-time Markov chains, J. Appl. Probab. 50(4) (2013), 918–930. DOI: 10.1239/jap/1389370090. [18] M.-A. Guerry, Sufficient embedding conditions for three-state discrete-time Markov chains with real eigenvalues, Linear Multilinear Algebra 67(1) (2019), 106–120. DOI: 10.1080/03081087.2017.1411462. [19] N. J. Higham,“Functions of Matrices. Theory and Computation”, Society for Industrial and Applied Mathematics (SIAM), Philadelphia, PA, 2008. DOI: 10. 1137/1.9780898717778. [20] R. B. Israel, J. S. Rosenthal, and J. Z. Wei, Finding generators for Markov chains via empirical transition matrices, with applications to credit ratings, Math. Finance 11(2) (2001), 245–265. DOI: 10.1111/1467-9965.00114. [21] C. Jia, A solution to the reversible embedding problem for finite Markov chains, Statist. Probab. Lett. 116 (2016), 122–130. DOI: 10.1016/j.spl.2016.04.020. [22] S. Johansen, Some results on the imbedding problem for finite Markov chains, J. London Math. Soc. (2) 8(2) (1974), 345–351. DOI: 10.1112/jlms/s2-8.2.345. [23] T. H. Jukes and C. R. Cantor, Evolution of protein molecules, in: “Mammalian Protein Metabolism”, Vol. III, Academic. Press, 1969, pp. 21–132. DOI: 10.1016/b978-1-4832-3211-9.50009-7. [24] J. F. C. Kingman, The imbedding problem for finite Markov chains, Z. Wahrscheinlichkeitstheorie und Verw. Gebiete 1(1962), 14–24. DOI: 10.1007/ BF00531768. The Embedding Problem for Markov Matrices 445 [25] C. Meyer,“Matrix Analysis and Applied Linear Algebra”, With 1 CD-ROM (Windows, Macintosh and UNIX) and a solutions manual, Society for Industrial and Applied Mathematics (SIAM), Philadelphia, PA, 2000. [26] J. Roca-Lacostena, Generating embeddable matrices whose principal logarithm is not a Markov generator, in: “Extended abstracts GEOMVAP 2019— Geometry, Topology, Algebra, and Applications; Women in Geometry and Topology”, Trends Math. Res. Perspect. CRM Barc. 15, Birkh¨auser/Springer, Cham, 2021, pp. 29–33. DOI: 10.1007/978-3-030-84800-2_5. [27] J. Roca-Lacostena and J. Fern´ andez-S´ anchez, Embeddability of Kimura 3ST Markov matrices, J. Theoret. Biol. 445 (2018), 128–135. DOI: 10.1016/j. jtbi.2018.02.005. [28] J. Th. Runnenberg, On Elfving’s problem of imbedding a time-discrete Markov chain in a time-continuous one for finitely many states. I, Nederl. Akad. Wetensch. Proc. Ser. A 65 = Indag. Math. 24 (1962), 536–541. DOI: 10.1016/ S1385-7258(62)50052-8. [29] B. Singer and S. Spilerman, The representation of social processes by Markov models, American Journal of Sociology 82(1) (1976), 1–54. DOI: 10.1086/ 226269. [30] J. M. O. Speakman, Two Markov chains with a common skeleton, Z. Wahrscheinlichkeitstheorie und Verw. Gebiete 7(1967), 224. DOI: 10.1007/BF00 532638. [31] M. Steel,“Phylogeny—Discrete and Random Processes in Evolution”, CBMSNSF Regional Conference Series in Applied Mathematics 89, Society for Industrial and Applied Mathematics (SIAM), Philadelphia, PA, 2016. DOI: 10.1137/ 1.9781611974485. [32] K. L. Verbyla, V. B. Yap, A. Pahwa, Y. Shao, and G. A. Huttley, The embedding problem for Markov models of nucleotide substitution, PLoS ONE 8(7) (2013), e69187. DOI: 10.1371/journal.pone.0069187. Marta Casanellas and Jes´us Fern´andez-S´anchez Departament de Matem`atiques i IMTech, Universitat Polit`ecnica de Catalunya, Barcelona, Spain Centre de Recerca Matem`atica, Bellaterra, Spain E-mail address:[email protected] E-mail address:[email protected] Jordi Roca-Lacostena Departament de Matem`atiques i IMTech, Universitat Polit`ecnica de Catalunya, Barcelona, Spain E-mail address:[email protected] Received on December 3, 2020. Accepted on September 3, 2021.