Matrix Approach to Formulate and Search k- ESS of Graphs Using the STP Theory

In this paper, the structure of graphs in terms of k- externally stable set ( k- ESS) is investigated by a matrix method based on a new matrix product, called semitensor product of matrices. By deﬁning an eigenvector and an eigenvalue of the node subset of a graph, three necessary and suﬃcient conditions of k- ESS, minimum k- ESS, and k- kernels of graphs are proposed in a matrix form, respectively. Using these conditions, the concepts of k- ESS matrix, minimum k- ESS matrix, and k- kernel matrix are introduced. These matrices provide complete information of the corresponding structures of a graph. Further, three algorithms are designed, respectively, to ﬁnd all these three structures of a graph by conducting a series of matrix operation. Finally, the correctness and eﬀectiveness of the results are checked by studying an example. The proposed method and results may oﬀer a new way to investigate the problems related to graph structures in the ﬁeld of network systems.


Introduction
A graph is a figure consisting of nodes and edges; nodes represent things; an edge linking two nodes represents the relationship between the two things. A graph usually describes a specific binary relation between things. And, graph theory is a delightful playground for the exploration of proof techniques in discrete mathematics, and its results have applications in many areas of computing, social, and natural sciences [1]. Interest in graphs and their applications continues to grow rapidly, largely due to the usefulness of graphs as models for computation and optimization [2].
An externally stable set (ESS) of a graph is a set of nodes that any node outside of the set is linked with a node in the set. A k-externally stable set (k-ESS) of a graph is an advanced version of an ESS that any node outside of the set is linked with a node in the set by a path of length k. A kernel of a graph is a set of nodes, that is, both an ESS and internally stable set (ISS). An internally stable set of a graph is a set of nodes where any two nodes are not linked with each other. Similarly, a k-kernel of a graph is an advanced form of a kernel, that is, a k-kernel of a graph is both a k-ESS and a k-internally stable set (k-ISS), where a k-ISS is a set of nodes where any two nodes are not linked with each other by a path of length k. ISS, ESS, kernel, k-ISS, k-ESS, and k-kernels are important modes of describing the structure of graphs. e structure of graphs is a lasting hot topic in graph theory and has been widely discussed in various areas. In the field of novelty detection, Mohammadi et al. [3] used kernel dependence technique to characterize the statistical dependency of the random variable. Previous results mainly use the density assessment method to determine the dependency of random variables and are unable to address high dimension data. is approach uses a kernel of the graph to characterize the dependency and is robust and suitable to problems of arbitrary high dimension data. Bernshtejn and Bozhenyuk [4] proposed the concepts of fuzzy internally stable and fuzzy externally stable sets of a fuzzy directed graph and defined their degrees. By generalizing the approach to discriminate maximal internally stable sets and minimal externally stable sets of an ordinary graph, they developed a method of determining fuzzy internally stable and fuzzy externally stable sets with maximum stability degree. In the analysis of logical networks, Liu et al. [5] applied the graph structure to detect some special states such as observable and unobservable states of Boolean networks. Compared with the methods based on computer algorithms, the advantage of such graph structure-based method is that the observable and unobservable states of Boolean networks can be determined directly. Besides, the structures of graphs are used to many areas such as fault detection [6], network sentiment analysis [7], and decision theory [8].
Matrix can be applied in almost every field of natural science. Although traditional matrix multiplication is widely used, it has limitations. In terms of application scope, it can only be used when two matrices meet the equal dimension condition, and it does not meet the commutative law. In terms of the types of problem-solving, it is mainly used to solve linear or bilinear problems. For multilinear and nonlinear problems, it is almost powerless. With the development of computer and nonlinear sciences, a new method able to deal with high-dimensional array is expected.
A new matrix multiplication, called semitensor product of matrices (STP), has been developed in recent years [9]. STP extends the traditional multiplication of matrices to any two matrices, which overcome the dimension limitation and keep almost all the important properties of the traditional multiplication. Furthermore, due to the introduction of the swap matrix, STP has some exchangeable properties, called pseudoexchangeability, which overcomes the weakness of commutativity of traditional matrix multiplication to some extent. STP is now well established and has been successfully applied in many fields [10][11][12][13][14][15][16][17].
Based on STP, a matrix method of studying the graph structure has been developed. Wang et al. [18] investigated the maximum stable sets and node coloring problems of graphs by using the STP. Several new results and algorithms are presented. e results are useful to consider the network control problems such as group consensus of multiagent systems. Since then, the matrix method has been used to investigate many problems of graphs. Xu et al. [19] continued to consider the coloring of robust graphs by transforming the problem into a type of optimal problem in the framework of the STP and used the matrix method to design an algorithm that can find all the colorings of robust graphs. Further, the timetabling problem is solved by the presented results. In [20,21], Xu et al. pushed the matrix method to a new level and studied the coloring of fuzzy graphs and the conflict-free coloring problem. Using the matrix method, Zhong et al. [22] investigated the minimum stable sets and cores of graphs; several new theoretic results and algorithms are proposed. ese new results provide a way to further consider the optimization of minimum stable sets of graphs and control problems of Boolean control networks such as pinning control. In the hypergraph area, Meng et al. [23] applied the matrix method to investigate the hypergraph coloring. A necessary and sufficient condition of the algebraic inequality form is given, and an algorithm of finding all the coloring schemes of a hypergraph with specific numbers of colors is designed. Yue et al. [24] considered the k-track scheduling problem by investigating the k-ISS of graphs. Two necessary and sufficient conditions and schedulable conditions are developed by using the matrix method. e merits of this matrix method in addressing graph problems are concise mathematical description and clear results. Generally speaking, the problems related to the graph structure can be formulated by matrices, usually called structure matrices. A structure matrix contains all the structure information of a particular class of the graph structure. e embodying of complete structure information provides us a chance to design algorithms to find all the structures of a graph.
As far as we know, there has been no report on using the matrix method to investigate the k-ESS and k-kernel structures of graphs. Generally speaking, there are three kinds of ways to consider the graph structures: based on graph theory, mathematical programming and computer algorithm. Most results obtained by these methods, especially by the computer-based algorithms, are inconvenient to explain the structures mathematically and cannot theoretically guarantee to find all the k-ESSes and k-kernels of a graph.
Motivated by the above defects of the existing results and the advantages of the matrix method of the investigating graph structure, the aims of this paper are to use the matrix method to consider several more complicated structures of graphs, including the k-ESS, minimum k-ESS, and k-kernel, and to design algebraic algorithms to find all these structures of a given graph. e main contributions of this paper contain two parts, theoretic results and algorithms. e theoretic part includes algebraic formulations of the k-ESS, minimum k-ESS, and k-kernels, which are presented as several necessary and sufficient conditions. e algorithm part consists of three algorithms of finding k-ESS, minimum k-ESS, and k-kernels, respectively. ese results can find all these structures of a graph and may provide a new way to consider the structure problems of network systems such as reductions of Boolean networks, dynamic evolution game systems, and finite state machine networks. A disadvantage of the presented algorithms is the memory burden when solved by computers for graphs with more than 20 nodes. e remainder of this paper is organized as follows. Section 2 gives some preliminaries on the mathematical tool (STP) and graphs. In Section 3, the main results of this paper are presented, including theoretic and algorithm parts. In Section 4, we analyze the computation complexity of the presented algorithms and discuss the differences between the presented results and existing ones. Section 5 is devoted to examine the correctness of the results. Finally, a concluding remark is given in Section 6. e following are the notations used in this paper.

Preliminaries
is section gives some necessary preliminaries on the theoretic basis and research object, namely, STP and k-ESS of graphs, respectively.
(1) Let X be a row vector of dimension np and Y be a column vector with dimension p. Split X into p equal-size blocks as X 1 , . . . , X p , which are 1 × n row vectors. e semitensor product of X and Y, X⋉Y, is defined as (2) For any matrices A ∈ R m×n and B ∈ R p×q , if either n is a factor of p, say, nt � p, or p is a factor of n, say, n � pt, then the semitensor product of A and B, denoted by C � C ij � A⋉B, is defined as follows: C consists of m × q blocks, and each block is defined as where A i is the ith row of A and B j is the jth column of B.
Remark 1. Definition 1 is a special case of STP; the generalized definition is defined as A⋉B ≔ (A ⊗ I s/n ) (B ⊗ I s/p ), where s is the least common multiple of n and p and ⊗ is the Kronecker product. e STP used in this paper is the form of Definition 1.

Remark 2.
If n � p, Definition 1 reduces to the traditional product of matrices. erefore, STP is a generalization of the traditional multiplication of matrices. In this paper, the matrix multiplication is defaulted to the STP, and the symbol ⋉ is omitted except for special emphasis needed.
Definition 4 (see [26]). A graph G � (V, E) is a mathematical structure composed of two finite sets V and E. e elements of V are called nodes, and the elements of E are called edges. Each edge has a set of one or two nodes associated to it, which are called its endpoints. An edge is said to join its endpoints. A node joined by an edge to a node v i is said to be a neighbor of v i . In this paper, v i is thought to be a neighbor of itself denoted by Definition 5 (see [26] e number of the edges of a path from v i to v j is called the length of the path, denoted as Definition 6 (see [18] A minimum k-ESS with the least number of nodes is called an absolutely minimum k-ESS; the number of nodes of an absolutely minimum k-ESS is called the k-externally stable number of G, denoted by α(G).
Definition 7 (see [27]). For two matrices A � [a ij ] p×q and Journal of Mathematics where ∨ and ∧ are the operations of "logic Or" and "logic And", respectively. e Boolean power of A is defined as Definition 8 (see [25]).
e k-adjacency matrix (k-AM) of G is defined as follows:

Main Results
In this section, we present the main results of the paper, including theoretic and algorithm results. e theoretic part contains matrix formulations of k-ESS, minimum k-ESS, and k-kernels of graphs. e algorithm part consists of algebraic algorithms of finding all the k-ESSes, minimum k-ESSes, and k-kernels of a graph.

On k-ESS
Definition 9 (see [18]). Given a node subset S ⊆ V of graph G � (V, E), the eigenvector of S, denoted by Using STP, we define the eigenvalue of a node subset of a graph. An eigenvalue and the corresponding node subset are uniquely determined by each other.
. , x n ] be the eigenvector of a node subset S⊆V of graph G � (V, E), and let us define Remark 3. Because that y i (i � 1, 2, . . . , n) can be uniquely obtained by calculating y i � S n i ⋉Y S , where S n i is given in (22), and that the y i (i � 1, 2, . . . , n) uniquely determines Y S , the eigenvalue Y S of S uniquely determines the eigenvector V S , and vice versa. us, if Y S (or V S ) is given, then V S (or Y S ) can be determined. Consequently, the node subset S is obtained.
It is obvious that a l ij � 1 if and only if there are l − 1 subscripts i 1 , i 2 , . . . , i l−1 such that Combining (15) with (5), we get that there is an edge between v i and v i1 , v i1 and v i2 , . . ., and v i l−1 and v j , respectively.
erefore, a l ij � 1 if and only if v i and v j are linked by a path of length where Proof. We first prove the necessity.
. , x n ] be the eigenvector of S. From Proposition 4 and the definition of k-ESS of a graph, we get that, Equation (18) implies that Using (10) and (19), it can be re-expressed as follows: Because a ij and x j are either 1 or 0, (20) is equivalent to It follows from (6) that where It is evident that By (21), we know that where M i � J⋉ n j�1 (a [k] ij Q j ). erefore, the following statements are equivalent to each other for i ∈ 1, 2, . . . , n { }: There exists an l: col l M i � 1 n , (iv) There exists a 1 ≤ j ≤ 2 n : col j M i � 1 n .
Note that (21) is equivalent to the following equations: Equations (26) are solvable if and only if there exists a 1 ≤ j ≤ 2 n such that where Obviously, (21) is equivalent to (26); then, the necessity is proved.
We next show the sufficiency. Because the derivation process from equations (18) to (26) is reversible mathematically, according to Proposition 4 and the definition of k-ESS of a graph, the sufficiency holds. e proof is then completed. eorem 1 gives the condition that a graph contains a k-ESS. Based on the condition, we further establish a rule to judge whether a given node subset is a k-ESS or not. □ ij ] be the k-AM of graph G � (V, E). For a given S⊆V, suppose that the eigenvector and eigenvalue of S are V S � [x 1 , x 2 , . . . , x n ] and Y S � δ k 2 n , respectively. en, S is a k-ESS of G if and only if where Proof. Comparison of (29) with (16) suggests that it is only needed to prove that that is, It follows from (25) that M i ⋉Y s � 1 is equivalent to there exists a 1 ≤ j ≤ 2 n such that col j (M i ) � 1. Consequently, we only need to show that k satisfies the condition.
Taking notice of the sizes of M i and Y S , they are of dimension 1 × 2 n and 2 n × 1, respectively. In such a situation, STP coincides with the traditional product of matrices.  e matrix M of (16) or (29) gives a complete picture for all of the k-ESSes of a graph. We thus propose the following definition.

Definition 11.
e matrix M in (16) or (29) is called the k-ESS matrix of graph G.
According to Remark 3 and the proof of eorem 2, the following Corollary 1 is clearly true.
en, there is a one-to-one correspondence between the k-ESSes of G and the solutions of the following equation:

Journal of Mathematics
where Corollary 1 provides a way to obtain all the k-ESSes of a given graph.
To find all the k-ESSes and minimum k-ESSes of G, one can take the following procedure.
Step 1. Compute the k-ESS matrix M of G.
Step 2. Check if there is a column being 1 n in col(M). If not, there is no k-ESS in G and then the algorithm ends. Otherwise, construct the set Step 3. For each l in K, compute y i � S n i ⋉δ l 2 n , i � 1, 2, . . . , n, where Step 4. Choose y i � δ 1 2 and construct a set S l � v i |y i � δ 1 2 . S l is a k-ESS of G. All the k-ESSes of G are S l |l ∈ K .
e k-externally stable number of G is α(G) � min l∈K |S l | . All the minimum k-ESSes of G are ζ � S l ||S l | � α(G) .

Remark 5. Algorithm 1 produces all the k-ESSes of a graph.
Naturally, the k-ESSes of some characteristics can also be obtained. For instance, each of the nodes outside a k-ESS is connected with the k-ESS once or exactly k times, etc. In a word, Algorithm 1 provides us a picture of the structure of graphs by producing all the k-ESSes.

Theorem 3. Let A [k] � [a [k]
ij ] be the k-AM of graph G � (V, E). And, let V S � [x 1 , x 2 , . . . , x n ] and Y S � ⋉ n i�1 y i � δ k 2 n be the eigenvector and eigenvalue of a subset S⊆V, where

en, S is a minimum k-ESS of G if and only if
where is a k-ESS of G. is is in contradiction with that S � (v 1 , . . . , v i , . . . , v n ) is a minimum k-ESS of G. us, (39) is true. We then get that where ij . It follows from (22) that where Q i � (E d latter ) n− j W [ Submitting (44), (43), and x j � Jy j into (42), we get e necessity is proved. Sufficiency: suppose (36) is true; then, according to the reversibility of the derivation process from equations (42) to (44), the eigenvector of S, V s � [x 1 , x 2 , . . . , x n ], meets the conditions of (38) and (39). If It follows from (26) that S is a k-ESS of G. Next, we show that S is a minimum k-ESS. If we delete any vertex, say x i , from S, denote the new subset by S ′ ; then, the eigenvector of S ′ is V S′ � [x 1 , . . . , x i−1 , 0, x i+1 , . . . , x n ].
Because v i ∈ S and x i � 1, we get from (39) that and then, is suggests that the subset V S′ � [x 1 , . . . , x i−1 , 0, x i+1 , . . . , x n ] is unsatisfied with condition (9). us, S ′ is not a k-ESS of G. Consequently, S is a minimum k-ESS of G. is proves the sufficiency, and the proof of eorem 3 is completed.
Using the minimization of pseudo-Boolean functions (PBFs), the problem of finding all the minimum k-ESSes of a graph can also be solved. e following proposition is needed. □ Proposition 5 (see [28]) . For a PBF f(x 1 , x 2 , . . . , x n ) under the constraints, where f j are nonnegative integer-valued PBFs. Use S + and S − to denote the sum of positive and negative coefficients of f, respectively. Construct the following PBF: (51) e following statements hold.
is also a local minimum point of PBF f with constraint (50)

Theorem 4. Let A [k] � [a [k]
ij ] be the k-AM of graph G � (V, E). For a given subset S⊆V, suppose its eigenvector and

en, S is a minimum k-ESS of G if and only if the kth component of M is a minimum one in the set of nonnegative components, where
Proof. It follows from the proof of eorem 1 that the eigenvector of a minimum k-ESS of G is a local minimum point of PBF h(x 1 , x 2 , . . . , x n ) � n i�1 x i under constraint (20). Applying Proposition 5, here, S + � n and S − � 0, to the minimization problem, we only need to investigate the following minimization problem: Because both x i (i � 1, 2, . . . , n) and a ij only take values 0 and 1, (53) amounts to the following PBF: According to (22), (23), (24), and (54) can be represented in the following form: where Now, it is easy to see from the eigenvalue of S, Y S � ⋉ n i�1 y i � δ k 2 n , that the k-th component of M is the minimum value of PBFs (53) and (54). is completes the proof of eorem 4.
Similarly to Definition 11, we define the matrix M of (52) as the minimum k-ESS matrix of a graph. □ Definition 12.
e matrix M of (52) in eorem 4 is called the minimum k-ESS matrix of graph G.

Remark 6.
e minimum k-ESS matrix of a graph offers us a way to find all the minimum k-ESSes of a graph in a matrix manner. Similarly to Algorithm 1, the following algorithm can produce all the minimum k-ESSes of a given graph.

Algorithm 2. Let A [k] � [a [k]
ij ] be the k-AM of a given graph To get all the minimum k-ESSes of G, one can take the following steps.
Step 1. Compute the minimum k-ESS matrix of G, denoted by M.
Step 2. Check whether there is a nonnegative component in M; if not, G has no minimum k-ESS and the algorithm terminates here. Otherwise, set Step 3. For each l in K, compute y i � S n i ⋉δ l 2 n , i � 1, 2, . . . , n, where Step 4. Choose y i � δ 1 2 and construct S l � v i |y i � δ 1 2 . S l is a minimum k-ESS of G. All the minimum k-ESSes of G are {S l |l ∈ K, S l is produced by Step 3 and Step 4}

Further Results on k-Kernels.
e k-kernels of a graph play a key role in describing the structures of graphs and have a wide application prospect in the network systems [29]. A subset S of nodes of a graph G is called a k-kernel if S is both a k-ESS and a k-internally stable set (k-ISS) of G. Yue and Yan [24] considered the algebraic formulation of k-ISS of graphs in the framework of STP and proposed the matrix form of the necessary and sufficient condition of k-ISS. Integrating the results with those of this paper, we expand the results of the k-ESS and minimum k-ESS to the k-kernels of graphs.
Proposition 6 (see [24]). Let A [k] � [a [k] ij ] be the k-AM of (59) Proposition 7 (see [24]). Based on Propositions 6 and 7 and eorems 1 and 2, it follows from the definition of the k-kernel that the following results are true. 8 Journal of Mathematics en, G has a k-kernel if and only if there exists a 1 ≤ j ≤ 2 n such that where M and N are given in eorem 1 and Proposition 6, respectively.
. For a given node subset S⊆V, the eigenvector and where M and N are given in Corollary 2.
Remark 7. It is clear from Corollaries 2 and 3 that the matrices M and N of Corollary 3 provide the complete information of all the k-kernels of a graph. We use them to define the concepts of the k-kernel matrix of a graph.
Definition 13. e k-kernel matrix of the graph G described in Corollary 3 is the following matrix K: in which M and N are given in Corollary 3. Based on Corollary 3, we can design an algorithm to find all the k-kernels of a graph.
Algorithm 3. For the graph described in Corollary 3, give To find all the k-kernels of the graph, one can take the following steps.
Step 1. Compute the k-kernel matrix K of G.
Step 2. Rewrite K as the form of K � M N shown in Corollary 3.
Step 3. Check whether there is a 1 n in col(M). If not, there is no k-kernel in G and the algorithm ends here. Otherwise, go to the next step.
Step 4. Check whether there is a 0 n in col(N). If not, there is no k-kernel in G and the algorithm ends. Otherwise, set Step 5. For each l in R, compute y i � S n i ⋉δ l 2 n , i � 1, 2, . . . , n, where Step 6. Pick out y i � δ 1 2 , and set S l � v i |y i � δ 1 2 . S l is a k-kernel of G. All the k-kernels of G are S l |l ∈ K .

Comparisons with Existing Works and Computational Complexity
Roughly speaking, the approaches to study the k-ESS and k-kernel problems can be classified into three types: graph theory method, linear programming method, and computer algorithm-based method. Most of these results, especially the computer-based algorithms, cannot find all the k-ESSes of a graph. is paper uses a matrix method to consider the k-ESS and k-kernel problems of graphs. e results presented in this paper have several advantages over existing results. First, we established a matrix formulation of the k-ESS problems, which simply and clearly provide the complete information of the k-ESS of a graph in a matrix manner. Using these information, one can easily develop an algorithm to find all the k-ESSes of a graph. Second, the results of the k-ESS have good expansibility; the main results, including theoretic and algorithm ones, can be transplanted to the case of k-kernels of graphs; after slight modifications, they are applicable to formulate and find the k-kernels of graphs.
Besides, several new concepts are proposed for the k-ESS and k-kernel of graphs, such as k-ESS matrix, minimum k-ESS matrix, and k-kernel matrix. ese matrices can be viewed as structure matrices of k-ESS, minimum k-ESS, and k-kernel because they contain the complete information of all the k-ESSes, minimum k-ESSes, and k-kernel sets of graphs. e time complexity of the proposed algorithms is O(n), including Algorithms 1, 2, and 3. Take Algorithm 2 for example (the complexity analysis of Algorithms 1 and 3 are very similar to that of Algorithm 2). For a given graph G with node set V � v 1 , v 2 , . . . , v n , of all the four steps of Algorithm 2, only Step 3 involves iterative operation. erefore, for graphs of n vertices, the times of iterative operation are no more than n − 1 in the worst situation. us, the time complexity is O(n). Besides, all the involved computations in Algorithm 2 are STP, which can be easily performed with the STP tool box.

Examination of Results
In this section, the correctness of the results are examined by using them to solve a network covering problem, as shown in Figure 1. Because a k-kernel is both a k-ESS and a k-ISS, it needs only to check if that Algorithm 3 can find all the k-kernels of a graph. e 2-AM of G is Steps 1, 2 and 3: with A [2] , we can get the matrices M and N in Corollary 3. In M, the columns being 1 n are as follows: (67) Step 4: based on Steps 1, 2, and 3, construct the following set: where y 2 � δ 1 2 , y 4 � δ 1 2 , and y 7 � δ 1 2 indicate a 2-kernel S 174 � v 2 , v 4 , v 7 , which is marked in pentagrams in Figure 1.
Using the similar procedure, all the 2-kernels of G can be obtained, which are collected in Table 1.
For the case of k � 3, following the above steps, we can get all the 3-kernels of G: When k ≥ 4, the k-kernels of G are the same because the k-AM A [k] no longer changes. Remark 8. According to Zhang et al. [30], the k-kernels of undirected graphs are the same as their maximum k-internally stable sets. e results above coincide with the statement.

Conclusion
In graph theory, k-ESS of graphs is an important research topic because many problems in the real world can be described and be solved by such graph model. In this paper, the formulation and search of k-ESS, minimum k-ESS, and k-kernels of a graph are reconsidered by using a new mathematical tool called STP. Several matrix forms of necessary and sufficient conditions of the k-ESS, minimum k-ESS, and k-kernels of graphs are established. Based on the necessary and sufficient conditions, the concepts of the k-ESS matrix, minimum k-ESS matrix, and k-kernel matrix are proposed. Besides, three algorithms of finding all the k-ESSes, minimum k-ESSes, and k-kernels of a graph are designed. e presented results may provide a new way to solve the problems of the network system such as minimization of networks.

Data Availability
No data were used to support the findings of the study.

Conflicts of Interest
e authors declare that they have no conflicts of interest.