358 views
1 votes
1 votes

a. m+n

b. m+n-1

c. 2m+1

d. 2m+n-1

1 Answer

0 votes
0 votes

consider a grammar

S->aA

A->aA |a.

consider a string =aaa.

parse tree is 

Here terminals of a string are leaf nodes and 

production rules are internal nodes.

no of nodes in a tree is =internal+leaf nodes.

 internal=m & leaf=n.

total no of nodes in a tree=m+n

No related questions found