Skip to main content
Log in

Error tolerance for the recognition of faulty strings in a regulated grammar using fuzzy sets

  • Published:
Sādhanā Aims and scope Submit manuscript

Abstract

To overcome the limitations of context-free and context-sensitive grammars, regulated grammars have been proposed. In this paper, an algorithm is proposed for the recognition of faulty strings in regulated grammar. Furthermore, depending on the errors and certainty, it is decided whether the string belongs to the language or not based on string membership value. The time complexity of the proposed algorithm is O(|G 2 R |·|w|), where |GR| represents the number of production rules and |w| is the length of the input string, w. The reader is provided with numerical examples by applying the algorithm to regularly controlled and matrix grammar. Finally, the proposed algorithm is applied in the Hindi language for the recognition of faulty strings in regulated grammar as a real-life application.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. Dassow J and Păun G 1989 Regulated rewriting in Formal Language Theory (1st ed)., Berlin, Heidelberg: Springer

    Book  MATH  Google Scholar 

  2. Dassow J 2004 Grammars with regulated rewriting. In: Martin-vide C, Mitrana V and Paun G (Eds.) Formal Languages and Applications. Berlin, Heidelberg: Springer, pp. 249–273

    Chapter  Google Scholar 

  3. Meduna A and Zemek P 2014 Regulated Grammars and Automata (1st ed). New York: Springer

    Book  MATH  Google Scholar 

  4. Senay H 1992 Fuzzy command grammars for intelligent interface design. IEEE Transactions on Systems, Man and Cybernetics 22(5): 1124–1131

    Article  Google Scholar 

  5. Hopcroft J E, Motwani R and Ullman J D 2006 Introduction to automata theory, languages and computation (3rd ed). Boston: Addison-Wesley

    MATH  Google Scholar 

  6. Steimann F and Adlassnig K P 1994 Clinical monitoring with fuzzy automata. Fuzzy Sets and Systems 61(1): 37–42

    Article  MathSciNet  Google Scholar 

  7. Giles C L, Omlin C W and Thornber K K 1999 Equivalence in knowledge representation: automata, recurrent neural networks, and dynamical fuzzy systems. Proceedings of the IEEE 87(9):1623–1640

    Article  Google Scholar 

  8. Zadeh L A 2004 A note on web intelligence, world knowledge and fuzzy logic. Data and Knowledge Engineering 50(3): 291–304

    Article  Google Scholar 

  9. DePalma G F and Yau S S 1975 Fractionally fuzzy grammars with application to pattern recognition. In: Zadeh L A, Fu K S, Tanaka K and Shimura M (Eds.) Fuzzy Sets and their Application to Cognitive and Decision Processes. New York: Academic Press, pp. 329–351

  10. Qiu D 2007 Automata theory based on quantum logic: Reversibilities and pushdown automata. Theoretical Computer Science 386(1–2): 38–56

    Article  MathSciNet  MATH  Google Scholar 

  11. Bělohlávek R 2002 Determinism and fuzzy automata. Information Sciences 143(1–4): 205–209

    Article  MathSciNet  MATH  Google Scholar 

  12. Ignjatović J, Ćirić M and Bogdanović S 2008 Determinization of fuzzy automata with membership values in complete residuated lattices. Information Sciences 178(1): 164–180

    Article  MathSciNet  MATH  Google Scholar 

  13. Schneider M, Lim H and Shoaff W 1992 The utilization of fuzzy sets in the recognition of imperfect strings. Fuzzy Sets and Systems 49(3): 331–337

    Article  MathSciNet  MATH  Google Scholar 

  14. Inui M, Shoaff W, Fausett L and Schneider M 1994 The recognition of imperfect strings generated by fuzzy context sensitive grammars. Fuzzy sets and systems 62(1): 21–29

    Article  MathSciNet  Google Scholar 

  15. Ginsburg S and Spanier E H 1968 Control sets on grammars. Math. Systems Theory 2(2): 159–177

    Article  MathSciNet  MATH  Google Scholar 

  16. Cremers A and Mayer O 1973 On matrix languages. Information and Control 23(1): 86–96

    Article  MathSciNet  MATH  Google Scholar 

  17. Solar P 2014 Deep Pushdown Transducers and State Translation Schemes. In: Proceedings of the 20th Conference STUDENT EEICT, Brno University of Technology, 24 April, pp. 264–268

  18. Kasai T 1970 An hierarchy between context-free and context-sensitive languages. Journal of Computer and System Sciences 4(5): 492–508

    Article  MathSciNet  MATH  Google Scholar 

  19. Zemek P 2013 One-sided random context grammars: Established results and open problems. In: Proceedings of the 19th Conference STUDENT EEICT, Brno University of Technology, 25 April, pp. 222–226

  20. Van der Walt A P J 1970 Random context grammars. In: Proceedings IFIP Congress. North-Holland, Amsterdam, pp. 66–68

  21. Meduna A and Zemek P 2014 One-sided random context grammars with a limited number of right random context rules. Theoretical Computer Science 516: 127–132

    Article  MathSciNet  MATH  Google Scholar 

  22. Meduna A 1990 Generalized forbidding grammars. International Journal of Computer Mathematics 36(1–2): 31–38

    Article  MATH  Google Scholar 

  23. Meduna A and Zemek P 2013 Generalized one-sided forbidding grammars. International Journal of Computer Mathematics 90(2): 172–182

    Article  MathSciNet  MATH  Google Scholar 

  24. Meduna A and Zemek P 2012 One-sided forbidding grammars and selective substitution grammars. International Journal of Computer Mathematics 89(5): 586–596

    Article  MathSciNet  MATH  Google Scholar 

  25. Kleijn H C M 1983 Selective Substitution Grammars Based on Context-Free Productions. Ph.D. Thesis, Leiden University, Netherlands

  26. Kleijn H C M 1987 Basic ideas of selective substitution grammars. In: Kelemenova A and Kelemen J (Eds.) Trends Techniques and Problems in Theoretical Computer Science. Berlin, Germany: Springer, pp. 75–95

  27. Kalra N and Kumar A 2017 Deterministic Deep Pushdown Transducer and its Parallel Version. The Computer Journal 61(1): 63–73

    Article  MathSciNet  Google Scholar 

  28. Kalra N and Kumar A 2016 Fuzzy state grammar and fuzzy deep pushdown automaton. Journal of Intelligent and Fuzzy Systems 31(1): 249–258

    Article  MATH  Google Scholar 

  29. Garhwal S and Jiwari R 2016 Parallel fuzzy regular expression and its conversion to epsilon-free fuzzy automaton. The Computer Journal 59(9):1383–1391

    Article  MATH  Google Scholar 

  30. Lee E T and Zadeh L A 1969 Note on fuzzy languages. Information Sciences 1(4): 421–434

    Article  MathSciNet  Google Scholar 

  31. Asveld P R J 2005 Fuzzy context-free languages. Part 1: generalized fuzzy context-free grammars. Theoretical Computer Science 347(1): 167–190

    Article  MathSciNet  MATH  Google Scholar 

  32. Asveld P R J 2005 Fuzzy context-free languages. Part 2: Recognition and parsing algorithms. Theoretical Computer Science 347(1): 191–213

    Article  MathSciNet  MATH  Google Scholar 

  33. Zhanga J, Williams S O and Wang H 2017 Intelligent computing system based on pattern recognition and data mining algorithms. Sustainable Computing: Informatics and Systems. https://doi.org/10.1016/j.suscom.2017.10.010

    Google Scholar 

  34. Bag S, Tiwari M K and Chan F T S 2017 Predicting the consumer’s purchase intention of durable goods: An attribute-level analysis. Journal of Business Research. https://doi.org/10.1016/j.jbusres.2017.11.031

  35. Zadeh L A 1965 Fuzzy sets. Information and Control 8(3): 338–353

    Article  MathSciNet  MATH  Google Scholar 

  36. Lange M and Leiß H 2009 To CNF or not to CNF? An efficient yet presentable version of the CYK algorithm. Informatica Didactica 8: 2008–2010

    Google Scholar 

Download references

Acknowledgements

One of the authors, Nidhi Kalra was supported under Visvesvaraya PhD Scheme Fellowship by Ministry of Electronics and Information Technology, Government of India.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Ajay Kumar.

Appendix 1: Numerical example

Appendix 1: Numerical example

In this appendix, the proposed algorithm has been applied to a matrix grammar.

Example 4.2

Consider GM = (Grm), where G = {{SCD}, {cd}, S, {m0m1m2m3m4}} be the matrix grammar of example 2.2 where

$$ \begin{aligned} m_{0} & = (p_{0} :S \to CD), \\ m_{1} & = (p_{1} :C \to cC,p_{2} :D \to cD), \\ m_{2} & = (p_{3} :C \to dC,p_{4} :D \to dD), \\ m_{3} & = (p_{5} :C \to c,p_{6} :D \to c), \\ m_{4} & = (p_{7} :C \to d,p_{8} :D \to d), \\ \end{aligned} $$

The control set is rm = m0(m1m2) * (m3m4).

Equivalent CNF for the grammar GM:

$$ \begin{aligned} m_{0}^{'} & = (p_{0} :S \to CD), \\ m_{1}^{'} & = (p_{1}^{1} :C \to A_{1} C,p_{1}^{2} :A_{1} \to c,p_{2}^{1} :D \to A_{2} D,p_{2}^{2} :A_{2} \to c), \\ m_{2}^{'} & = (p_{3}^{1} :C \to A_{3} C,p_{3}^{2} :A_{3} \to d,p_{4}^{1} :D \to A_{4} D,p_{4}^{2} :A_{4} \to d), \\ m_{3}^{'} & = (p_{5} :C \to c,p_{6} :D \to c), \\ m_{4}^{'} & = (p_{7} :C \to d,p_{8} :D \to d) \\ \end{aligned} $$

The control set is rm′ is m0′(m1′, m2′) * (m3′, m4′).

Using fuzzy replace operator:

$$ \begin{array}{*{20}l} {pr_{9} :A_{1} \to \_} \hfill & {pr_{10} :A_{2} \to \_} \hfill \\ {pr_{11} :A_{3} \to \_} \hfill & {pr_{12} :A_{4} \to \_} \hfill \\ {pr_{13} :C \to \_} \hfill & {pr_{14} :D \to \_} \hfill \\ {pr_{15} :C \to \_} \hfill & {pr_{16} :D \to \_} \hfill \\ \end{array} $$

Using fuzzy add operator:

$$ \begin{array}{*{20}l} {pr_{17} :A_{1} \to \_c|c\_} \hfill & {pr_{18} :A_{2} \to \_c|c\_} \hfill \\ {pr_{19} :A_{3} \to \_d|d\_} \hfill & {pr_{20} :A_{4} \to \_d|d\_} \hfill \\ {pr_{21} :C \to \_c|c\_} \hfill & {pr_{22} :D \to \_c|c} \hfill \\ {pr_{23} :C \to \_d|d\_} \hfill & {pr_{24} :D \to \_d|d\_} \hfill \\ \end{array} $$

Using fuzzy remove operator:

$$ \begin{array}{*{20}l} {pr_{25} :A_{1} \to \lambda } \hfill & {pr_{26} :A_{2} \to \lambda } \hfill \\ {pr_{27} :A_{3} \to \lambda } \hfill & {pr_{28} :A_{4} \to \lambda } \hfill \\ {pr_{29} :C \to \lambda } \hfill & {pr_{30} :D \to \lambda } \hfill \\ {pr_{31} :C \to \lambda } \hfill & {pr_{32} :D \to \lambda } \hfill \\ \end{array} $$

On considering string w = ddcd ∉ L. Table A1 dep

Table A1 Various derivation for the string \( w = cdcdcccd \).

icts few ways for deriving the string w = ddcd.

Table A2 represents the confidence level for the string wusing E-set.

Table A2 Confidence level for the string w using E-set.

Table A3 and A4 represent the confidence level for the string wusing Tf-set and final interpretations with fuzzy confidence for the string w = cdcdcccd respectively.

$$ \mu (w) = \hbox{max} (0,\;0,\;0.75,\;0,\;0,\;0,\;0.5,\;0,\;0,\;0) = 0.75 $$

By choosing a certain level of confidence λc, we say string is accepted if μ(w) ≥ λc.

Table A3 Confidence level for the string w using Tf-set.
Table A4 Final interpretations with fuzzy confidence for the string w = cdcdcccd.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Kumar, A., Kalra, N. & Garhwal, S. Error tolerance for the recognition of faulty strings in a regulated grammar using fuzzy sets. Sādhanā 43, 134 (2018). https://doi.org/10.1007/s12046-018-0833-y

Download citation

  • Received:

  • Revised:

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1007/s12046-018-0833-y

Keywords

Navigation