Type-3 because all these grammar satisfying the rules of type-3 grammar.

The Gateway to Computer Science Excellence

+20 votes

–3

but if grammar satisfies type 3 t can also satisfies type 0 also so highest is type o,i.e recursive enumerable language

0

Languages generated by Type 3 (Regular) grammars are the Regular languages. The rules have the restriction that they are of the form: A->a or A->aB (the rule S->epsilon is permitted if the starting symbol S does not appear on the right-side of any rules), which means that each non-terminal must produce exactly one terminal symbol (and possibly one non-terminal as well). The regular expressions generate/recognize languages of this type.

–2

0

Actually, we can assign Type 2 to it.

Question says highest number which acn be assigned

Since this is also a Type 2 (CFG) (and obviously type 3 - Regular), so it can be assigned type 2

Question says highest number which acn be assigned

Since this is also a Type 2 (CFG) (and obviously type 3 - Regular), so it can be assigned type 2

0

The explanation provided in the answer is not correct. Right and Left Linear grammar are not correct justification of the answer, instead properties of Type 2 languages should have been provided.

0

why can't it be Type - 2 grammar because it is also satisfying the CFL grammar constraints.

A -> B then A is variable and B belongs to (variable or terminal)

A -> B then A is variable and B belongs to (variable or terminal)

0

yes it is satisfied by type-2 grammar but this grammar is finite hence regular grammar so that's why it is type-3 grammar and we know that if grammar is regular then it can be accepted by any type of grammar whether it is type-2,1,0.

0

but the question is asking about highest type number right ? then type-3 is subset of type-2 so highest number should be type - 2 right ? plz respond @shubhgupta

0

When you say type 2 grammar then it doesn't specify that, will this grammar be accepted by type 3 or not ? but when you say it is type-3 then it will automatically satisfy by the type-2 grammar and Type 2 grammar is less restrictive compare to Type 3 grammar. And in official key answer was given as D.

+4 votes

Let us see what we get by following the production rules :

$S \rightarrow \underline{A}a \rightarrow \underline{B}a.a \rightarrow abcaa$

We see that the language consists of just one string, which is $abcaa$. Thus, the language is finite and can be represented by FA. Hence, the highest type number is type-3.

$S \rightarrow \underline{A}a \rightarrow \underline{B}a.a \rightarrow abcaa$

We see that the language consists of just one string, which is $abcaa$. Thus, the language is finite and can be represented by FA. Hence, the highest type number is type-3.

+2 votes

It is context Free grammer which is type 2 grammer beacuse here Non Terminal produce Terminal as well non terminals ie NT ---> T/NT.

Why not type 3 beacuse it not producing Non terminal to terminal only*. (S*→*A**a*,*A*→*B**a*,*B*→*a**b**c).*

+1 vote

grammar will be type 3 grammar as it generates a regular language.. abcaa

since abcaa is regular it satisfies every type.. type 0,1,2,3

but the highest type number is TYPE 3

since abcaa is regular it satisfies every type.. type 0,1,2,3

but the highest type number is TYPE 3

+1 vote

- All categories
- General Aptitude 1.9k
- Engineering Mathematics 7.5k
- Digital Logic 2.9k
- Programming and DS 4.9k
- Algorithms 4.4k
- Theory of Computation 6.2k
- Compiler Design 2.1k
- Databases 4.1k
- CO and Architecture 3.4k
- Computer Networks 4.2k
- Non GATE 1.4k
- Others 1.4k
- Admissions 595
- Exam Queries 573
- Tier 1 Placement Questions 23
- Job Queries 72
- Projects 18

50,737 questions

57,382 answers

198,529 comments

105,321 users