What is the maximum number of reduce moves that can be taken by a bottom-up…

GATE · 2013 · CS · Computer Science & IT

What is the maximum number of reduce moves that can be taken by a bottom-up parser for a grammar with no epsilon- and unit-production (i.e., of type A → є and A → a) to parse a string with \(n\) tokens?

  1. A.

    \(n/2\)

  2. B.

    \(n-1\)

  3. C.

    \(2n-1\)

  4. D.

    \(2^n\)

Attempted by 80 students.

Show answer

Correct answer: B

The worked solution is available to enrolled students.

Explore the full course: Iocl Engineers Officers Grade A Paper 2

Loading lesson…