2 votes 2 votes Consider the following CFG $S \to AB$ $A \to aBc \mid aB \mid a$ $B \to bDe \mid f \mid CD$ $C \to Dg \mid h$ $D \to g$ The rank of the non-terminal $B$ is __________ Theory of Computation context-free-language rank-of-nonterminal + – ayushigupta asked Oct 17, 2015 • retagged Jul 4, 2017 by Arjun ayushigupta 2.2k views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
0 votes 0 votes S -> AB ->ACD ( B-> CD ) Therefore the maximum number of non terminals from the start state is 3 . Rank of the given grammar is 3. Riya Roy(Arayana) answered Oct 17, 2015 Riya Roy(Arayana) comment Share Follow See all 3 Comments See all 3 3 Comments reply sonu commented Oct 17, 2015 reply Follow Share Its asking for B not S. Ryt? It should be 2 na? 3 votes 3 votes AnilGoudar commented Jul 23, 2017 reply Follow Share @Bikram Sir How to draw directed graph for the above grammar? 0 votes 0 votes Ollie commented Oct 6, 2018 reply Follow Share I have read that to find the rank of a Non terminal the CFG must be in CNF, while the above grammar is not in CNF. I guess we need to first convert the grammar into CNF. 1 votes 1 votes Please log in or register to add a comment.