Fuzzy multiset finite automata with output

Fuzzy multiset finite automata with output represent fuzzy version of finite automata (with output) working over multisets. This paper introduces Mealy-like, Moore-like, and compact fuzzy multiset finite automata. Their mutual transformations are described to prove their equivalent behaviours. Furthermore, various variants of reduced fuzzy multiset finite automata are studied where the reductions are directed to decrease the number of fuzzy components (like fuzzy initial distribution, fuzzy transition relation, or fuzzy output relation) of the fuzzy automata. The research confirmed that all fuzzy multiset finite automata with output can be reduced without change of their behaviours.


Introduction
Automata theory is well elaborated branch of computer science. Its main part deals with automata which process their inputs sequentially and in a strictly given order. One of the minor parts is based on multisets (also called bags) which generalize the notion of a set in the respect that allow multiplied occurrence of its elements (cf. e.g. Csuhaj-Varjú et al. 2001;Kudlek et al. 2001). Multiset automata process their inputs without any given order (i.e. processing a symbol a means that any of the present symbols a from 'input bag' can be used). So, their work resembles for example chemical or biological activities: chemical compounds of the same type participating in chemical reactions do not have prescribed order to react as well as compounds transported through membranes in living cells do not follow some strict order. So, the 'multiset paradigm' can be found, for example, in the chemical abstract machine (Berry and Boudol 1992), DNA computing (Pȃun et al. 1998) or membrane computing (Pȃun 2002). Many other applications are mentioned in Singh et al. (2007).
With intention to extend knowledge of multiset automata theory whose fundamentals can be found in Csuhaj-Varjú et al. (2001), Kudlek et al. (2009a), and Kudlek et al. (2009b) we focus on multiset finite automata with output (see Ciobanu and Gontineac 2006) and follow an approach of Li and Pedrycz (2006) where the equivalence between fuzzy Mealy and fuzzy Moore (non-multiset) machines was studied. (The work of Li and Pedrycz was further elaborated in Ignjatović et al. (2018).) We therefore introduce notions of Mealy-like, Moore-like, and compact fuzzy multiset finite automata and describe mutual equivalences among them. Further, we deal with the task of decreasing as many fuzzy components as possible in the studied fuzzy multiset finite automata. Since they usually contain fuzzy transition relation, fuzzy output relation, and fuzzy initial distribution, there is a question whether some of them can be expressed as crisp (i.e. nonfuzzy) relations or a crisp set. The idea is based on papers of Bělohlávek (2002) and Martinek (2016) where deterministic fuzzy finite automata and fuzzy multiset finite automata (respectively) were transformed to equivalent fuzzy automata which contain the only fuzzy component, namely fuzzy set of final states. The results achieved in this paper can be also easily adapted to fuzzy finite (non-multiset) automata with output.
The presented paper is organized as follows. Section 2 presents basic notions of multisets, operations on multisets, and Mealy-like and Moore-like multiset finite automata. Section 3 introduces fuzzy multiset finite automata with output (namely compact, Mealy-like, and Moore-like). Section 4 deals with equivalent behaviours of the previously defined automata. Reduced forms of fuzzy multiset finite automata with output are defined and studied in Sect. 5. Some restrictions on the used structure of truth values are supplemented to prove that the reduced forms have behaviours equivalent to the non-reduced ones.

Multisets
We denote by N the set of all natural numbers including 0. If is a finite nonempty set of symbols we call it an alphabet. Cardinality of any alphabet is denoted by card( ).
For any alphabet , a mapping σ : We use denotation of Kudlek et al. (2009a) and Kudlek et al. (2009b). So, we denote the set of all multisets over by ⊕ .
⊕ is a commutative monoid with operation of addition ⊕ and neutral element 0 , defined as follows: Further, for any multisets α, β ∈ ⊕ , we define the difference α β and the inclusion α β by We use the notation y for singleton multisets, i.e. y (x) = 0 for x = y and y (y) = 1. If a i = a ∈ for i ∈ {1, . . . , m}, we write a m instead of a 1 ⊕ · · · ⊕ ⊕ a m . By a 0 we mean 0 . For a multiset α, we denote the number of occurrences of a symbol a ∈ in α by |α| a . By cardinality of a multiset α we understand card(α) = a∈ |α| a . The interested reader can find more about multiset theory for example in Blizard (1989), Blizard (1991) or in Chapters 3.1 and 3.2 of more recent Alexandru and Ciobanu (2016).

Mealy-like and Moore-like multiset finite automata
Since we assume certain familiarity of the reader with basic notions from automata theory (cf. e.g. Gruska 1997;Hopcroft et al. 2003;Sipser 2006), we skip the classical notions of Moore and Mealy automata (working over strings) and start with their multiset counterparts (cf. Ciobanu and Gontineac 2006).

Definition 1 A Mealy-like multiset finite automaton is an ordered sextuple
is the finite output relation 1 , and q 0 ∈ Q is the initial state.
Otherwise stated, the 'output' consists of all multisets β such that the automaton A starting its computation in q 0 with α on its 'input' produces gradually multisets (addition of all these multisets is equal to β) and finishes its work in a state with 0 on its 'input'. Realize that computation of the automaton A is nondeterministic and does not depend on some strict order of symbols in the 'input multiset'.

Example 1 Consider Mealy-like multiset finite automaton
Since we intend to obtain finite automata, we demand finiteness of both transition and output relations. We differ at this point with Ciobanu and Gontineac (2006). Further difference is in exclusion of 0 in transition and output relations.
(Its transition diagram is in Fig. 1; in the diagram, each edge connecting vertices q, q is labelled by (α, β) Similarly to Moore automata working over strings, we can introduce their multiset counterpart.
Definition 2 A Moore-like multiset finite automaton is an ordered sextuple A = (Q, , , δ, ρ, q 0 ) where Q is a nonempty finite set of states, is the input alphabet, is the output alphabet, δ ⊆ Q × ( ⊕ − {0 }) × Q is the finite transition relation, ρ ⊆ Q × ⊕ is the finite output relation, and q 0 ∈ Q is the initial state. The relation δ can be extended to relation δ * ⊆ Q × ⊕ × Q in the same way as at Mealy-like multiset finite automaton.
We can remind the well-known fact that output of Moore automaton relates to an actual state only, whilst at Mealy automaton, it depends both on previous state and on input which has been 'consumed' at the last computational step.

Fuzzy multiset finite automata with output
In last decades, a lot of effort was done to investigate automata theory in fuzzy setting. In agreement with the approach, we will study fuzzy multiset finite automata with output.
As a set of truth values, we will use an integral quantale (cf. Li and Pedrycz 2005; Stamenković andĆirić 2012), i.e. an algebra L = L, ∧, ∨, ⊗, 0, 1 such that • L, ∧, ∨, 0, 1 is a complete lattice with least element 0 and greatest element 1, • L, ⊗, 1 is a monoid 2 with the neutral element 1, for any index set I and for all a, b i ∈ L.
Recall that a fuzzy set A in a universe set X is any mapping A : X → L, A(x) being interpreted as the truth degree of the fact that 'x belongs to A' and being called membership value. A fuzzy relation R between sets X and Y is defined as a mapping R : X × Y → L. Analogously, a fuzzy ternary relation R is defined as a mapping R : X × Y × Z → L, etc. For any fuzzy set A, the set supp(A) = {a ∈ X | A(a) > 0} is called support of A.
We start our list of fuzzy multiset finite automata with a compact fuzzy multiset finite automaton which relates to quite a usual type of automaton with output (cf. e.g. Mordeson and Malik 2002; Li and Pedrycz 2006) 3 which combines transition and output relations into one transition-output relation.

Definition 3 A compact fuzzy multiset finite automaton (CFMA) is an ordered quintuple
is the input alphabet, is the output alphabet, ω : Q × ( ⊕ − {0 }) × Q × ⊕ → L is the fuzzy transition-output relation with finite support, and σ 0 : Q → L is a fuzzy set in Q which represents a fuzzy initial distribution.
A state q ∈ Q is called an initial state of A if σ 0 (q) > 0. We extend the fuzzy relation ω to fuzzy relation ω * : Q × ⊕ × Q × ⊕ → L in the following way.
The input-output behaviour of A is a fuzzy relation ϕ : Clearly, the input-output behaviour of A can be rewritten to the following form.
3 Origin of the machine form goes back to Santos (1969) who introduced it under the name 'maximin sequential-like machine'. Since the adjective 'sequential-like' does not seem to be suitable for multiset finite automata (which do not process their inputs in a strict order) the word 'compact' was chosen to substitute it.
(Transition diagram of C is in Fig. 3; in the diagram, each edge connecting vertices q, q is labelled by (α, β)/x if ω(q, α, q , β) = x = 0 and each vertex related to a state q has the label q/y if σ 0 (q) = y.) Since it is easy to see that for any β ∈ {b, c} ⊕ , ϕ( a n , β) =

Definition 4 A Mealy-like fuzzy multiset finite automaton (MeFMA) is an ordered sextuple
where Q is a nonempty finite set of states, is the input alphabet, is the output alphabet, δ : Q × ( ⊕ − {0 }) × Q → L is the fuzzy transition relation with finite support, ρ : Q × ( ⊕ − {0 }) × ⊕ → L is the fuzzy output relation with finite support, and σ 0 : Q → L is a fuzzy set in Q which represents a fuzzy initial distribution.
Similarly to CFMA, the input-output behaviour of A is a fuzzy relation ϕ : ⊕ × ⊕ → L which is for all α ∈ ⊕ and γ ∈ ⊕ defined by where Example 4 Let [0; 1] be the closed interval of real numbers between 0 and 1 and let ⊗ denote minimum. Consider (Transition diagram of D is in Fig. 4; in the diagram, each edge connecting vertices q, q is labelled by α/x if δ(q, α, q ) = x = 0, each vertex related to a state q has the inner label q/y if σ 0 (q) = y and the outer label Since (e.g.) we have, respectively, It is easy to see that where Q is a nonempty finite set of states, is the input alphabet, is the output alphabet, δ : Q × ( ⊕ − {0 }) × Q → L is the fuzzy transition relation with finite support, ρ : Q × ⊕ → L is the fuzzy output relation with finite support, and σ 0 : Q → L is a fuzzy set in Q which represents a fuzzy initial distribution.
(Transition diagram of E is in Fig. 5; in the diagram, each edge connecting vertices q, q is labelled by α/x if δ(q, α, q ) = x = 0, each vertex related to a state q has the inner label q/y if σ 0 (q) = y and the outer label γ /z if ρ(q, γ ) = z = 0.) Since (e.g.)

The equivalences among fuzzy multiset finite automata with output
Behaviour of CFMAs and MeFMAs is very similar, so the next definition of their equivalence is straightforward. In what follows, we will denote by ϕ C the behaviour of automaton C.
Definition 6 Let an MeFMA A and a CFMA B have the same input alphabet and output alphabet , respectively. The automata A and B are said to be equivalent if Theorem 1 For every MeFMA A, there is an equivalent CFMA B.
The reversed statement holds true as well, which will be proved with help of ideas used by Ignjatović et al. (2018) see proof of their Th. 6.6.

Theorem 2 For every CFMA B, there is an equivalent
Consider an MeFMA A = (Q , , , δ, ρ, σ 0 ) such that Q = Q × m × n (states (q, α, γ ) of Q will bear information what output γ can be produced provided that the original automaton is in state q and 'consumes' submultiset α) and for all q i , q j ∈ Q, By Eqs. 1 and 2, we obtain ϕ A (0 ,γ ) = ϕ B (0 ,γ ) for all γ ∈ ⊕ . For the next considerations, we denote by Φ the following group of conditions: With regard to definitions of δ, ρ, σ 0 and by Eqs. 2 and 1, we have for all α ∈ ⊕ − {0 }, γ ∈ ⊕ : Thus, the automata A and B are equivalent.
Remark 1 (i) Note that by the proof of Theorem 2, there is an interesting simplification of the constructed MeFMA. Namely, we can state that for every CFMA B, there is an equivalent MeFMA A such that range of the fuzzy output relation of A is bivalent and ranges of fuzzy initial distributions of A and B coincide. (Similarly, range of fuzzy transition relation of A coincides with range of fuzzy transition-output relation of B.) (ii) It follows from (i) and from Theorem 1 that each MeFMA can be transformed to an equivalent MeFMA whose fuzzy output relation have values from the set {0, 1}.
In the next part, we are going to prove equivalent behaviour of either MeFMA or CFMA (due to Theorems 1 and 2 we know that they are equivalent) with MoFMA. Since the corresponding proofs are simpler in the case of CFMA and MoFMA, we will deal with this pair of automata. In what follows, we will use the next definition of equivalence between them (cf. Li and Pedrycz 2006).

Definition 7 Let an MoFMA
A and a CFMA B have the same input alphabet and output alphabet , respectively. The automata A and B are said to be equivalent if for all
Remark 2 On the basis of the construction described in proof of Theorem 4, we can state (analogously to Remark 1): (i) For every CFMA B, there is an equivalent MoFMA A such that range of the fuzzy output relation of A is bivalent and ranges of fuzzy initial distributions of A and B coincide. (Similarly, range of fuzzy transition relation of A coincides with range of fuzzy transition-output relation of B.) (ii) It follows from (i) and from Theorem 3 that each MoFMA can be transformed to an equivalent MoFMA whose fuzzy output relation have values from the set {0, 1}.

Reduced forms of fuzzy multiset finite automata with output
Fuzzy multiset finite automata with output were defined in Sect. 3 in agreement with frequent definition of fuzzy automata where the sets concerning states, input and output symbols are crisp whilst transition and output relations, initial and final states are fuzzified -cf. e.g. Dubois and Prade (1980), Mordeson and Malik (2002) or Droste et al. (2009). Some papers concerning fuzzy automata (without output) describe how to confine their fuzzy components as much as possible. For example, Bělohlávek (2002) proves that (under certain restriction to the used fuzzy structure) any deterministic fuzzy finite automaton can be transformed to an equivalent deterministic fuzzy finite automaton which contains the only fuzzy component, namely fuzzy set of final states. Analogous approach was used in Martinek (2016) for fuzzy multiset finite automata.
In the case of fuzzy multiset finite automata with output (where the set of final states is missing), there are three fuzzy components we can think of reducing to crisp form, namely the set of initial states, transition relation, and output relation. We will describe reductions concerning -initial states at CFMA, -initial states and transition relation at MeFMA and MoFMA, -initial states and output relation at MeFMA and MoFMA.
First, we define the reduced (or simplified) forms of the automata.

Definition 10 Let
Automaton A is called a Moore-like fuzzy multiset finite automaton in reduced form r12 or in reduced form r13 if it satisfies conditions (C1), (C2) or (C1), (C3), respectively.
Restrictions on the structure of truth values: In what follows, we assume locally finite monoid L, ⊗, 1 (which means that each of its finite subsets generates a finite submonoid) and idempotence of the operation ⊗ (i.e. a ⊗a = a for all a ∈ L) in our structure of truth values.
The following series of theorems deals with equivalent behaviour of non-reduced and reduced fuzzy multiset finite automata with output.

Theorem 5 For every CFMA B, there is an equivalent CFMA A in reduced form.
Proof Let B = (Q, , , ω, σ 0 ) be a CFMA. Denote I = {ω * (q, α, q , γ ) | α ∈ ⊕ , γ ∈ ⊕ , q, q ∈ Q} ∪ {σ 0 (q) | q ∈ Q} -note that I is finite because of the assumption of locally finite monoid L, ⊗, 1 . Put (The previous note implies that the set Q is finite and can serve as a new set of states.) Prior to exploration of behaviour of automaton A, let us have a look to sequences of its states which can be used in a 'non-null' computation. So, for all i ∈ {1, . . . , k}, if α i ∈ ⊕ − {0 }, γ i ∈ are given, consider a sequence Q 0 , Q 1 , . . . , Q k such that Then, we get In what follows, we denote • by Φ the following group of conditions: • by Ψ the following group of conditions: Then, by Equation 1, we have for all α ∈ ⊕ −{0 }, γ ∈ ⊕ : Using definitions of σ 0 and ω and realizing the conditions which must be satisfied by a sequence of states Q 0 , . . . , Q k to be used in a computation (with possibly non-null truth value), we get: Taking idempotence of the operation ⊗ into account, we obtain: Thus, the automata A and B are equivalent. Proof (i) Let B = (Q, , , ρ, σ 0 ) be an MeFMA. Denote J = {δ * (q, α, q ) | q, q ∈ Q, α ∈ ⊕ } ∪ {ρ * (q, α, γ ) | q ∈ Q, α ∈ ⊕ , γ ∈ ⊕ } ∪ {σ 0 (q) | q ∈ Q} -note that J is finite because of the assumption of locally finite monoid L, ⊗, 1 . Put (Clearly, the set Q is finite and can serve as a new set of states. Truth value Q(q, α, q , γ ) will be connected with truth values related to the facts that state q is reached and output γ is produced provided that the original automaton starts its computational step in state q and 'consumes' submultiset α.) Consider an MeFMA A = (Q , , , δ , ρ , σ for all q, r ∈ Q, α ∈ m , γ ∈ n , 0 otherwise , Prior to exploration of behaviour of automaton A, let us have a look to sequences of its states which can be used in a 'nonnull' computation. So, consider a sequence Q 0 , Q 1 , . . . , Q k such that Then, we get: for all q 2 , q 3 ∈ Q, α 1 , α 2 , α 3 ∈ m , γ 3 ∈ n . . . .
In what follows, we denote • by Φ the following group of conditions: • by Ψ the following group of conditions: Then, by Equation 2, we have for all α ∈ ⊕ −{0 }, γ ∈ ⊕ : Using definitions of σ 0 , δ , ρ and realizing the conditions which must be satisfied by a sequence of states Q 0 , . . . , Q k to be used in a computation (with possibly non-null truth value), we have: If we denote then taking idempotence of the operation ⊗ into account, we obtain: Thus, the automata A and B are equivalent.
(ii) Proof of the statement concerning MoFMA B and A is analogous to part (i). We will only describe its beginning.
The rest of the proof is analogous to part (i).
Since each of the above reduced automata fulfils also definition of the corresponding non-reduced automaton, we can formulate the next summary.

Conclusion
In this paper, the notions of Mealy-like, Moore-like, and compact fuzzy multiset finite automata were introduced and their equivalent behaviours were proved. All the profs are constructive.
Further, reduced forms of the fuzzy multiset finite automata were defined and studied. Contrary to the non-reduced forms, the reduced ones contain more crisp (i.e. non-fuzzy) components, namely some of the following: transition relation, output relation, and initial distribution. Assuming locally finite monoid L, ⊗, 1 and idempotent operation ⊗ in the used structure of truth values, transformations among various kinds of non-reduced and reduced fuzzy multiset finite automata with output (not changing their behaviours) were described.
The findings concerning reduced forms of fuzzy multiset finite automata with output can be also easily transformed to fuzzy (non-multiset) finite automata with output.
Author Contributions I am the only author.
Funding No fund was used for the research.

Data and material availability Not applicable.
Code Availability Not applicable.

Declarations
Conflict of interest I am not in any conflict of interest.
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecomm ons.org/licenses/by/4.0/.