Algebraic Analysis of Variants of Multi-State k -out-of- n Systems

: We apply the algebraic reliability method to the analysis of several variants of multi-state k -out-of- n systems. We describe and use the reliability ideals of multi-state consecutive k -out-of- n systems with and without sparse, and show the results of computer experiments on these kinds of systems. We also give an algebraic analysis of weighted multi-state k -out-of- n systems and show that this provides an efﬁcient algorithms for the computation of their reliability.


Introduction
The usual approach to system reliability assumes that the system and its components can only be in one of two states, failure and working. However, many systems and equipments in engineering applications exhibit multiple performance or capacity levels and therefore cannot be adequately modeled by binary methods. For such non-binary situations, several models of multi-state reliability analysis have been proposed in the literature, e.g., [1][2][3][4][5]. In multi-state (MS) systems both the system and its components can be in any of a discrete set of states that indicates different levels of performance. This allows the modeling of a wide variety of situations and is an area of intense research and practice.
Among the most important binary systems are k-out-of-n systems and its variants, e.g., linear consecutive, circular consecutive, weighted, etc. These systems model redundancy in fault-tolerant systems and are used in many applications of a very different practical nature [1]. Multi-state versions of k-out-of-n systems have been proposed in the literature and several methods are used for their reliability analysis. The generalized MS k-out-of-n:G system model was proposed in [6]. Since then, significant efforts have been made in the analysis of such systems and to produce efficient algorithms for their reliability computation, see [7] and the references therein for a complete account.
In recent years, several models have been proposed to describe practical situations that cannot be modeled by usual k-out-of-n systems. For instance, the MS consecutive kout-of-n model was proposed in [8], weighted multi-state k-out-of-n systems were studied in [9] and sparsely connected homogeneous multi-state consecutive k-out-of-n:G systems were recently proposed in [10].
For binary and multi-state systems, several algebraic methodologies have been suggested that allow the efficient analysis of their structure and reliability. In the case that the structure function of the system can be analyzed in recursive terms (for instance, seriesparallel systems and others) the Universal Generating Function method has shown to be very flexible and efficient [2,3,11]. In case that the structure function does not have an easy to describe pattern, like in general networks, the algebraic method based on monomial ideals is an approach that also produces efficient algorithms [12][13][14][15]. This latter method has been used to analyze k-out-of-n systems and variants in the binary case [13,16] and the generalized multi-state version [17]. In summary, this method assigns for each level j of performance of the system a monomial ideal whose minimal generating set is in correspondence with the set of minimal working states of the system. The algebraic study of this ideal, in particular of its Hilbert series, provides a direct method for computing the j-reliability of the systems. A detailed account of this methodology can be seen in the above references.
In the present paper, we take advantage of the versatility of the algebraic method based on monomial ideals and apply it to the analysis of the reliability of recently proposed variants of multi-state k-out-of-n systems. Section 2 reviews the basic definitions and notations about coherent systems and the algebraic method. In Section 3, we analyze multi-state consecutive k-out-of-n systems, giving formulas and bounds for their reliability. Section 4 applies the algebraic method to the recently proposed sparsely connected homogeneous multi-state consecutive k-out-of-n:G system model. Finally, Section 5 is devoted to multi-state weighted k-out-of-n systems.

Basic Definitions
A system S consists of n components denoted by c i with i ∈ {1, . . . , n}. At each moment in time, the system is in one of a discrete set of levels S = {0, 1, . . . , M} indicating growing levels of performance. Each component c i of the system can be in one of a discrete set of levels S i = {0, . . . , M i }. A state of a component is its level and a state of the system is given by an n-tuple of its components' states. Given two states s = (s 1 , . . . , s n ) and t = (t 1 , . . . , t n ), we say that s ≥ t if s i ≥ t i for all i = 1, . . . , n and, conversely, that s ≤ t if s i ≤ t i for all i. The level of performance of the system is determined in terms of the states of the components by a structure function Φ : S 1 × · · · × S n −→ S. The system S is said to be coherent if Φ is non-decreasing and each component is relevant to the system, i.e., for each component c i there exist a system state s = (s 1 , . . . , s n ) and two different levels The levels of the system {0, . . . , M} indicate growing levels of performance, the system being in level 0 indicates that the system is failing, and level j > i indicates that the system is performing at level j better than at level i. For each component c i and for each of its levels j, we denote by p i,j the probability that c i is performing at level ≥ j. The j-reliability of S, denoted by R j (S) is the probability that S is performing at level ≥ j; conversely, the j-unreliability of S, denoted U j (S), is 1 − R j (S). A coherent system is given at level j by its set of j-working states, i.e., those tuples (s 1 , . . . , s n ) ∈ S 1 × · · · × S n such that Φ(s 1 , . . . , s n ) ≥ j. We say that a state (s 1 , . . . , s n ) ∈ S 1 × · · · × S n is a minimal j-working state or minimal j-path if Φ(s 1 , . . . , s n ) ≥ j and Φ(t 1 , . . . , t n ) < j whenever all t i ≤ s i and at least in one case the inequality is strict. We say that a state (s 1 , . . . , s n ) ∈ S 1 × · · · × S n is a minimal j-failure state or minimal j-cut if Φ(s 1 , . . . , s n ) < j and Φ(t 1 , . . . , t n ) ≥ j whenever all t i ≥ s i and at least one of the inequalities is strict. These systems are usually denoted by :G (for good) in the literature. If instead of paths we consider cuts, then the sytems are denoted by :F (for fail).
Let S be a system with n components and let j ∈ {0, . . . , M} be one of the levels of the system. Let F j (S) be the set of j-working states of the system and F j (S) the subset of minimal j-working states. Let us consider P = k[x 1 , . . . , x n ] a polynomial ring in n indeterminates where k denotes any field of characteristic 0. To each state s = (s 1 , . . . , s n ) ∈ S 1 × · · · × S n of S we associate the monomial x s = x s 1 1 · · · x s n n ∈ P. We denote by pr(x s ) = ∏ n i=1 p i,s i the probability that the system is in a state ≥ s. In algebraic terms, having a state t ≥ s is equivalent to saying that the monomial x t is a multiple of x s , i.e., x t is in I = x s , the ideal in P generated by the monomial x s . Now we consider the probability that the system is in a state greater than or equal to at least one of the states in {µ 1 , . . . , µ r }: this situation algebraically corresponds to the set of monomials x t belonging to the ideal I = x µ 1 , . . . , x µ r . Thus we denote its probability by pr(I) = pr( r i=1 x µ i ). The ideal generated by the j-working states of S is denoted by I j (S) and is called the j-reliability ideal of S. For a monomial ideal there is a unique minimal monomial generating set, denoted MinGens(I). Due to the coherence property of S, we have that MinGens(I j (S)) is the set of the monomials corresponding to the minimal j-paths of S. The multigraded Hilbert series of an ideal provides a compact way to enumerate all monomials in a monomial ideal. The multigraded Hilbert series of an ideal I ∈ P, given by where the symbol [x µ ∈ I] is equal to 1 if x µ is in I and 0 otherwise. Let now HN I (x 1 , . . . , x n ) denote the numerator of the Hilbert series of the ideal I and let S be a coherent system. Let pr(HN I j (S) (x 1 , . . . , x n )) denote the formal substitution of every x µ by pr(x µ ) in the numerator of the multigraded Hilbert series of I j (S), then we have that R j (S) = pr(I j (S)) = pr(HN I j (S) (x 1 , . . . , x n )).
Hence, any way to obtain HN I j (S) (x 1 , . . . , x n ) gives us a way to compute R j (S). One such way is by constructing a multigraded free resolution of I and read HN(I) from the data in the resolution. This is the approach we use in our algorithms, for it provides compact forms of the inclusion-exclusion formulas and Bonferroni bounds. In particular, we use Mayer-Vietoris trees [18] as an efficient algorithm to obtain a compressed expression of HN I j (S) (x 1 , . . . , x n ).

Multi-State Consecutive k-out-of-n Systems
A definition of consecutive multi-state k-out-of-n:F systems, in which k could take different values for different system levels was proposed in [8]. Under that definition, a possibly different number of consecutive components need to be below level j for the system to be below level j for different levels. The required number of consecutive component failures is thus dependent on the system level under consideration. The definition is formalized as follows Definition 1. An n-component multi-state system such that its structure function Φ satisfies that Φ(x) < j for j = 1, 2, · · · , M if at least k l consecutive components are in states below l for all j ≤ l ≤ M is called a multi-state consecutive k-out-of-n:F system.
If k 1 ≥ k 2 ≥ · · · ≥ k M the system is called a decreasing multi-state consecutive k-out-of-n:F system. In this case, as j increases, the requirement on the number of consecutive components that must be below state j for the system to be below state level j also decreases.
If k 1 ≤ k 2 ≤ · · · ≤ k M , the system is an increasing multi-state consecutive k-out-of-n:F system. In this case, for the system to be below a higher state level j, a larger number of consecutive components must be below state j.
If all the k j are the same we say the system is a constant consecutive k-out-of-n:F system. . Consider a three-component system where both the system and the components may be in one of three possible states: 0, 1 and 2. The system is below state 2 if and only if at least one component is below state 2, i.e., k 2 = 1. The system is below state 1 if and only if at least two consecutive components are below state 1, i.e., k 1 = 2. This is a strictly decreasing multi-state consecutive k-out-of-n system. This system has a consecutive 1-out-of-3:F structure at system state level 2 and a consecutive 2-out-of-3:F structure at system state level 1. The system in this example has a 3-out-of-3:F structure at system state 3, a consecutive 2-out-of-3:F structure at system state level 2, and a 1-out-of-3:F structure at system state level 1.
Given a structure function Φ, its dual Φ D with respect to t ∈ N n is given by (cf. [19], and see [20] for the case t = (1, . . . , 1), M = 1) In our case, we use t = (M, . . . , M). This means that the dual system is in state M − j or above if and only if the original system is in state j or below, and that for probability evaluation, the probability of the dual component c i to be in state greater or equal to M − j is the probability that the original component c i is at state lower than or equal to j. Observe that MS consecutive k-out-of-n:F systems are dual to consecutive k-out-of-n:G systems; this duality transforms increasing systems in decreasing ones and vice-versa. For the algebraic treatment of these systems we shall make use of their dual structure. We can treat the consecutive k-out-of-n:F structures at each level of our systems as consecutive k-out-of-n:G structures and take advantage of the ideal structure. In this setting, the system-to-ideal correspondence is clearer and more convenient.
Let I k,n be the reliability ideal of a binary consecutive k-out-of-n system, this ideal is given by The graded Betti numbers of I k,n can be recursively computed by the formulas given in [16], where β i,j,k,n indicates the i-th Betti number in degree j of the ideal I k,n : Let us denote by I k,n,j the monomial ideal given by the generators of I k,n in which each variable is raised to the j-th power Observe that for this ideal, the graded Betti numbers are given by An increasing or constant multi-state consecutive k-out-of-n:G system (i.e., a decreasing k-out-of-n:F system) works at level j if at least k j components work at level j or more, and these requirements do not overlap among the levels. Therefore, each level has a binary consecutive k j -out-of-n structure and the j-th reliability ideal is given by I k,n,j = I k j ,n,j Example 3. The system in Example 1 corresponds to a multi-state consecutive k-out-of-n:G system with k 1 = 1, k 2 = 2, hence the j-reliability ideals are given by I k,n,1 = x, y, z , The case of decreasing MS consecutive k-out-of-n:G system (i.e., increasing MS consecutive k-out-of-n:F systems) is more complex. The main difficulty comes from the fact that multi-state decreasing consecutive k-out-of-n:G systems consist of a set of binary consecutive k-out-of-n structures connected by and operators to describe the conditions under which the system is in state j or above, and these individual structures are not embedded in one another. The system is in state j or above if there are k j consecutive components in state j or above and if there are k j consecutive components in state j or above for each j < j. Since the system is decreasing, these conditions do not completely overlap.

Example 4.
The dual to the system in Example 2 is a decreasing multi-state consecutive k-out-of-n system such that k 1 = 3, k 2 = 2 and k 3 = 1. The system is in state 1 or above if at least three components are in state 1 or above; the system is in state 2 or above if at least 2 consecutive components are in state 2 or above and at least 3 components are in state 1 or above. Finally, the system is in state 3 if at least 1 component is in state 3 and at least 2 components are in state 2 or above and at least 3 components are in state 1 or above. This system consists of three binary consecutive k-out-of-n structures combined using the and operator. Proposition 1. The ideal of a decreasing multi-state consecutive k-out-of-n system is of the form Proof. The ideal corresponding to a consecutive k-out-of-n structure in which each component is at level j is given by I k,n,j . This models the condition of having k consecutive components out of n, operating at level j or more. The and operator between two levels with such structure implies that the monomials verifying both conditions are in the intersection of both ideals, hence the result.

Example 5.
The ideals of the system in Example 4 are given by I k,n,1 = xyz , I k,n,2 = x 2 y 2 , y 2 z 2 ∩ xyz = x 2 y 2 z, xy 2 z 2 , Using these ideals to compute the reliability of the system, we can improve over the enumerative method. The algebraic approach provides an algorithm that can be used for increasing, constant and decreasing, as well as for non-monotonic multi-state consecutive k-out-of-n systems. In the latter case, the intersection in Proposition 1 runs only on the non-decreasing stretches, since I k l ,n,l ∩ I k l ,n,l = I k l ,n,l if k l ≥ k l when l > l . Huang et al. gave in [8] and algorithm for decreasing multi-state consecutive k-out-of-n:F systems and claimed that "there are no efficient algorithms for system performance evaluation of an increasing multi-state consecutive k-out-of-n:F systems". They proposed the use of duality to obtain bounds for the reliability of such systems and the use of the enumerative method to obtain the exact reliability. Later, Belaouli and Ksir proposed in [21] a non-recursive algorithm for monotonic systems. Yamamoto et al. [22] proposed an algorithm for general multi-state consecutive k-out-of-n:G systems which do not need to be monotonic. Finally, Zhao et al. [23] used the finite Markov chain imbedding approach (see [24,25]) for the multi-state consecutive k-out-of-n model, and more recently, Yi et al. [26] used the same method for some of its variants. The algorithms in [22,23] are very efficient and provide the exact reliability for systems with independent components both identical and nonidentical. Our algorithms based on the algebraic methods are slower than these but since they are enumerative, they have the advantage that they can be used to obtain bounds and exact reliabilities, and that can be used in the case of non-independent components. Their efficiency is bigger than other enumerative methods since we avoid much of their redundancy (cf. [27]) by using the Hilbert series of the corresponding ideals in a compact form [28].
The j-reliability ideals of this system are . , x 2 6 x 2 7 x 2 8 x 2 9 x 2 10 , I k,n,3 = I k,n,2 ∩  Tables 1 and 2 show the bounds and exact reliabilities obtained by the algebraic algorithms for I k,n,j , j = 1, . . . , 6. In these tables, column l i indicates a lower bound given by the first i summands of the Hilbert series numerator of the corresponding j-reliability ideal, while column u i denotes an upper bound given by the first i summands. The bounds l j (p) and l * * j (p) defined in [29][30][31] are given as follows l j (p) = max ). An asterisk indicates that the bound is sharp. Cells with a minus sign -indicate that the bound is meaningless (i.e., upper bounds above 1 or lower bounds below 0). Note that for systems with a large number of generators, the first bounds are useless due to the fact that each of the first summands of the compact inclusion-exclusion formula consists of a large number of inner summands. Observe that our sets of bounds compare well with l j (p) and l * * j (p). All these bounds and reliabilities were computed in less than 0.1 s on a laptop (MacBookAir M1. 8GbRAM) using the C++ library described in [28]. It is worth noting that the performance of our method does not depend on having identical or non-identical probability distributions in the components of the system. Table 1. Lower bounds for the j-reliability of the consecutive k-out-of-n system in Example 6.

Sparsely Connected Homogeneous Multi-State Consecutive k-out-of-n:G Systems
Sparsely connected homogeneous multi-state consecutive k-out-of-n:G systems were proposed in [10] as a generalization of the binary sparse k-out-of-n systems proposed by Zhao et al. in [32], which were themselves conceived as an extension of the consecutive k-out-of-n model. In such systems, two working (resp. failing) components are said to be consecutive with sparse d if the number of non-working (non-failed) between any two adjacent working (failed) components is at most d. Hence, when d = 0, this is the usual consecutive k-out-of-n model. In the multi-state setting, the model proposed in [10] generalizes the MS consecutive k-out-of-n model, cf. [8], in the same fashion as in the binary case. One considers any two components whose states are l or above; if all the components between them are below state l and the number of such components is at most d, then these components can be called consecutive components in state l with sparse d.

Example 7 ([10]
, Example 1). Consider a lighting system in a manufacturing workshop with ten homogeneous lamp bulbs, see Figure 1. All the bulbs are arranged linearly and each of them might be in one of three different states. State 0 is a failed state, state 1 represents a partial functioning state, and state 2 is a perfect functioning state. We want to evaluate the probability that the system can satisfy a certain requirement of brightness. According to this requirement, the system may be in one of the following states: System state 0 indicates that the lighting system does not provide enough brightness for the manufacturing system to work; system state 1 indicates that the manufacturing system can work partially by a certain amount of brightness; and system state 2 means that the lighting system provides enough brightness for the manufacturing system to work perfectly. In the lighting system, the concept of sparse d can be illustrated in terms of the coverage of light. Let d = 1. As shown in Figure 1, components 5, 6, and 8 are in state 2 while component 7 is below state 2, then they can be regarded as 3 consecutive components in state 2 because the number of components being below state 2 between components 6 and 8 does not exceed 1. However, components 1 and 4 cannot be regarded as consecutive components in state 1 because the number of components being below state 1 between them exceeds 1.  Let us denote by J k,n,d the reliability ideal of a binary consecutive k-out-of-n:G system with sparse d. It is generated by all the monomials x µ such that x µ is the product of k consecutive variables with sparse d, i.e., x µ = x i 1 · · · x i k such that i j − i j−1 ≤ d + 1 for all j ∈ {i 2 , . . . , i k }. In order to collect all such monomials, observe that: Hence, the number of generators of J k,n,d , i.e., the number of minimal working states of the system, is given by the following result.

Proposition 2.
Let G(J k,n,d ) be the set of minimal generators of J k,n,d , we have that Proof. Let C j,k−1,d+1 be the number of compositions of j in k − 1 summands each of them in {1, . . . , d + 1}. For each index i in {1, . . . , n − k + 1} we select k variables, starting in x i , i.e., we select k − 1 gaps, each of which is smaller than d + 1 or equal, and the total sum cannot exceed n − i, being the minimal sum equal to k − 1, since each gap is at least 1. Hence, we have that the number of generators of the ideal is and a simple reorganization of the summands leads to Now, by formula E in [33] we have that and hence the result.
Let G(J k,n,d ) = {g 1 , g 2 , . . . } be the set of minimal generators of J k,n,d and let it be sorted by the lex order. In order to compute the Betti numbers and Betti multidegrees of J k,n,d , we will use Mayer-Vietoris trees and cone resolutions, cf. [18]. These are based on the iterative computation of the intersection ideals g 1 , . . . , g i−1 ∩ g i where i ranges in |G(J k,n,d )|. Proposition 3. Let set(g i ) be the set of variables in {x min(g i )−d−1 , . . . , x max(g i ) } such that x i does not divide g i . Then Proof. Let supp(g i ) be the set of variables that divide g i , max(g i ) be the biggest variable that divides g i and min(g i ) the smallest variable that divides g i .
For all x v ∈ set(g i ), we have that g i If x v / ∈ set(g i ) and x w ∈ supp(g i ), we have that g i x v x w either is not in G(J k,n,d ) or it is equal to some g i ∈ G(J k,n,d ) with i > i in the lex order. Therefore, in any case x v g i it is not a minimal generator of g 1 , . . . , g i−1 ∩ g i .
Finally, for any g i ∈ G(J k,n,d ) such that supp(g i ) ⊆ {1, . . . , min(g i ) − d − 2} we have that supp(g i ) ∩ supp(g i ) = ∅ and there is no x v ∈ set(g i ) such that x v divides g i hence g i ∩ g i = g i g i , g i g i ∈ G( g 1 , . . . , g i−1 ∩ g i and g i g i does not divide g i g i for any other such g i = g i . Observe that the set given by all g i ∈ G(J k,n,d ) such that supp(g i ) ⊆ {1, . . . , min(g i ) − d − 2} is precisely G(J k,min(g i )−d−2,d ).
It is a direct consequence of Proposition 3 and the fact that Observe that β 0 (J k,n,d ) = #(G(J k,n,d )) and hence the recursion in Theorem 1 is closed and it yields a procedure for the computation of the Betti numbers of J k,n,d . From this result and applying the components' probabilities, we obtain the reliability of the corresponding binary consecutive k-out-of-n:G system with sparse d.
We say that a binary consecutive k-out-of-n:G system with sparse d is compact if 2k ≥ n − d. For any such compact system, we have that C i−d−2,k,d = 0 for all i = 1, . . . , n − k + 1, i.e., J k,min(x µ −d−2),d = ∅ for all x µ ∈ G(J k,n,d ). We therefore obtain the following consequences of Proposition 3: Corollary 1. Let J k,n,d the reliability ideal of a compact binary consecutive k-out-of-n:G system with sparse d, then J k,n,d has linear quotients with respect to the lex order.
Proof. Having linear quotients with respect an ordering of the generators means that for such ordering we have that g 1 , . . . , g i−1 : g i is generated by a set of variables set(g i ). This is equivalent to the fact that g 1 , . . . , g i−1 ∩ g i = x i · g i | x i ∈ set(g i ) . Proposition 3 and the fact that for compact systems J k,min(x µ −d−2),d = ∅ for all x µ ∈ G(J k,n,d ) yield the result.

Corollary 2.
Let J k,n,d be a compact binary consecutive k-out-of-n:G system with sparse d, then Observe that a binary consecutive k-out-n ordinary system, i.e., d = 0, is compact if and only if k ≥ n/2 Example 8. Let n = 9, k = 3, d = 2. The corresponding consecutive k-out-of-n with sparse d system is not compact. The list of minimal monomial generators of J k,n,d has 45 generators and is given by the monomials x µ = x a x b x c for all triples abc in the following set (given in≤ x order) Example 9. Let n = 15, k = 5 and let d range from 0 to 10. When d = 0, we have the usual consecutive 5-out-of-15 system, and as d increases we tend towards the traditional k-out-of-n system, which occurs when d > n − k. Let us assign working probabilities to the components in three ways: First consider highly reliable components, i.e., p i,1 = 0.8 if i is odd and p i,1 = 0.7 if i is even; second, consider medium reliable components, i.e., p i,1 = 0.5 if i is odd and p i,1 = 0.4 if i is even and finally consider components with low reliability, p i,1 = 0.3 if i is odd and p i,1 = 0.2 if i is even. Figure 2 shows the behaviour of the reliability of these three kinds of systems as the sparse d varies.  For the multi-state case, the situation is similar to multi-state consecutive k-out-of-n systems. Gao, Cui and Chen define multi-state consecutive k-out-of-n:G system with sparse d in [10] in the following way.
even. The number of generators for the corresponding ideals and the reliabilities and computation times for each of these systems are given in Table 3. The column reliability indicates the probability that the system is at level j or greater.

Multi-State Consecutive k-out-of-n:G Systems with Sparse d and Maximum Total Gap m
In multi-state consecutive systems, Huan et al. [34] consider the situation in which a system may fail when a number of consecutive failures takes place or when a total number of failures (maybe not consecutive) occur, see also [35]. This situation can be applied to multi-state consecutive k-out-of-n:G systems with sparse d and therefore extend this model to a wider range of situations. We consider as before that two components whose states are l or above are consecutive if all the components between them are below state l and the number of such components is at most d, in addition, we say that k components c 1 , . . . , c k are consecutive only if they are pairwise consecutive in this sense and the total number of components in state l or below between c 1 and c k is at most m. With this restriction we give the following definition: Definition 3. A system with n components is called a generalized MS consecutive k-out-of-n:G system with sparse d and maximum total gap m if Φ(X) ≥ j (1 ≥ j ≥ M) whenever there exists an integer value l (j ≥ l ≥ M) such that at least consecutive k l components are in state l or above with sparse d and the number of components below state l within them is at most m.
Let us denote by J k,n,d,m the ideal of a binary consecutive k-out-of-n:G system with sparse d and maximum total gap m. Following the proof of Proposition 2, we have that the number of generators of J k,n,d,m is given by a truncation of the sum in the number of generators of J k,n,d .

Proposition 4.
Let G(J k,n,d,m ) be the set of minimal generators of J k,n,d,m , we have that Observe that if m ≥ n − 1 then the system is a consecutive k-out-of-n:G system with sparse d.
Example 12. Consider the system in Example 8. We have n = 9, k = 3, d = 2, and set m = 3. Now, components 1, 4 and 7 are consecutive with sparse 2 but the total number of failed components between 1 and 7 is four, hence, this would be a failure state for a consecutive 3-out-of-9:G system with sparse 2 and maximum total gap 3. For such a system, the list of minimal monomial generators of its reliability ideal J k,n,d,m has 42 elements and is given by the monomials x µ = x a x b x c for all triples abc in the following set (given in lex order) Example 13. Figure 3 shows the effect of setting the maximum gap at half the sparse and twice the sparse in the systems of Example 9. In both cases, the reliability of the system is reduced as expected, by a small amount in case the gap is half the sparse, and by a larger amount in case the maximum allowed gap doubles the sparse of the system.

Weighted Multi-State k-out-of-n Systems
The traditional binary k-out-of-n system model was extended by Wu and Chen [36] to weighted k-out-of-n systems. In a binary weighted k-out-of-n:G system, component i has a weight w i . The weight of each component represents the utility of the component, i.e., its contribution to the actual performance of the system. The system works if and only if the total weight of the working components is at least k, a pre-specified value. Observe that k may be larger than n. The multi-state version of weighted k-out-of-n systems was introduced by Li and Zuo in [9] where the authors define two variants of these systems. Definition 4 (Weighted multi-state k-out-of-n system, model I). In a system with n components, each component and system may be in M + 1 possible states, {0, . . . , M}. Component i (1 ≤ i ≤ n), when in state j (0 ≤ j ≤ M), has a utility value of w i,j . The system is in state j or above if the total utility of all components is greater than or equal to k j , a pre-specified value. Let Φ be the structure function of the system representing the state of the system and W the total utility of all components. Then, this definition means Pr{Φ ≥ j} = Pr{W ≥ k j }. Since state 0 is the worst state of the system, we have Pr{Φ ≥ 0} = 1.
For the second definition, we consider only the contribution of those components in state j or above.
Definition 5 (Weighted multi-state k-out-of-n system, model II). The system is in state j or above if the sum of the weights of the components whose states are in state j or above is greater than or equal to k j . Let Φ be the structure function of the system and W j be the sum of the utilities of the components whose states are j or above. We then have Pr{Φ ≥ j} = Pr{W j ≥ k j }.
Since the structure functions of these kinds of systems depend strongly on the individual contributions or weights of each of the variables, the methods for computing its reliability are of an enumerative nature. Li and Zuo evaluate in [9] two such methods: a recursive one [36,37] and the Universal Generating Function Method (UGF) [2,3,11]. The analysis in [9] shows that, in general, the recursive approach is more effective than the UGF method for both models I and II. A key issue in the algorithmic evaluation of these systems' reliability is the efficiency in enumerating the working states for each level.
For any monomial ideal I ⊆ k[x 1 , . . . , x n ], a quotient basis is a basis as a k-vector space of the quotient ring R/I. It amounts to a way of enumerating all the monomials that are not in I. In our case, considering I = x M+1 1 , . . . , x M+1 n we have that the (M + 1) n monomials not in I correspond to all possible states of the system's components. In order to obtain the reliability of the system, we proceed state by state and add the probabilities of the states whose weight is above k j for each j. This methodology might theoretically be less efficient than the recursive or the UGF approach, but a good implementation of the enumeration step can compensate this. This is indeed the case with the CoCoALib function QuotientBasis which is an efficient implementation of the enumeration of the elements in the k-basis of R/I for any ideal I. Tables 4 and 5 show the results of some computer experiments in systems of the same kind as those in the experiments in [9]. In Table 4, we set n = 5 and take M from 3 to 12. Each component's weight is a random integer number in the range [1,14] and probabilities are randomly assigned. In Table 5, the weights and probabilities are assigned in the same way but we keep M constant and equal to 5 while n varies from 3 to 11. In both cases, we set k 1 = 200. In the tables, column TS indicates the total number of possible states of the system, column WS indicates the number of j-working states and column RS indicates the size of the set of minimal working states. The number of working states was obtained by exhaustive search on the possible states of the systems, and the number of minimal states was obtained by the minimization algorithm implemented in CoCoALib. For each of these numbers, there is a column indicating the time used for its computation by the C++ class described in [28]. Observe that [9] shows the results of another set of examples in which the weights assigned to the variables are floating point numbers in the range [20,50] this affects the performance of the UGF method, since there are less like terms to cancel, but it does not affect the recursive method. It does not affect the performance of our approach either, since our method is based on the efficiency of the algebraic approach to enumeration of all working states. Observe that in these tables, the time for the computation of the reliability of the system is that in the WS-time column. The tables show computations Model I systems, the algorithms and results are essentially equivalent for Model II.
The described procedure computes the exact reliability of weighted k-out-of-n systems. In case one is interested in the algebraic bounds as obtained in the previous sections, we need to consider the ideal generated by the monomials corresponding to working states of the system. In this case, the first step is to obtain the set of minimal working states, or equivalently the minimal set of generators of the corresponding ideal. The complexity of this procedure, starting with the complete set of working states is O(r 2 ) where r is the total number of working states of the system. It is, therefore, an impractical procedure for large systems. In Tables 4 and 5, the time for computing the minimal generating set of the j-ideal, i.e., the minimal set of working states is given under column RS-time. The size of these sets is under column RS and one can see that these sizes are significantly smaller than that of the set of working states, hence, it would be worth investigating efficient ways of obtaining these sets directly. This would imply a drastic reduction of the computing time of the reliability and bounds for weighted multi-state k-out-of-n systems.

Conclusions and Further Work
We have presented in this work an algebraic approach to the reliability analysis of several important multi-state systems, to which it had not been applied before, namely, variants of the classical multi-state k-out-of-n model. This approach not only provides insight on the structure of the system and it features, such as the number of minimal working states, e.g., for multi-state consecutive k-out-of-n:G systems with sparse d systems, but also produces efficient algorithms for computing the reliability of the systems and bounds for it. The analyses performed in this work demonstrate the versatility of the algebraic approach to system reliability and fosters further analysis of other important systems, like networks. Further work includes also to study the relations and possible combination with other related methods like the Universal Generating Function method, Binary Decision Trees and others.

Conflicts of Interest:
The authors declare no conflict of interest.