Questions tagged [chomsky-hierarchy]

The Chomsky hierarchy is a containment hierarchy of classes of formal grammars.

Within the field of computer science, specifically in the area of formal languages, the Chomsky hierarchy (occasionally referred to as Chomsky-Schützenberger hierarchy) is a containment hierarchy of classes of formal grammars. This hierarchy of grammars was described by Noam Chomsky in 1956.1 It is also named after Marcel-Paul Schützenberger, who played a crucial role in the development of the theory of formal languages. The Chomsky Hierarchy, in essence, allows the possibility for the understanding and use of a computer science model which enables a programmer to accomplish meaningful linguistic goals systematically. wikipedia

40 questions
0
votes
1 answer

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) VT = {a, b, c} (terminals) P = {S -> aB, S ->…
0
votes
0 answers

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 Chomsky Hierarchy?
Anonemous
  • 307
  • 2
  • 8
0
votes
0 answers

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)?
Shardul
  • 90
  • 1
  • 9
0
votes
1 answer

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. Here is an example: Convert this context-free…
0
votes
1 answer

Why is this Grammar not context sensitive?

I have got this grammar: G = (N, Epsilon, P, S) with N = {S, A, B} Epsilon = {a}, P: S -> e S -> ABA AB -> aa aA -> aaaA A -> a Why is this a grammar of only type 0? I think it is because of aA -> aaaA, but I don't…
Sossenbinder
  • 4,852
  • 5
  • 35
  • 78
0
votes
1 answer

Finite and Infinite languages confusion

I have recently started studying Formal Language Theory and having some problems with finite and infinite languages. I have been told that all finite languages are regular. However, reading through the notes given to me, a grammar with…
user3650602
  • 175
  • 2
  • 10
0
votes
0 answers

How to check if a language is regular, context-free, det. context-free or type-0

I have to decide for several languages whether they are regular, context-free, det. context-free or type-0. I understand how to show a language not to be regular (using the pumping lemma), but how to decide it for the other language types very…
0
votes
1 answer

Regular Grammar to my Regex/DFA

I have following regular expression: ((abc)+d)|(ef*g?) I have created a DFA (I hope it is correct) which you can see here http://www.informatikerboard.de/board/attachment.php?attachmentid=495&sid=f4a1d32722d755bdacf04614424330d2 The task is to…
0
votes
1 answer

Example of a language, that isn't recursively enumerable and its complementary language also isn't RE

Only language i cant think of, that does not belong in RE class is diagonal language, but unfortunately its complementary language is recursively enumerable. Does anyone have any ideas?
Eric
  • 5
  • 1
-2
votes
2 answers

Strings that can never be parsed with regular expression

I am teaching regular expression to some good programmers. They are good at programming but hardly use regex. My task is to train them up so they know when to use regex and when not. After showing most regular expression features, I found they are…
Shiplu Mokaddim
  • 56,364
  • 17
  • 141
  • 187
1 2
3