Abstract
Motivated by the concept of fuzzy finite automata and fuzzy pushdown automata, we investigate a novel fuzzy state grammars and fuzzy deep pushdown automata concept. This concept represents a natural extension of contemporary state grammar and deep pushdown automaton, making them more robust in terms of imprecision, errors, and uncertainty. It has been proved that we can construct fuzzy deep pushdown automata from fuzzy state grammars and vice-versa. Furthermore, it has been proved that if fuzzy deep pushdown automaton M fd is constructed from fuzzy state grammar G fs then L (M fd ) = L (G fs ). In other words, for any string α ∈ Σ*, μ (α ; α ∈ L (G fs )) = μ (α ; α ∈ L (M fd )) where μ denotes the membership of a string.
Introduction
Context-free grammars are incapable of encapsulating all natural language phenomena. Context-sensitive grammars can be used to represent natural languages consisting of nested and interleaved dependencies. Notwithstanding, these context-sensitive grammars suffer from several drawbacks (e.g., membership and emptiness problems). To overcome the limitations of context-free and context-sensitive grammars, regulated grammars have been proposed. Regulated grammar [1–3] is an extension of context-free grammar with some regulations, and it is used to represent nested and interleaved dependencies.
In formal language [4–5], input string can either be accepted (μ w = 1) or rejected (μ w = 0). Fuzziness has been introduced into regulated grammar in order to close the gap between the polar accept and reject extremes, and to make the grammar more robust. However, a robust parser may be required in the event of errors being present in the input. The input string will belong to a language with some certainty between 0 and 1. Motivated by the similarities between fuzzy finite automata [6] and fuzzy pushdown automata [7], this paper explores the concepts of fuzzy regulated grammar and fuzzy regulated automata. The need and importance of developing fuzzy languages and fuzzy automata has been explored previously in the literature [8–12].
In this paper, concepts of fuzzy state grammar and fuzzy deep pushdown automaton are introduced. Fuzzy state grammar is a generalization of state grammar, whereas a fuzzy deep pushdown automaton is a generalization of deep pushdown automaton. It is shown that fuzzy deep pushdown automaton can accept fuzzy state grammar and vice-versa.
Asveld [16] proposed fuzzy context-free K-grammar to represent erroneous sentences. Asveld [17] proposed a modified Cocke-Younger-Kasami (CYK) algorithm to recognize fuzzy context-free grammar. Schinder et al. [18] described an approach for recognizing imperfect strings generated by the context-free grammar. Similarly, Inui et al. [19] designed an algorithm for recognizing imperfect strings generated by the context-sensitive grammar. The idea that errors were possible in context-free and context-sensitive grammars was proposed by Schneider et al. [18–19] and Asveld [16]. In this paper, we propose a similar method with respect to state grammar.
Xing [20] proposed one-stack fuzzy pushdown automata and multi-stack fuzzy pushdown automata; demonstrating that the languages generated by one stack fuzzy push down automata, multi-stack fuzzy push down automata, and fuzzy context-free k-languages constituted fuzzy context-free grammars. Bucurescu and Pascu [21] proposed the concept of fuzzy pushdown automata and Boolean fuzzy pushdown automata. In fuzzy pushdown automata, weights are assigned in the interval [1], and it accepts context-free language. In Boolean fuzzy pushdown automata, weights are assigned using boolean algebra, and it accepts context-sensitive language. In this paper, we describe the use of initial state, pushdown, and final state distributions as defined by Bucurescu and Pascu [21]. Moraga [7] defines the relationship between fuzzy context-free languages and fuzzy pushdown automata, calculating the degree of membership based on weights as determined by a monoid. Hopcroft et al. [22] demonstrate the equivalence between pushdown automata and context-free grammars. In this paper, a similar methodology is used to prove the equivalence between the fuzzy deep pushdown automata and state grammars.
A novel concept of fuzzy state grammar has been introduced in Section 3. In Section 4, the concept of fuzzy deep pushdown automata has been proposed. In Section 5, equivalence between fuzzy deep pushdown automata and fuzzy state grammars has been introduced.
We conclude in Section 6.
Preliminaries
Before turning to fuzzy state grammars and fuzzy deep pushdown automata, we must first define terms and notations. Let ∑ be an alphabet consisting of a finite set of terminals. ɛ denotes empty string. G denotes the grammar. L (G) denotes the language generated by grammar G. μ L (α) denotes the membership grade of string α in the language L. Operator _ is used to replace a symbol by any arbitrary symbol from alphabet ∑. Throughout this paper, push operations are represented by ⇒ e , and ⇒ p is used to represent pop operations.
N is set of non-terminals, ∑ is set of terminals, S is the start symbol, P is the set of production rules, and RG is the restriction applied on the derivations of strings.
RG depends on the type of regulated grammar.
Regulated grammars are classified into rule-based [13, 23–25] and context-based grammatical regulation [26–31] as shown in Fig. 1. A state grammar is a rule-based grammatical regulation, in which control regulation are presented in term of states. The current state determines which rule to be applied next.
V is a finite set of symbols; Q is a finite set of states, and V ∩ Q = φ; Σ ⊂ V is an alphabet of terminals; S ∈ V - Σ is the start symbol. P ⊆ (Q × (V - Σ) × (Q × V+)) is a finite relation over the productions.
Given input string w = 010010
The non-context-free language generated by G1 is L (G1) = {ww|w ∈ {0, 1} +}.
Q is a finite set of states, Γ is a pushdown alphabet, ∑ is an input alphabet such that ∑ ⊆ Γ and Γ - ∑ = {#}, R is a finite relation such that and the elements of {I , Q, Γ} are pair-wise disjoint where I denotes natural numbers. q0 ∈ S denotes the starting state, S ∈ Γ is the start pushdown symbol, F ∈ Q is the set of final states.
A configuration of M is a triple in Q × ∑* × (Γ - {#}) * {#}
2M = ({q0, p, q, s′, t} , {0, 1} , {X, S, #} , R, q0, S, {s′, t}) with R containing rules
For input string α = 010010
In brief . Here f = {s′, t}. Hence, the language accepted by deep pushdown automataon is L (2M) = {ww|w ∈ {0, 1} +}.
V is a set of non-terminals, Σ is a set of terminals, P is a set of fuzzy productions of the form and S ∈ V
N
is a start symbol
Q is the set of states, ∑ is input alphabet, q0 ∈ Q is initial state, δ is a fuzzy transition function mapping, Q × ∑ → f (Q). For q ∈ Q, f (q) denotes the degree of membership with which q to be a final state, and F ⊆ f (Q) is the set of fuzzy final states.
Fuzzy state grammar
In this section, we introduce the concept of fuzzy state grammar.
(V, Q, Σ, P, S} is a state grammar, E is the set of error productions, and μ : P → [0, 1] is a weighting function. The set {(p, μ (p)) |p ∈ P} constitutes a fuzzy set of productions.
It holds: μL(G) (α) = min(μ (p i ) , μ (p j ) , …, μ (p z )) Equation (1)
where p i , p j , …, p z ∈ P are productions used to derive the string α.
If the grammar is ambiguous, then different degrees of membership obtained for the string α using different sequences of productions. Max operation is applied to determine the best membership for the string.
μL(G) (α) = max {min(μ (p i ) , μ (p j ) , …, μ (p z ))} Equation (2)
The set {(p, μ (p)) |p ∈ P} constitutes a fuzzy set of productions with the following rules in P:
The language generated L (G fs ) = {a n b n c n |n ≥ 1}.
Errors in the input string are classified into following three types:
The set of error productions E is as follows:
1. On applying replacement error: (Here – denotes that it can be replaced by any arbitrary symbol from alphabet ∑)
2. On applying addition error:
3. On applying removal error:
Consider unambiguous erroneous string α = abbbcc such that α ∉ L
Consider ambiguous erroneous string α = aabacc such that α ∉ L
Derivation 1:
Derivation 2:
The membership of erroneous string α = aabacc is:
max(min(Derivation 1, Derivation 2) =max(0.6 ; 0.3) = 0.6
Hence derivation 1 is the optimal derivation with membership grade μ = 0.6.
Fuzzy deep pushdown automaton
In this section, we introduce the concept of fuzzy deep pushdown automaton.
E is the error set of productions, μ : P → [0, 1] is a weighting function, The set {p, (μ (p)) |p ∈ P} consists of fuzzy productions of the form π : Q → [0, 1] is an initial state function defined by γ : Γ → [0, 1] is a pushdown function defined by η : Q → [0, 1] is a final state function, defined by
A configuration of M fd is a triple in
The set of error productions E are:
Pop operation is applied whenever the topmost symbol from the stack and current symbol under read-write head matches, keeping the state same and the membership value is 1 for this rule.
Consider unambiguous erroneous string α = abbbcc ∉ L
Consider ambiguous erroneous string α =aabacc ∉ L
The optimal derivation is max (derivation1; derivation 2) = max (0.6; 0.4) = 0.6.
Instantaneous description
The fuzzy deep pushdown automaton M fd works similarly as deep pushdown automaton [14] except that for every rule some membership value is associated. Configuration or instantaneous description of M fd is desribed by triple (q, α, T), where q, α, T denotes the current state, remaining input tape symbols and stack contents respectively.
Initial instantaneous description of M fd is (q0, α, S #), where q0, α, S denotes the starting state, input string and stack starting symbol respectively. Move from one instantaneous description to another instantaneous description will be carried out by expansion or pop operation.
Consider ID1 and ID2 are two succesive instantaneous description of M
fd
and we can move from ID1 to ID2 using the following two operations: Pop operation: Consider ID1 (p, bβ, bT) and ID2 (p, β, T) are two instantaneous description such that p ∈ Q, b ∈ Σ, β ∈ Σ* and T ∈ Γ*. This operation is represented by . Expansion operation: Consider ID1 (p, β, αAT) and ID2 (q, β, αvT) are two succesive instantaneous description such that p, q ∈ Q, β ∈ Σ*, α, T ∈ Γ* and . It should be noted that α consists of (m - 1) non-terminals. This operation is represented by
Equivalence of fuzzy state grammarand fuzzy deep pushdown automaton
In this section, we discuss the equivalence between fuzzy state grammar and fuzzy deep pushdown automaton.
The distribution functions are defined by
Consider the production of starting symbol in the fuzzy state grammar , its corresponding equivalent fuzzy deep pushdown automaton rule is . The depth of a rule in the fuzzy deep pushdown automaton depends on how much deep the non-terminal is presenting on the stack. For example, Consider production in the fuzzy state grammar, the corresponding starting state rule in fuzzy deep pushdown automaton will be and the fuzzy deep pushdown automaton will be constructed of depth 2.
The transition function R is defined by Given the production rule in the fuzzy state grammar, add δ (1, q0, in R of Mfd such that α′ is equal to α except that all non-terminals of α are replaced by A in α′. Given the production rule in the fuzzy state grammar, add δ (1, q, A) in R of Mfd. Given the production rule in the fuzzy state grammar, add δ (2, q, A) in R of Mfd (As non-terminals of depth >1, we will replace the all non-terminal B of fuzzy state grammar to non-terminal A with depth 2 in fuzzy deep pushdown automaton.Similarly in R, if the rule is in fuzzy state grammar with membership grade μ
j
and so on. Pop operation is applied whenever the topmost symbol and the current symbol under read-write head matches, keeping the state same and the membership value is 1 for this rule.
Now such that α′ is equal to w2 except that all non-terminals of α are replaced by A in w2. Hence it is true for n = 1.
If
Here γ n = w1α such that w1 ∈ Σ* and α ∈ V*.
α = Aα1 and
Symbol a is popped from the stack and the same is read from w2.
Here γn+1 = w1aα1 where w1a ∈ Σ* and denote the already consumed string. Similarly, if the left most non-terminal A gives a number of terminals, these will be popped from the stack and consumed from the input tape. Hence the property holds for (n + 1) derivation steps.
If the non-terminal is B in fuzzy state grammar, so using the 3rd rule of the construction of fuzzy deep pushdown automaton from fuzzy state grammar, then correspondingly in fuzzy deep pushdown automaton rule of 2 depth is applied here α = Aα1Aα1 and
If the non-terminal is C in fuzzy state grammar, so using the 3rd rule of the construction of fuzzy deep pushdown automaton from fuzzy state grammar, then correspondingly in fuzzy deep pushdown automaton rule of 3 depth is applied here α = Aα1Aα1Aα1 and
If , then add the production in P. The depth of M
fd
determines the number of different symbol expanded from the starting symbol of state grammar. If , then add the production in P. If , then add the production in P. If , then add the production in P. The same process is repeated for depth >3.
We want to prove that if for any w2 then , where denotes degree of membership.
Here α = S, w1 = ɛ and is always true.
Hence
Here α′ is equal to α except that all non-terminals of α are replaced by A in α′, w1 = ɛ and is surely true.
Hence then using the induction hypothesis, means after n - 1 moves, but w = w1a hence with membership min (μ, 1) = μ.
Using induction hypothesis, means , thus with membership min (μ, μ n ).
where w = αγβ
Using induction Hypothesis means , thus on applying the state grammar rule (q, B) = (p, γ) will be □
Using Theorem 1 and Theorem 2, we have proved that if and only if . Now, consider w2 = α = ɛ, then w = w1. It gives, if and only if . String w is accepted by M fd and G fs with membership value μ. Hence L (M fd ) = L (G fs )
Conclusion
This paper defines a novel concept of fuzzy state grammar and fuzzy deep pushdown automaton. We demonstrate increased power, in terms of erroneous string acceptance, using fuzziness in state grammar and deep pushdown automaton. Furthermore, depending upon the errors and certainty, we decide whether the string belongs to the language or not depending upon its membership value. The three main results demonstrated in this paper are: (a.) Construction of fuzzy deep pushdown automaton from fuzzy state grammar; (b.) Construction of fuzzy state grammar from fuzzy deep pushdown automaton; and (c.) If Fuzzy deep pushdown automaton M fd is constructed from the fuzzy state grammar using the above construction method G fs , then L (M fd ) = L (G fs ). To the best of author’s knowledge, no previous fuzzy state grammar and fuzzy deep pushdown automaton work has been reported in the literature. Future researchers might look to the real-time application of fuzzy regulated grammar in the field of biological computing.
Footnotes
Acknowledgments
Nidhi Kalra was supported under Visvesvaraya PHD Scheme fellowship by Department of Electronics and Information Technology, Ministry of Communication & IT, Government of India.
