40 questions
1 vote
1 answer
97 views
how to find the grammar of this Language?
How to find the grammar of this language: La = {ww^r: w e {0,1}^*, w ends with 1} ? r: is reverse Here is my solution: S -> 0S0|1S1| 0|1|E(epsilon) What can I change here or is the solution the ...
1 vote
1 answer
44 views
Pumping Lemma and Hierachy
I have a question involving the Pumping Lemma for Regular Languages and Pumping Lemma for Context-free Languages: Is it possible that there's a language which doesn't meet the criteria for the pumping-...
1 vote
1 answer
924 views
What is the point of the 4 grammars specified in Chomsky hierarchy?
I'm currently studying compiler's and am on the topic of "Chomsky Hierarchy and the 4 languages." But it beats me as to what the practical purpose of all this is? It'd be great if I could ...
0 votes
1 answer
82 views
Stochastic context-free grammars to Chomsky normal form
I actually don't understand how to convert scfg to cnf. I know just how to convert cfg. What should I do with probabilities? Example: S->c W1 g:0.9|c W:0.1 W1->g W2 u:0.8|W2 u:0.2 W2->g W3 c:...
2 votes
0 answers
85 views
Chomsky Hierarchy and Robot Framework
I am writing a thesis about Robot Framework. I would like include a part about Chomsky Hierarchy, and describe in which hierarchy, does it belong to. As far as i can understand it, most programming ...
1 vote
2 answers
2k views
If L and L complement are Recursively enumerable then why can't L be a Regular language?
Below question was asked in GATE 2008 paper : If L and L' (L complement) are Recursively enumerable then L is ? a) Regular b) CFL c) CSL d) Recursive Correct option was option (d) and I accept that it'...
0 votes
1 answer
543 views
How can one define a language which does not fit in the Chomsky Hierarchy?
I'm asking this question because I've stumbled across the accepted answer of Chomsky Language Types This quote is referring to Type-0 Grammars: This means that if you have a language that is more ...
3 votes
1 answer
1k views
Chomsky hierarchy - examples with real languages
I'm trying to understand the four levels of the Chomsky hierarchy by using some real languages as models. He thought that all the natural languages can be generated through a Context-free Grammar, but ...
0 votes
1 answer
2k views
How to convert a regular grammar to finite automaton?
How does one convert a regular grammar into a finite automaton (FA)? For instance, what would a finite automaton corresponding to the following regular grammar look like? VN = {S, B, D} (nonterminals)...
1 vote
1 answer
2k views
Is L = {a^mb^nc^k | if (m=n) then (n=k) } CFL or not?
I see that in this language , by the time we are deciding m=n; then we have no b's left; so we can't sompare them with c's.So, i think it should NOT be CFL. But below solution shows that it is CFL ...
0 votes
0 answers
185 views
Does Java sit in Type-0 lavel of Chomsky Hierarchy?
Does Java sit in Type-0 lavel of Chomsky Hierarchy? As I know, C++ template is Turing-Complete, so C++ sits in Type-0 of Chomsky Hierarchy. Java also have Generic, Does Java sit in Type-0 lavel of ...
2 votes
2 answers
989 views
Is a Chomsky type 1 parser generator possible?
Looking at the Chomsky hierarchy of grammars I find that for Type 2 grammars (context free grammars) very good tools exist to aid in creating software to read these from text into a usable data ...
2 votes
1 answer
858 views
Chomsky Hierarchy: LR(k) grammars vs Deterministic CFGs?
We are learning the chomsky hiearchy in my introduction to computer science course. My professor has mention lrk grammars multiple times, but they're not taught in the book. From my understanding, ...
0 votes
0 answers
184 views
Is it possible to have a production with one or more terminal(s) in the LHS of a recursively enumerable language?
As Recursively enumerable grammar is unrestricted, is it possible to have a production with one or more terminal(s) in the LHS (ie no non-terminals)?
0 votes
1 answer
2k views
How to convert to Chomsky Normal Form quickly?
So I know the basic 4 step way of doing it. Removing the epsilons, then the variables less than 2 and so on. However, that way takes way too long for the problems we will have to do on the test. ...