Skip to content
GATEiit

GATE CSE 2024 Session 1 Q59: Derivation length for a 90-symbol string in Chomsky Normal Form

Question

Let G=(V,Σ,S,P)G = (V, \Sigma, S, P) be a context-free grammar in Chomsky Normal Form with Σ={a,b,c}\Sigma = \{a, b, c\} and VV containing 10 variable symbols including the start symbol SS. The string w=a30b30c30w = a^{30} b^{30} c^{30} is derivable from SS. The number of steps (application of rules) in the derivation S⇒∗wS \overset{*}{\Rightarrow} w is _________

Try it: numerical answer: type the value

Numerical answer. No negative marking.
Show answer and explanation

Answer: 179 (official GATE 2024 final answer key)

Concept used: In CNF a string of length n≥1n \ge 1 needs exactly 2n−12n - 1 rule applications.

First step: Count n−1n - 1 applications of A→BCA \to BC and nn of A→aA \to a, with n=90n = 90.

Full step-by-step solution

Detailed working, common mistakes and linked mock tests will be available with a free GATEiit account. Log-in is coming soon.

Share this question

WhatsAppDownload image

Source: official GATE 2024 Session 1 CS question paper and final answer key, organised by IISc Bangalore. Question paper · Answer key