in Theory of Computation edited by
1,495 views
2 votes
2 votes

Which of the following can be said about the Exhaustive search parsing or brute force parsing ?

  1. It is inefficient as the time taken is proportional to the length of the string.
  2. The parser always terminates on the strings in the $L(G)$.
  3. The parser always terminates on the strings not in $L(G)$.
  1. $\text{1 & 2}$
  2. $\text{2 & 3}$
  3. $\text{1 & 3}$
  4. $\text{1, 2 & 3}$
in Theory of Computation edited by
1.5k views

2 Answers

1 vote
1 vote

A) First statement is true as Exhaustive search parsing may grow exponentially with the length of the string making cost of method prohibitive.

Second is true as when it (parsing) gives a derivation of w i.e. w∈L(G), then it stops.

Third is false because when w∉L(G), the method will go on producing trial sentential forms indefinitely unless we stop it somehow.. Hence it never terminates if w cannot be generated by the grammar. It is one of the major flaw in this parsing technique which makes it inefficient.

0 votes
0 votes
A, as string not in L may not terminate.