# Chomsky hierarchy

Automata theory: formal languages and formal grammars

Chomsky hierarchy describes the relations between various languages and kinds of formalized logic.

| Chom | Grammars     | Languages              | Abstract machines |
| ---- | ------------ | ---------------------- | ----------------- |
| Ty-0 | Unrestricted | Recursively enumerable | TM                |

* \| (no common name) | Decidable | Decider Ty-1| Context-sensitive | Context-sensitive | Linear-bounded
* \| Positive range concat| Positive range concat | PTIME TM
* \| Indexed | Indexed | Nested stack
* \| - | - | Thread automaton
* \| Linear CF rewrite sys| Linear CF rewrite lang| Restricted treestack aut
* \| Tree-adjoining | Tree-adjoining | Embedded PDA Ty-2| Context-free (CF) | Context-free | Nondeterministic PDA
* \| Deterministic CF | Deterministic CF | Deterministic PDA
* \| Visibly PDA | Visibly PDA | Visibly PDA Ty-3| Regular | Regular | Finite
* \| - | Star-free | Counter-free
* \| Non-recursive | Finite | Acyclic finite

Each category of languages, except those marked by an asterisk, is a proper subset of the category directly above it.

Any language in each category is generated by a grammar and by an automaton in the category in the same line.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://mandober.gitbook.io/math-debrief/600-toc/620-formal-language-theory/chomsky-hierarchy.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
