Skip to main content
OverflowAI is here! AI power for your Stack Overflow for Teams knowledge community. Learn more

Questions tagged [chomsky-hierarchy]

The Chomsky Hierarchy is the model proposed by Noam Chomsky in 1956 for classes of Formal Grammars. They refer to Type-0, Type-1, Type-2 and Type-3 grammars which refer to Unrestricted Grammars, Content Sensitive Grammars, Context Free Grammars and Regular Grammars.

Filter by
Sorted by
Tagged with
-1 votes
3 answers
61 views

Why do type-3/regular languages require a terminal symbol on the right-hand side?

In the Chomsky hierarchy, a type-3/regular language can either be left-regular or right-regular. Right-regular language have these “production rules”: ...
Julius Hamilton's user avatar
0 votes
3 answers
71 views

What is the name of the theory that says that Turing equivalence is universal, and Turing machines are maximally computationally powerful?

In the Chomsky hierarchy, level 0 grammars include all languages that can be recognized by a Turing machine. There is no level -1 (which would represent the class of languages that cannot be ...
Luke Hutchison's user avatar
0 votes
0 answers
36 views

How to determine class of formal language in Chomsky Hierachy

I recently started learning about the chomsky hierarchy and I am preparing myself for an upcoming exam. Often there are tasks to specify the smallest classification of a given formal language. How ...
smallfish's user avatar
3 votes
1 answer
315 views

Repeated rules with more than three symbols for conversion to Chomskys Normal Form

I am trying to convert the below context-free grammar into Chomsky Normal Form, specifically, removing rules that have three or more variables or terminators. $$S \to A a B \;\vert\; B b C$$ $$A \to A ...
pleaseandthankyou's user avatar
1 vote
1 answer
53 views

Why the Chomsky Hierarchy?

The hierarchy $$\text{regular languages $\subset$ deterministic context-free languages $\subset$ context-free languages $\subset$ context-sensitive languages $\subset$ recursively enumerable ...
Sam's user avatar
  • 143
1 vote
1 answer
33 views

What is the Chomsky level of pattern matching?

Pattern matching in programming languages as for example in Racket is some kind of parsing. Which level in the Chomsky hierarchy does this parsing technique have? Is it type-3 like regular expressions ...
ceving's user avatar
  • 111
5 votes
1 answer
440 views

Why is Dyck-2 so important for the Chomsky-Schützenberger theorem?

I have read a lot of times, that models that can parse Dyck-2 are of great importance. It appears that Dyck-2 is interchangeably used like Dyck-N. Afaik the Chomsky-Schützenberger representation ...
Crea Teeth's user avatar
-1 votes
1 answer
610 views

Show that the language $L=\{w|w$ has odd length and the middle symbol is a $0\}$ is Context-Free and construct a PDA that accepts it

Were w is any string composed over the alphabet $\Sigma = \{0,1\}$. For the first part of the exercise I've tried decomposing the problem into three different ones, mainly the first one is for the ...
Lorenzo's user avatar
0 votes
1 answer
41 views

Find Grammar for L(G) ={a^i b^j c^k | k = i*j ;i, j ≥ 1}

Find a Grammar G, so that L(G) = {a^i b^j c^k | k = i*j ;i, j ≥ 1} Hello, I have difficulties solving this. I had a similar exercise, where the k was i+j, which was easier, because the solution was to ...
tafelwasser123's user avatar
0 votes
0 answers
101 views

Removing null production from cfg

While removing null production from cfg as below, S->ABC A->aA|^ B->bB|^ C->aaC|^ now as shown above we know that A,B and C all are ...
Zoha Javed's user avatar
1 vote
1 answer
49 views

Does Sipser's _Introduction to the Theory of Computation_ cover the Chomsky hierarchy?

I saw the book suggested here. Does Sipser's Introduction to the Theory of Computation cover the Chomsky hierarchy? I ask since, looking through a pdf copy of the book, I found no matches with "...
Sam's user avatar
  • 143
1 vote
1 answer
103 views

What is a contracting grammar (in opposition to a non-contracting grammar)?

In the Chomsky hierarchy what is corresponding to a contracting grammar? I can find references to non-contracting grammars (which can be transformed into context-sensitive grammars accordingly to what ...
Vincent's user avatar
  • 221
0 votes
2 answers
89 views

Example 7.1 correctness in Introduction to Automata Theory, Languages, and Computation

The example says that C is unreachable, but there is the production S-> aBC so C is clearly reachable. This is an error right? or am I missing something.
Osbridge's user avatar
1 vote
0 answers
37 views

Which non regular language meets the requirements for pumping lemma for regular languages?

I heard in my lecture that there are non regular languages which meet the requirements for the pumping lemma for regular languages but I never actually saw one. Does anybody have an example?
SmallBrainStudent's user avatar
2 votes
1 answer
217 views

Prove/find context free grammar is unambiguous for the language $L$

I am trying to find a grammar and prove that it is unambiguous for the language $L$, where $$L = \{ w \in \{a,b\}^+; |w|_a = |w|_b \} $$ Essentially: word $w$ contains at least one $a$ and $b$; where ...
Visor450's user avatar
1 vote
1 answer
46 views

Which abstract machine or language is exactly expressive enough to produce the computable functions?

I'm interested in software verification and therefore only interested in algorithms which always terminate in predictable amount of time and can determine whether the final result is expected or not, ...
newlogic's user avatar
  • 165
1 vote
3 answers
119 views

Confused about Turing Recognizability

If Turing Recognizability means a T.M. will either halt on input $w$ if $w$ is in the language, or run forever if $w$ is not in the language. How can we know the language is Turing Recognizable if we ...
Jim Dana's user avatar
2 votes
1 answer
148 views

What is the outermost class 2^Σ* referring to on the Extended Chomsky Hierarchy?

After having searched a bit, it seems I can't find terminology or references for this outermost class, 2Σ* in blue -- see below. What is it describing?
Josh Hibschman's user avatar
0 votes
1 answer
34 views

What is the subset of CFGs called where each expansion must be the same?

I was wondering about a kind of grammar where we can expand rules of the form A -> X|Y|... with A being a nonterminal and <...
stimulate's user avatar
  • 103
1 vote
1 answer
147 views

simulate PDA using LBA

urestricted -> turing machine context-sensitive -> linear bounded automaton (LBA) context-free -> pushdown automaton (PDA) regular -> finite state machine Hi, I am kind of confused ...
Guanwei HU's user avatar
1 vote
1 answer
396 views

Hierarchy of parser grammars vs Chomsky hierarchy of grammars and the comparsion of the language acceptance power of each parser grammar

While reading the text Modern Compiler Implementation in C by Andrew Appel I came across the hierarchy of grammar given below. The above diagram is very helpful in understanding the correlation among ...
Abhishek Ghosh's user avatar
0 votes
0 answers
26 views

Is this a correct Type 1 grammar?

The task was to give a type 1 grammar(can't be of type 2) which accepts the following words: baaaab, abb, abba(ab)^i for all i ∈ ℕ and doesn't accept these words: aabb, bba, bbabb(baaa)^i for all i ∈ ...
tour77's user avatar
  • 1
1 vote
1 answer
167 views

Easy-to-prove example of non-contextual language

When studying Chomsky's hierarchy of languages (starting from type 3), I find enlightening to encounter some language that can't belong to the current type but which very obviously belong to the next ...
Thomas Baruchel's user avatar
1 vote
0 answers
48 views

what is the difference between L-system and string re-writing?

I was going through the L-System Wikipedia (https://en.wikipedia.org/wiki/L-system) and it mentions that L-Systems are very similar to unrestricted grammars / string re-writing. After going through ...
Glubs's user avatar
  • 23
0 votes
0 answers
61 views

Context Free Grammar to Chomsky Normal Form Help

I am trying to convert the following CFG to CNF: S -> ABS | ε A -> BSBa | a B -> Ba | a The finally result looks like this: ...
Night Rider's user avatar
1 vote
1 answer
186 views

How to demonstrate unambiguous CFG and CNF?

I have to show that if G is an unambiguous CFG, the transformed grammar G' in CNF is also unambiguous. But couldn't come up with something concrete. I could only visualize the case where the grammar G ...
pedro montoya's user avatar
-2 votes
1 answer
198 views

Finding the language generated by this grammar

I'm having problems with this. Can someone help me please. Find the language generated by this grammar over the alphabet $\{0,1\}$: $S\rightarrow BAB\mid CAB$ $BA \rightarrow BC$ $CA \rightarrow AAC$ ...
Lucas's user avatar
  • 3
0 votes
0 answers
58 views

Chomsky Hierarchy of a Computational Model

I am interested in knowing the Chomsky hierarchy of a particular computation model. Also, I would like to know if it is equivalent to Finite State Machine or is Turing complete. This computation ...
Akash Patel's user avatar
0 votes
1 answer
78 views

CYK algorithm in theory of computation

For any context free grammar, there is a parser that takes atmost n^3 time to parse a string of length n. Doubt: I marked it false in a national level exam.I think it should be any null-free context ...
Shivam Gautam's user avatar
1 vote
1 answer
62 views

Can a Turing machine or Push Down Automaton construct languages of type 3?

I am not quite sure, whether automata can construct languages over their types. For example, a Push down automaton can construct a language of type 2 - does that mean that a PDA also can construct a ...
Csler2345's user avatar
0 votes
1 answer
42 views

How can Chomsky hierarchy be applied to languages with alternated letters?

I have the following grammar, which I know it is regular because it can be represented by a finite state automata: \begin{array}{l} \mathrm{S} \rightarrow \mathrm{X} \mid \mathrm{Y} \\ \mathrm{X} \...
Kevin's user avatar
  • 103
0 votes
1 answer
324 views

What becomes of context-sensitive grammars if $\epsilon$ productions are allowed?

The original formulation of the 3 restricted grammar types of Chomsky all included the restriction that the right-hand side of a replacement cannot be $\epsilon$ (non-contracting). This, however, can ...
John Doe the Righteous's user avatar
1 vote
0 answers
134 views

Is every language described by a grammar?

I read the following argument showing that not every language is described by a grammar: For a fixed alphabet $\Sigma$ and variables $V$ there are uncountable many languages over $\Sigma$ since the ...
wandering minstrel's user avatar
4 votes
1 answer
1k views

What is the computational complexity of "real-life" regular expressions?

Regular expressions in the sense as equivalent to regular (Chomsky type 3) languages know concatenation xy, alternation (x|y), ...
Natalie Clarius's user avatar
1 vote
0 answers
54 views

Chomsky hierarchy for finite state transducers

In this question in the first answer someone mentions a "special transduction hierarchy". I cannot find anywhere anything about it. Could someone point me to resources on this topic?
alagris's user avatar
  • 143
2 votes
1 answer
301 views

Two-way finite automaton: How does the automaton remember the state

I have been going through a theory of Two-way finite automatons and I did not understand the given example when there were a DFA A = (Q, Σ, δ, q1, F). the 2-DFA B = (Q ∪ Q| ∪ Q|| ∪ {q0, qN, qF}, Σ ∪ {#...
michal.kyjovsky's user avatar
5 votes
0 answers
392 views

Where is simply typed lambda calculus on the Chomsky hiererchy?

The functions definable in untyped lambda calculus are the computable functions, for which it is in turn possible to define equivalences to the concepts of Turing machines, recursive enumerability and ...
Natalie Clarius's user avatar
0 votes
1 answer
70 views

What kind of Grammar could this be

I am trying to sort Grammar into the Chomsky Hierarchy and I can do so for most of my examples but I am stumped by the following one: bX -> abY which Type of ...
Kobus's user avatar
  • 1
1 vote
0 answers
43 views

CFG to CNF, but stuck on the last few steps

I recently learned about the conversion, but I seem to be stuck. I need to convert the following CFG to CNF: $S → XY$ $X → abb|aXb|e$ $Y → c|cY$ There is no S on the right side, so I did not need ...
ano's user avatar
  • 21
-1 votes
1 answer
2k views

Convert CFG to CNF Arithmatic Expression

Convert CFG to CNF The Grammar E→E+T E→T T→T*F T→F F→(E) F→x Step 1 Assign variables to terminals A→ + B→ * C→( D→ ) F→x ...
webiondev's user avatar
2 votes
1 answer
360 views

Why can’t you simulate a Turing machine with a one-stack PDA by messing with the stack?

I have heard that a matrix can be modeled as just an one array by declaring increasingly large spaces to be from the second array, and that the least you need for a Turing machine is just a PDA with ...
JohnnyApplesauce's user avatar
4 votes
0 answers
94 views

Does type-1 lambda calculus exist?

I'm interested in the intersection of linguistics and computer science, I've been reading on Chomsky hierarchy, and would like to know if there exist lambda calculus types that are equivalent to the ...
nathias's user avatar
  • 41
1 vote
2 answers
245 views

Doubt regarding Chomsky Hierarchy, CFG and CSG

I was following a discussion on a website, where a fellow scholar claims that this grammar S→ aAa | bAb | ϵ A→aA | bA |ϵ is not CSG, so it should also NOT be a CFG. But this grammar properly ...
Turing101's user avatar
  • 1,200
1 vote
1 answer
61 views

What is known about the sets enumerated by primitive recursive functions?

Let's say that a set of natural numbers $S \subseteq \mathbb{N}$ is primitive recursively enumerable if there exists some primitive recursive function $f$ such that $S$ is the range of $f$. That is, ...
Joey Eremondi's user avatar
2 votes
1 answer
690 views

Are Context Sensitive Grammar with Polynomial Complexity Time?

Accordingly, to the question Chomsky Hierarchy and P vs NP, Context-Sensitive Grammars are on Linear Space. Assuming a Deterministic Parser is the one which can parse unambiguous grammars in ...
user's user avatar
  • 215
0 votes
1 answer
246 views

Chomsky Classification of Languages

Given is a language $A = \{ a^n\:b\:c^{2n}\:b^m |\; n ∈ N^{+} ;\; m ∈ N \}$ ; where $N^{+}$ are the natural numbers excluding 0. I have found a type-1 grammar to describe it: $S \to A_1A_2$ $A_1 \...
Monika's user avatar
  • 183
2 votes
2 answers
2k views

Is every subset of a RE language also RE, in general?

I'm trying to understand the question in my title in an intuitive way: If I have an RE language A, then some TM, say TM(A) accepts on it. If I take a subset of A, say A2, then all elements of A2 will ...
TheRealPaulMcCartney's user avatar
2 votes
2 answers
553 views

Can a Formal Language be of a type (RE, REC, Regular, etc) for one TM, but of a different type for another?

I'm new to the study of formal languages, and I wondered if languages of a certain type are objectively of that type (RE, REC, regular, etc), or if their type varies on their context? I had this ...
TheRealPaulMcCartney's user avatar
-1 votes
1 answer
877 views

Is mathematics context-free?

Anyone who deals with mathematics knows intuitively that it is a different kind of thinking than ordinary common-sense thinking that intelligent people use every day to understand and make decisions ...
Craig Feinstein's user avatar
4 votes
1 answer
516 views

Where can we put primitive recursive functions in Chomsky hierarchy?

I am currently studying recursion theory, but I cannot really understand where to put the Primitive Recursive functions in the Chomsky hierarchy. In my understanding, Primitive Recursive functions ...
Briomkez's user avatar