chomsky hierarchy in plain english

后端 未结 3 1948
暖寄归人
暖寄归人 2021-01-31 16:32

I\'m trying to find a plain (i.e. non-formal) explanation of the 4 levels of formal grammars (unrestricted, context-sensitive, context-free, regular) as set out by Chomsky.

3条回答
  •  名媛妹妹
    2021-01-31 17:11

    As for regular languages, there are many equivalent characterizations. They give many different ways of looking at regular languages. It is hard to give a "plain English" definition, and if you find it hard to understand any of the characterizations of regular languages, it is unlikely that a "plain English" explanation will help. One thing to note from the definitions and various closure properties is that regular languages embody the notion of "finiteness" somehow. But this is again hard to appreciate without better familiarity with regular languages.

    Do you find the notion of a finite automaton to be not simple and clean?

    Let me mention some of the many equivalent characterizations (at least for other readers) :

    • Languages accepted by deterministic finite automata
    • Languages accepted by nondeterministic finite automata
    • Languages accepted by alternating finite automata
    • Languages accepted by two-way deterministic finite automata
    • Languages generated by left-linear grammars
    • Languages generated by right-linear grammars
    • Languages generated by regular expressions.
    • A union of some equivalence classes of a right-congruence of finite index.
    • A union of some equivalence classes of a congruence of finite index.
    • The inverse image under a monoid homomorphism of a subset of a finite monoid.
    • Languages expressible in monadic second order logic over words.

提交回复
热议问题