Question: Show that the grammars S - > aSb | bSa | SS | a and S - > aSb | bSa | a are not

Show that the grammars
S->aSb|bSa|SS|a
and
S->aSb|bSa|a
are not equivalent.
1.3 #2
Suppose that in some programming language, numbers are restricted as follows:
a. A number may be signed or unsigned.
b. The value field consists of two nonempty parts, separated by a decimal point.
c. There is an optional exponent field. If present, this field must contain the letter \theta , followed by a signed two-digit integer.
Design a grammar set of such numbers.
2.1#5 a, c
Give dfa's for the languages
a. L=ab^(4)wb^(2):win{a,b}^(*).
b. L={ab^(n)a^(m):n>=3,m>=2}.
c. L={w_(1)abbw_(2):w_(1)in{a,b}^(*),w_(2)in{a,b}^(*)}.
d. L={ba^(n):n>=1,n!=4}.
#7 d,e
Find dfa's for the following languages on \Sigma ={a,b}.
a. L={w.|w|mod3!=0}.
b. L={w:|w|mod5=0}.
c. L={w.n_(a)(w)mod31}.
d. L={w.(n_(a)(w)-n_(b)(w))mod3=0}L={w:(n_(a)(w)+2n_(b)(w))mod31}L={w.|w|mod3=0,|w|!=5}
Show that the grammars S - > aSb | bSa | SS | a

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!