VibraXX
Live Quiz Arena
🎁 1 Free Round Daily
⚡ Enter Arena
HomeCategoriesLogic & PuzzlesQuestion
Question
Logic & Puzzles

What happens to the memory usage when a context-free grammar, expressed in Backus-Naur Form, is parsed using the CYK algorithm?

A)Constant, grammar size independent
B)Grows cubically with input size
C)Grows linearly with grammar size
D)Logarithmic relative to input size

💡 Explanation

The CYK algorithm uses dynamic programming, requiring a table proportional to the cube of the input string length because it considers all possible substrings. Therefore, memory usage grows cubically, rather than linearly or logarithmically, and is related to the input, not grammar, size.

🏆 Up to £1,000 monthly prize pool

Ready for the live challenge? Join the next global round now.
*Terms apply. Skill-based competition.

⚡ Enter Arena

Related Questions

Browse Logic & Puzzles