Computer Science EngineeringHard
For a fixed grammar in Chomsky normal form, the CYK algorithm decides membership of a string of length n in time
- A. O(n)
- B. O(n^2)
- C. O(n log n)
- D. O(n^3)
Correct answer: D. O(n^3)
It fills an O(n^2) table with O(n) split points per cell.
Practise more Theory of Computation, Compilers & Digital Logic (ISRO CS) questionsTheory of Computation, Compilers & Digital Logic (ISRO CS): notes and key points
More Theory of Computation, Compilers & Digital Logic (ISRO CS) questions
- The language {a^n b^n c^n | n >= 1} belongs to which smallest class?
- How many strings of length 3 over {a, b} contain 'ab' as a substring?
- Which regular expression over {a, b} is equivalent to (a+b)?
- The minimal complete DFA over {a, b} for strings with no two consecutive a's has how many states (including the dead state)?
- Which property immediately makes a grammar unsuitable for LL(1) parsing?
- For the grammar S -> aSb | ab, how many derivation steps produce the string aaabbb?