edited by
1,219 views

1 Answer

Best answer
5 votes
5 votes

Both are true..

For top down parser , the worst case complexity is O(n4) for left recursive grammar and O(n3) for right recursive grammar..

However for bottom up parser using the CYK algorithm , we will get upper bound of O(n3) whatever the CFG be (either left recursive or right recursive)..

Hence C) is the correct answer..

Reference : https://en.wikipedia.org/wiki/CYK_algorithm

               https://en.wikipedia.org/wiki/Top-down_parsing

selected by

Related questions

0 votes
0 votes
1 answer
2
aditi19 asked Jul 6, 2018
372 views
Does bottom up parsers give postfix expression?
2 votes
2 votes
2 answers
3
gate19 asked May 26, 2018
1,155 views
What is the difference between $SLR(1)$ and $LALR(1)$ parser ? Both parser have same parsing table then how $SLR$ is subset of $LALR$ ?
0 votes
0 votes
1 answer
4
Utsav09 asked Jan 31, 2018
374 views
Consider the grammar given$S\rightarrow AA$$A\rightarrow aA / b$How many entries will be blank in the GOTO table for SR(0) items?