The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
0 votes

How many Minimum number of Backtracks Required :- 


According to me it Max = 3 and Min = 0, because left factoring is there, and say compiler was lucky and chooses the production which finally leads to desired string in one go i.e. S -> aAb -> aab.  So 0 backtracks there isn't it ?

Please Verify if something is wrong?

asked in Compiler Design by Loyal (8.7k points) | 34 views
Yeah you are right min. will be 0 and max will be 3 because B has two choice so 2 backtracking there ,still we don't get our string but we choose S->aAb, A also have two choice but at second choice we will get our required string so only max 3 backtracking there.

Please log in or register to answer this question.

Related questions

0 votes
1 answer
0 votes
1 answer
Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
48,756 questions
52,850 answers
68,743 users