Abstract

This paper considers the stable set and coloring problems of hypergraphs and presents several new results and algorithms using the semitensor product of matrices. By the definitions of an incidence matrix of a hypergraph and characteristic logical vector of a vertex subset, an equivalent algebraic condition is established for hypergraph stable sets, as well as a new algorithm, which can be used to search all the stable sets of any hypergraph. Then, the vertex coloring problem is investigated, and a necessary and sufficient condition in the form of algebraic inequalities is derived. Furthermore, with an algorithm, all the coloring schemes and minimum coloring partitions with the given q colors can be calculated for any hypergraph. Finally, one illustrative example and its application to storing problem are provided to show the effectiveness and applicability of the theoretical results.

1. Introduction

A hypergraph is composed of a finite set and a collection of nonempty subsets of , in which is called the vertex set of and is called the edge set of . Thus, graphs are a special kind of hypergraphs with two vertices in each edge. One of the basic problems about hypergraph theory is the stable set problem, which has been widely applied in many research fields like network coding [1, 2]. Another basic problem about hypergraph theory is the coloring problem, which is one of NP-complete problems. There are various forms of hypergraph coloring such as vertex coloring, good coloring of edges, strong coloring, and equitable coloring. Graph coloring has been widely used in many real-life areas including scheduling and timetabling in engineering, register allocation in compilers, and air traffic flow management and frequency assignment in mobile [36]. The coloring problems of a special kind of graphs have been widely discussed in [79]. In recent years, there have been some references considering hypergraph theory, such as [10, 11]. It has been successfully applied to many different areas such as Markov decision process [12], complete simple games [13], linear programming [14], and cooperation structures in games [15]. And a few references have analyzed the colorability of different kinds of hypergraphs [1618]. However, there are no proper algebraic algorithms for stable set and coloring problems of hypergraphs. Thus, they are still open problems and it is necessary for us to establish new formulations and algorithms.

In recent years, Cheng et al. [19, 20] have proposed an effective tool, called the semitensor product (STP) of matrices. Via STP, Boolean networks can be converted into an algebraic form and many problems of Boolean networks, such as controllability and observability [21], fixed points and cycles [22], and control design problems [2325], have been investigated. To learn more about the applications of STP, the readers can refer to [2630].

In this paper, we investigate the stable set and vertex coloring problems of hypergraphs and present some new results and algorithms via STP. By incidence matrix and characteristic logical vector (CLV), a necessary and sufficient condition, as well as a new algorithm, is established for hypergraph stable sets. Then, we study the vertex coloring problem. An algebraic equivalent condition and an algorithm for coloring problem are obtained. With the two algorithms, we can calculate all the stable sets and coloring schemes with the given colors for any hypergraph. The results we obtained in this paper are feasible and clear, illustrated by an example and a practical application to the storing problems. Compared to [31], which has considered the stable set and coloring problems of graphs by STP, the results we obtained seem to be the generalization of [31]. However, just applying the results about graphs in [31] to hypergraphs, we cannot get the similar results about hypergraphs. In fact, there are many differences. We use incidence matrix of hypergraphs, while Wang et al. in [31] have used adjacent matrix of graphs. The derivations are completely different since the fundamental techniques used are not the same. Thus, in our paper, the results are new and innovative in some ways.

The remainder of this paper is organized as follows. Section 2 introduces the preliminaries on STP and hypergraph theory. In Sections 3 and 4, we investigate the stable set and coloring problems, respectively, and provide the main results and algorithms of this paper. One illustrative example is also given in Section 3, and the application of coloring problem to storing problem is presented in Section 5 to show the effectiveness and applicability of the obtained results. Section 6 makes a brief conclusion.

Before ending this section, we introduce some notations which will be used throughout this paper. Consider the following.(i) is the set of real matrices.(ii) is the th column of the identity matrix .(iii). .(iv). Identify , ; then, .(v) is called a Boolean matrix, if all its entries are either 0 or 1. The set of Boolean matrices is denoted by .(vi)A matrix is called a logical matrix if the columns of , denoted by , belong to . That is, . And means the th column of . Denote the set of logical matrices by .(vii)If , by definition it can be expressed as . Briefly, we denote it by .(viii)For , , means , for all .(ix)For a set , is the cardinality of .(x) is a block-diagonal matrix with in the th position .(xi)Let , . The Kronecker product of matrices and is defined as

2. Preliminaries

In this section, we will give some necessary preliminaries on STP and hypergraph theory, which will be used later.

Definition 1 (see [20]). Let and . The STP of matrices and , denoted by , is defined as where is the least common multiple of and .

Remark 2. When , STP coincides with conventional matrix product. So STP is a general form of matrix product. Throughout this paper, the matrix product is assumed to be STP, and the symbol “” is omitted if there is no confusion.

Definition 3 (see [19]). A swap matrix is an matrix, defined as follows: label its columns by ; label its rows by , and then the element at the position is

Definition 4 (see [32]). Let , . The Hadamard product of and is defined as

Lemma 5 (see [19]). Let and be two column vectors. Then,
Given , let be a column vector. Then,
Let , be two column vectors and let , be two given matrices. Then,
Let be a Boolean function. Then, there exists a unique logical matrix such that Here, is called the structure matrix of .

Now, some structure matrices of basic logical operators are given as follows: And the power reducing matrix is defined as Then, if , we will have , , , , and .

Definition 6 (see [33]). Let be a finite set, and let be a family of subsets of ; that is, , . The family is said to be a hypergraph on denoted by , if , , and . The elements are called the vertices (hypervertices) and the sets are called the edges (hyperedges).

The incidence matrix of hypergraph is a matrix with rows that represent the edges of and columns that represent the vertices of , such that

Definition 7 (see [33]). Given a hypergraph , a set is called a stable set if it contains no edge with . Furthermore, is called a maximum stable set, if any vertex subset strictly containing is not a stable set. A stable set is called an absolutely maximum stable set if is the largest among all of the stable sets of . The stable number of , denoted by , is defined to be the maximum cardinality of all the stable sets of .

Remark 8. For a hypergraph , any subset of stable set is a stable set. If there exists satisfying , that is, has an edge formed by an isolated vertex, then, all the stable sets of can be obtained from all the stable sets of where . In fact, if all the stable sets of are , then, all the stable sets of are . Therefore, in this paper, we just consider the edges of cardinality more than one. Additionally, the empty set is regarded as a stable set of any hypergraph.

Definition 9 (see [33]). A -coloring is defined to be a partition of into stable sets , each corresponding to a color. A hypergraph for which there exists a -coloring is said to be -colorable.

3. Stable Set Problem

In the section, we investigate the stable set problem of hypergraphs using the STP method and present algebraic equivalent conditions, as well as an algorithm.

Given a hypergraph with vertices and edges , assume that the incidence matrix of is . Denote the th row of by , ; then . Assume that is a subset of . Then, in the following, we will discuss under what conditions the subset is a stable set. First, we define some vectors.

The CLV of , denoted by , is denoted as And then denote It is easy to see that is a Boolean vector and . Then, we can present the following results.

Theorem 10. Consider the hypergraph expressed as above. Then is a stable set of if and only if the last row of matrix has at least one zero element, where

Proof. Let with the CLV , . Denote Then, is a stable set if and only if, for every ; that is, . Since if and only if if and only if the last element of is 0, we just need to prove that, for every , the last element of is 0 if and only if the last row of matrix has one zero component at least.
Let . If, for every , the last element of is 0, then, we get, for every . Thus, satisfies Since , . Hence, So (16) can be expressed as By Lemma 5, we have where and is described in (14). Therefore, (16) becomes That is, Noticing that , we have that (21) having a solution is equivalent to the last row of having one zero element at least. The necessity is proved.
On the other hand, if the last row of has one zero element at least, then the equation has a solution . Equivalently, (16) holds. Noticing that , from (16) we obtain ; that is, for every , the last element of is 0. Hence the proof is completed.

From the above theorem, we find that (21) plays an important role to calculate all the stable sets of hypergraph . The following corollary shows the relationship between (21) and the stable sets of hypergraphs.

Corollary 11. Consider the hypergraph in Theorem 10. has a stable set if and only if (21) has a solution . In addition, the number of stable sets of is the cardinal of solution set of (21).

In order to obtain all the stable sets of any hypergraph, we will give an algorithm according to the proof of Theorem 10 and the results of Corollary 11.

Algorithm 12. Consider a hypergraph shown in Theorem 10. The following steps are given to find all the stable sets of . (1)Calculate the matrix given in (14).(2)Denote the last row of by . If , for every , then, has no stable set and stop. Otherwise, find out all the zero elements of : . Then, corresponds to a solution, , of (21) and so does a stable set of .(3)From , we can retrieve as , , where , are defined as follows [19]: By the definition of (12), we obtain the stable set corresponding to : Thus, all the stable sets of are .

Remark 13. From Algorithm 12, we can obtain all the stable sets of hypergraph ; therefore, the absolutely maximum stable sets can also be determined. Denote the stable number of by ; then, , and all the absolutely maximum stable sets can be derived as .

Remark 14. Although the calculation of the above algorithm is complex, the advantage of this approach is that we can obtain all the stable sets as well as all the absolutely maximum stable sets of a hypergraph. And we can turn to the computer using MATLAB toolbox.

Example 15. Consider the hypergraph , where , , , , , and . In the following, we use Algorithm 12 to find all the stable sets of the hypergraph.
By the definition of the incidence matrix of the hypergraph , the incidence matrix of is By MATLAB toolbox, we easily get Thus, Then, we obtain the last row of as and the indexes of zero elements in are For each index , let . Via computing , , we have all the stable sets of as follows:
Therefore, from the calculation results, we know ; all the absolutely maximum stable sets are .

4. Coloring Problem

In this section, we study the vertex coloring problem of hypergraphs, that is, given colors, how to color the vertices of the hypergraph such that no edge has all its vertices with the same color.

Consider a hypergraph , with , , and assume that its incidence matrix is . Given kinds of colors: , let be the color set; then, we can define a mapping . Since all of the colors may not be used, may not be a surjective. To solve the coloring problem of hypergraph , we can just find a mapping satisfying that, for every edge , there are two different vertices satisfying .

If the color problem is solvable, then each vertex in has been colored by one of the colors. Thus, for given colors, we can define a CLV corresponding to the vertex with the color ; that is, . Before investigating the coloring problem of , we first calculate the structure matrix of the valued function for .

Similar to (12), the valued retrievers can be given as [19]and then, and . Let and , where . With simple calculation, we have

Define the structure matrix of by Next, we give the following algebraic condition of coloring problem of hypergraph .

Theorem 16. The coloring problem is solvable if and only if there exists such that where , and , a structure matrix of , is by (31).

Proof. (Necessity) If the coloring problem is solvable, then, for every edge , there exist two different vertices in such that . That is, but . Then, for each , there exist , , satisfying but , which implies . Thus, By (31), we have Equivalently, where . Considering that , from the inequality (37), we know that there exists such that .
(Sufficiency) Assume that there exists such that . Then the inequality (37) has a solution . Thus, for every , the inequality (35) holds. Noticing that , we get that, for each , there exist such that implies . Hence, the proof is completed.

Based on the algebraic equivalent condition of the coloring problem, we can construct an algorithm to find out all the coloring schemes and coloring partitions.

Algorithm 17. Consider the hypergraph and let a color set . Each vertex corresponds to a color and, thus, corresponds to a valued CLV . We give the following steps to calculate all the coloring schemes. (1)Calculate the matrices and given in Theorem 16.(2)Find if there exists such that . If not, the coloring problem with the colors is not solvable, and stop. Otherwise, find out all the columns of satisfying the inequality (33) and denote their indexes by the set (3)Let , for every . By (30), we get , . Then, let where is the set of vertices colored by the th color, . Then, there are kinds of coloring schemes corresponding to the elements in .

With the result of Theorem 16, we can easily obtain a corollary on , .

Corollary 18. Assume that there exists such that . Then, the following hold: (1)for each , defined in Algorithm 17 is a stable set of ,(2)for each , is a partition of the vertices of .

Remark 19. From Theorem 16 and Corollary 18, we know that if the coloring problem is solvable with the given colors, the hypergraph is -colorable. On the other hand, given the colors, the coloring schemes obtained in Algorithm 17 contain all the coloring schemes with the colors not more than . Then, the chromatic number denoted by , which is the minimum number of colors being used, is , where . Therefore, the minimum coloring partition is

5. Application in Storing Problem

A company produces kinds of chemicals which contain some products that cannot be put in the same storehouse. The problem is that how many storehouses are needed at least to store the kinds of chemicals and how to assign them. In order to solve the problem, we denote the kinds of chemicals by and kinds of circumstances by where the chemicals in , , cannot be put in the same storehouse. Immediately, we obtain a hypergraph . Then some chemicals can be put in the same storehouse if and only if the vertices corresponding to the chemicals can be colored with the same color. Therefore, to assign these chemicals is equivalent to solve the coloring problem of . Here, we will give the following numerical example to illustrate it.

Example 20. There are five kinds of chemicals denoted by needed to be put into two storehouses. Let a hypergraph have the vertex set as . And we know that some dangerous thing will happen if the following combinations appear: , , , and . Then we consider that these combinations are edges of the hypergraph. Thus, the storing problem is equivalent to the hypergraph coloring problem with two different colors. Letting a two-color set , by Algorithm 17, we can get all the coloring schemes.
The incidence matrix of the hypergraph is as follows: By Theorem 16, using MATLAB toolbox, we easily obtainThen, the index set of satisfying (33) is
For each , let . By computing , we have from which we obtain the following 12 coloring schemes: Thus, there are totally 12 kinds of storing methods.

6. Conclusion

In this paper, the stable set and vertex coloring problems of hypergraphs have been revised. Several new results and algorithms have been presented via a method of STP. By defining the incidence matrix of hypergraph and CLV of a vertex subset, one equivalent condition has been established for hypergraph stable set. And a new algorithm to find out all the stable sets and all the absolutely maximum stable sets has been obtained. Furthermore, we have considered the vertex coloring problem and got a necessary and sufficient condition in the form of algebraic inequality, by which an algorithm has been derived to search all the coloring schemes and minimum coloring partitions with the given colors for any hypergraph. Finally, the illustrative example and the application to storing problem have shown that the results presented in this paper are very effective. In papers [34, 35], the scheduling jobs can induce a mixed graph coloring, not a hypergraph coloring. Thus, the mixed graph coloring problem will be interesting to be discussed by STP in the future.

Conflict of Interests

The authors declare that there is no conflict of interests regarding the publication of this paper.

Acknowledgments

The work was partially supported by NNSF of China (61374025), Research Awards Young and Middle-Aged Scientists of Shandong Province (BS2011SF009, BS2011DX019), Excellent Youth Foundation of Shandongs Natural Scientific Committee (JQ201219).