Chomsky Hierarchy
  • is aย containment hierarchyย of classes ofย grammars
  • used to understand the complexity of Human Languages

syntax definitions:

  • ๐ด,๐ต -ย non-terminals
  • ๐‘Ž,๐‘,๐‘ย - terminals
  • ๐›ผ,๐›ฟ,๐›ฝย - strings of terminals and/or nonterminals (MAYBE empty)
  • ๐›พ - a string of terminals and/or nonterminals (MUST be nonempty)
  • ๐œ– - an empty stringย (i.e. the string of length 0)

Chomsky Type

  • Formal Grammar
  • Formal Language/Expressions

Automaton Accepting Formal Grammar/Language

Grammar Production Rules

Example Languages

Type-4
  • Finite Enumerable Grammar (FEG)
  • Finite Enumerable Language (FEL)

Memory Lookup

are defined by rules of the forms:

  • ๐‘† โ†’ ๐‘ ๐‘ก๐‘Ÿ๐‘–๐‘›๐‘”-๐‘œ๐‘“-๐‘ก๐‘’๐‘Ÿ๐‘š๐‘–๐‘›๐‘Ž๐‘™๐‘ 

grammar rules G:

  • ๐‘† โ†’ ๐‘Ž๐‘๐‘
  • ๐‘† โ†’ ๐‘Ž๐‘

language of G:

  • ๐ฟ = {๐‘Ž๐‘๐‘, ๐‘Ž๐‘}
Type-3
  • Regular Grammar (RG)
  • Regular Language (RL)

Finite-State Automaton (FSA, FA)

regular grammar is EITHER left or right regular grammar:

  • right regular grammar - is defined by rules of the forms:
    • ๐ดย โ†’ย ๐‘Ž
    • ๐ดย โ†’ย ๐‘Ž๐ต
    • ๐ดย โ†’ ๐œ–
  • left regular grammar - is defined by rules of the forms:
    • ๐ดย โ†’ย ๐‘Ž
    • ๐ดย โ†’ย ๐ต๐‘Ž
    • ๐ดย โ†’ ๐œ–

grammar rules G:

  • ๐ดย โ†’ย ๐‘Ž๐ต
  • ๐ต โ†’ ๐‘๐ต
  • ๐ต โ†’ ๐‘

language of G:

  • ๐ฟ = { ๐‘Ž๐‘๐‘›๐‘ | ๐‘› โ‰ฅ 0 }
Type-2

Pushdown Automata (PDA)
Finite-State Transducer (FST)

defined by rules of the form:

  • ๐ด โ†’ ๐›ผ

grammar rules G:

  • ๐ดย โ†’ย ๐‘Ž๐ด๐‘
  • ๐ด โ†’ ๐œ–

language of G:

  • ๐ฟ = { ๐‘Ž๐‘›๐‘๐‘›| ๐‘› > 0 }
Type-1
  • Context Sensitive Grammar (CSG)
  • Context Sensitive Language (CSL)

Linear-Bounded Automaton (LBA)

defined byย rules of the form:

  • ๐›ผ๐ด๐›ฝ โ†’ ๐›ผ๐›พ๐›ฝ
  • ๐ด โ†’ ๐œ–

the ruleย ๐ด โ†’ ๐œ–ย is allowed ifย ๐ดย does not appear on the right side of any rule

grammar rules G:

  • ๐‘†ย โ†’ ๐‘Ž๐ต๐‘†๐‘
  • ๐‘†ย โ†’ ๐‘Ž๐‘๐‘
  • ๐ต๐‘Žย โ†’ ๐‘Ž๐ต
  • ๐ต๐‘ย โ†’ ๐‘๐‘

language of G:

  • L(G) = { ๐‘Ž๐‘›๐‘๐‘›๐‘๐‘›| ๐‘› > 0 }
Type-0.5
  • Recursive Grammar (RG)
  • Recursive Language (RL)

recursive grammarย if it containsย production rulesย that areย recursive, meaning that expanding a non-terminal according to these rules can eventually lead to a string that includes the same non-terminal again. Otherwise, it is called a non-recursive grammar

Type-0
  • Recursively Enumerable Grammar (REG)
  • Recursively Enumerable Language (REL)

Turing Machine (TM)

defined byย rules of the form:

  • ๐›ผ๐ด๐›ฝ โ†’ ๐›ฟ

Every regular language is context-free, every context-free language is context-sensitive, every context-sensitive language is recursive, and every recursive language is recursively enumerable