{'fraction_non_alphanumeric': 0.06341463414634146, 'fraction_numerical': 0.01609122584732341, 'mean_word_length': 3.6198419666374013, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 1, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 12, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
The generalized inverses of tensors via the C-Product

This paper studies the issues about the generalized inverses of tensors under the C-Product. The aim of this paper is threefold. Firstly, this paper present the definition of the Moore-Penrose inverse, Drazin inverse of tensors under the C-Product. Moreover, the inverse along a tensor is also introduced. Secondly, this paper gives some other expressions of the generalized inverses of tensors by using several decomposition forms of tensors. Finally, the algorithms for the Moore-Penrose inverse, Drazin inverse of tensors and the inverse along a tensor are established.


Introduction
In recent years, the studies of tensors or the multidimensional array have become more popular. A complex tensor can be regarded as a multidimensional array of data, which takes the form A = (a i1...im ) ∈ n1×n2×···×np . The order of a tensor is the number of dimensions which is also called ways or modes. Therefore, the well-known vectors and matrices are called first-order tensors and second-order tensors. This paper studies the third-order tensors.
Higher-order tensors have been used in various fields, such as psychometrics [1], chemometrics [2], face recognition [3] and image and signal processing [4,5,6,7,8,9], etc. Sun et al. [10] introduced the notion of the inverse of an even-order tensor under the Einstein product and called it as the Moore-Penrose inverse of tensors. Sun et al. [11] defined the {i}inverse and group inverse of tensors based on a general product of tensors, and investigated properties of the generalized inverses of tensors. Miao et al. [12] investigate the tensor similar relationship and propose the T-Jordan canonical form based on the tensor T-product. Meanwhile, the T-polar, T-LU, T-QR and T-Schur decompositions of tensors are obtained. Besides, the T-group inverse and T-Drazin inverse are studied. Jin et al. [13] established the generalized inverse of tensors by using tensor equations. Moreover, the authors investigated the least squares solutions of tensor equations. Behera et al. [14] had a further study on the generalized inverses of tensors. Several characterizations of generalized inverses of tensors are provided. Besides, a new method for computing the Moore-Penrose inverse of a tensor was obtained. Ji et al. [15] extended the notion of the Drazin inverse of a square matrix to an even-order square tensor. Also, the authors obtained the expression of the Drazin inverse by using the core-nilpotent decomposition. Behera et al. [16] further elaborated the theory of the Drazin inverse and W-weighted Drazin inverse of tensors. Moreover, different types of methods were built to compute the Drazin inverse of tensors. Benítez et al. [17] studied one-sided (b, c)-inverses of arbitrary matrices as well as one-sided inverses along a (not necessarily square) matrix. In addition, the (b, c)-inverse and the inverse along an element were also researched in the context of rectangular matrices. Kolda et al. [18] provided an overview of higher-order tensor decompositions and their applications. Two particular tensor decompositions: the CP decomposition and the Tucker decomposition were introduced.
Kernfeld et al. [19] defined a new tensor-tensor product-Cosine Transform Product, referred to as C-product for short. And it has been shown that the C-product can be implemented efficiently using DCTs. In addition, the authors indicate that one can use C-product to conveniently specify a discrete image blurring model and the image restoration model. Based on this background, we will study the theory of the generalized inverses of tensors via the C-product in this paper. This paper is organized as follows. In Section 2, we give the terms and symbols needed to be used in this paper. Then, we introduce the C-product of two tensors and some properties of it. In Section 3, we first define the Moore-Penrose inverse of tensors via the C-product. Then, we provide some decompositions of the tensor, including C-SVD, C-QR decomposition, C-Schur decomposition, C-full rank decomposition, C-QDR decomposition and C-HS decomposition. Furthermore, we use these decompositions to give the expressions for the Moore-Penrose inverse of tensors. In Section 4, we study the Drazin inverse of the tensor under the C-product. This part gives the definition and a few properties for the Drazin inverse of tensors, and provide several expressions for the Drazin inverse of tensors. In Section 5, we define the inverse along a tensor under the C-product. Some expressions of the class of the inverse are obtained. Moreover, an algorithm for computing the inverse along a tensor is built. In the last section, we establish an application on higher-order Markov Chains concerning the group inverse of the tensor.

Preliminaries
In this paper, we denote vectors, matrices, three or higher order tensors like a, A, A, respectively. Also, a i , A ij and A i1i2...ip are the elements of the vector a, matrix A and tensor A, respectively. The frontal slice of tensor A is A(:, :, i). We denote the frontal slice as A (i) for simplicity. When fixing two indices of the third order tensor, we can get the fiber. The mode-3 fiber is also called tube, denoted as A(i, j, :). We denote a the tube of the tensor A. We can vectorize a tube by a = vec(a).
Notice that an n 1 × n 2 × n 3 tensor can be seen as an n 1 × n 2 matrix whose (i, j)th element a ij = (A) ij are the tube fibers in 1×1×n3 .
Definition 2.7 [18] The mode-3 product of a tensor A ∈ n1×n2×n3 with a matrix U ∈ J×n3 is denoted by A × 3 U. More precise, we have Let the frontal slice of A ∈ n1×n2×n3 are Then, the mode-3 unfolding of A, denoted A (3) , is Notice that A × 3 U can be computed using the following matrix-matrix product. See [18] for details.
where C n3 is the n 3 × n 3 orthogonal DCT matrix.
The C-product of A ∈ n1×n2×n3 and B ∈ n2×l×n3 can be computed using the following Algorithm from [19].
then A is said to be invertible and B is the inverse of A, which is denoted by A −1 .
It is easy to see the inverse of a tensor, if exists, is unique. The conjugate transpose of tensors can be defined as follows.
Definition 2.10 [19] If A ∈ n1×n2×n3 , then the conjugate transpose of A, which is denoted by A H , is such that Lemma 2.5 [19] Let A ∈ n1×n2×n3 and B ∈ n2×l×n3 . It holds that Proof: We only prove the case of the F-upper tensor for the sake of the F-diagonal tensor is one special case of the F-upper tensor and the F-lower tensor can be proved similarly.
Let B = L(A). Then, by using (4)  , where M is defined in (2). Since B is an F-upper tensor, by (3), one has By using the matrices product, it is easy to see Then, we have all the frontal slices of A are upper triangular matrices, which means A is an F-upper tensor. Conversely, if A is an F-upper tensor, then A (3) has the above form. Also, we have by (4) and (5). Then, which implies L(A) is an F-upper tensor.

The Moore-Penrose inverse of tensors under the C-product
In this part, we will give some expressions of the Moore-Penrose inverse by using the C-SVD, C-QR decomposition, C-Schur decomposition, C-full rank decomposition, C-QDR decomposition and C-HS decomposition. Then, we establish an algorithm to compute the Moore-Penrose inverse based on the C-SVD of a tensor A.

The expressions of the Moore-Penrose inverse of tensors
then X is called the Moore-Penrose inverse of the tensor A and is denoted by A † .
where S is an n 1 × n 2 × n 3 F-diagonal tensor. We call this decomposition the C-SVD of A.
For each are singular values of L(A) (i) . We define the matrices R i , i = 1, ..., n 3 , as Thus, It is easy to check that X satisfies (7), which means the Moore-Penrose inverse of a tensor A exists.
On the other hand, suppose X 1 and X 2 both are the solutions of (7). Then, we have Therefore, the Moore-Penrose inverse of A is unique.
Proof: It is easy to check that V * c S † * c U H holds for the four equations of (7).
Then there exist a unitary tensor Q ∈ n1×n1×n3 and an F-upper tensor R ∈ n1×n2×n3 such that which is called the C-QR decomposition of A.
This implies Q * c Q H = I, that is Q is a unitary tensor. On the other hand, R i are upper triangular matrices and so are R (i) . This implies R is an F-upper tensor.
Theorem 3.5 Let A ∈ n1×n2×n3 and A = Q * c R be the C-QR decomposition of A. Then, Proof: It is easy to check that R † * c Q H holds for the four equations of (7).
Then there exist a unitary tensor Q ∈ n×n×n3 and an F-upper tensor T ∈ n×n×n3 such that which is called the C-Schur decomposition of A.
By the proof of Theorem 3.4, Q is a unitary tensor. On the other hand, T i are upper triangular matrices and so are T (i) . This implies T is an F-upper tensor.
Proof: Now, we will check that Q H * c T † * c Q holds for the four equations of (7).
In the following, we give the full rank decomposition of the tensor. Notice that not all the tensors have the full rank decomposition we defined.
and N = ten(IDCT( then we call this decomposition the C-full rank decomposition of A. r , i = 1, 2, ..., n 3 , are the full rank decomposition of A (i) . We deduce when rank( A (i) ) = r, i = 1, 2, ..., n 3 , one has the decomposition of the definition established.
D ∈ r×r×n3 is an invertible F-diagonal tensor and is an F-upper tensor, then we call this decomposition the C-QDR decomposition of A.

Note: Let
are the QDR decomposition of A (i) [20]. We deduce when rank( A (i) ) = r, i = 1, 2, ..., n 3 , one has the decomposition the definition established. Since D i are invertible diagonal matrices, we have D (i) also are invertible diagonal matrices. Meanwhile, R i are upper triangular matrices and so are R (i) . This implies D is an invertible F-diagonal tensor and R is an F-upper tensor.
Theorem 3.9 Let A ∈ n1×n2×n3 . Suppose A H has the C-QDR decomposition A H = Q * c D * c R. Then, Therefore, X = A † . For a tensor A ∈ n1×n2×n3 , which the block form is Suppose A ∈ n×n×n3 and A = U * c S * c V H is the C-SVD of A. When rank(S (1) ) = rank(S (2) ) = · · · = rank(S (n3) ) = r, the decomposition of A can be written as Thus, we have We call this decomposition the C-HS decomposition of A.
Theorem 3.10 Let A ∈ n×n×n3 . Suppose A has the C-HS decomposition. Then,

The algorithm for computing the Moore-Penrose inverse of a tensor
In the following, we have Algorithm 3.1 provided the procedure for the Moore-Penrose inverse operation.

The Drazin inverse of tensors under the C-product
In this section, we will give some expressions of the Drazin inverse of tensors. Then, an algorithm is established for the Drazin inverse of a tensor.

The expressions of the Drazin inverse of tensors
Recall that the index of a matrix A is defined as the smallest nonnegative integer k such that rank(A k ) = rank(A k+1 ), which is denoted by Ind(A). Now, let us define the index of a tensor A.   (2) . . .
Thus, (2) . . . (2) . . . Next, we will give the definition of the Drazin inverse of a tensor. Before that we note that A k = A * c · · · * c A k .

Definition 4.2 Let
A ∈ n1×n1×n3 and Ind(A) = k. Then, the tensor X ∈ n1×n1×n3 satisfying is called the Drazin inverse of the tensor A and is denoted by A D . Especially, when k=1, X is called the Group inverse of the tensor A and is denoted by A # .  (2) . . .
If Ind(A) = k, then the Drazin inverse of A exists and is unique.
In particular, Proof: By the definition of the Drazin inverse, one has
On the other hand, by [24], we conclude that full row rank and Q i D i are full column rank. Therefore,

By Theorem 4.1, we have
In the following, we will establish another expression of the Drazin inverse by using the core-nilpotent decomposition of the tensors.
Hence, we have Ind(N A ) = k. The N A we defined is call the nilpotent part of the tensor A.
is called the core-nilpotent decomposition of the tensor A.
Executing ten(IDCT)(·) on the tensors of the both sides of the equation, we have Again by using Theorem 4.3, we have    Executing ten(IDCT)(·) on the tensors of the both sides of the equation, we have When rank(C 1 ) = rank(C 2 ) = · · · = rank(C n3 ) = r, one has

Hence,
Since it is trivial to see Theorem 4.5 Let A ∈ n1×n2×n3 . Suppose A has the C-HS decomposition. Then,

The algorithm for computing the Drazin inverse of a tensor
In the following, we construct an algorithm to compute the Drazin inverse of a tensor based on Theorem 4.1.
Algorithm 4.1: Compute the Drazin inverse of a tensor A Input: n 1 × n 2 × n 3 tensor A Output: n 2 × n 1 × n 3 tensor X

The inverse along a tensor under the C-product
In this section, we firstly define the inverse along a tensor under the C-product and then give some representations of this inverse. Moreover, an algorithm is built to compute the inverse along a tensor.

The expressions of the inverse along a tensor
Definition 5.1 Let A ∈ n1×n2×n3 and G ∈ n2×n1×n3 . If there exist tensors X ∈ n2×n1×n3 , U ∈ n1×n1×n3 and V ∈ n2×n2×n3 such that then X is called the inverse along G and is denoted by A G .
Theorem 5.1 Let A ∈ n1×n2×n3 and G ∈ n2×n1×n3 . If A is invertible along G, then the inverse of A along G is unique.
.., n 3 . Thus, we have G i = M i N i , i = 1, 2, ...n 3 , which are the full rank decomposition of G i . By [17], we have Therefore, Performing ten(IDCT)(·) on both sides of the equation above, one has A G = M * c (N * c A * c M) −1 * c N.
By [17], A i Gi exist if and only if X i , i = 1, 2, ..., n 3 , are nonsingular. In this case, Thus, A G exists if and only if X i , i = 1, 2, ..., n 3 , are nonsingular. Also, we have
A higher order Markov chain is an extension of a finite Markov chain, in which the stochastic process X 0 , X 1 , · · · with values in {1, 2, · · · , n}, has the transition probabilities where n j=1 L(P) (i) jk = 1, i = 1, ..., n, 1 ≤ k ≤ n. We call the tensor P a transition tensor.
Let F be a subset of Ê and let {X t : t ∈ F } be a set of random variables. If F is countable and if the range of each X t is the same finite set, then the chain is said to be a finite Markov chain. Let us denote {G 1 , . . . , G m } the range of any X t .
It is useful to have in mind that X k is the outcome of the chain on the kth step. The probability of X k being in state G j provided that X k−1 was in state G i is L(P) (i) jk (s) = Prob(X s = G k |X s−1 = G j ), i = 1, . . . , n. These probabilities are said to be the one-step transition probabilities. If each of the one-step transition probabilities does not depend on s (does not depend on time), i.e., L(P) (i) jk (s) = P jki , for any s = 1, 2, . . ., i = 1, . . . , n, then we say that the chain is homogeneous.
In the sequel, we will focus our attention to finite homogeneous Markov chains and will simply write 'Markov chain' or 'chain' to denote a finite homogeneous Markov chain.
An ergodic set Ω is a set of states in which every state of Ω is accessible from any other state of Ω and, in addition, no state outside Ω is accessible from any state of Ω.
A transient set Ω is a set whose elements are states in which every state of Ω is accessible from every other state of Ω, but some state outside Ω is accessible from each state of Ω.
A Markov chain is ergodic if the transition tensor of the chain is irreducible, or equivalently, the states of this chain form a single ergodic set. An ergodic chain is regular if its transition tensor P has the following property: exists a natural number k such that P k > 0.
A state is absorbing if the chain enters in this state, it can never be left. A chain is an absorbing chain if it has at least one absorbing state and, in addition, from every state of this chain it is possible to enter in an absorbing state (but not necessarily in one step). See [27] for details. Theorem 6.1 If P ∈ Ê n×n×n is any transition tensor and if A = I − P, then A # exists.