aliensbrain
  • Home
  • Study
  • Quizzes
  • 🎤AI Practicefree
  • Notebooks
  • Community
  • Sign in
  • Test 1 Compiler Design | Computer Science
  • In the correct grammar above, what is the length of the d...
Multiple choice

In the correct grammar above, what is the length of the derivation (number of steps starring from S) to generate the string al bm with l $\ne$ m?

  1. max (l, m) + 2

  2. l + m + 2

  3. l + m + 3

  4. max (l, m) + 3

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

Keep practicing — related questions

  • Consider the flowing grammar C S $\rightarrow$ bS |aA| b A$\rightarrow$ bA | aB B bB |aS| a Let Na (W) and ...
  • Consider the CFG with {S, A, B} as the non-terminal alphabet, {a, b} as the terminal alphabet, S as the sta...
  • Consider the CFG with {S, A, B} as the non-terminal alphabet, {a, b} as the terminal alphabet, S as the sta...
  • Which one of the following grammars generates the language $ L=\left \\{ a^{i}b^{j}\mid i\neq j \right \\}$?
  • Which of the following statements about electromagnetic spectrum is/are not correct? (A) The velocity of X-...
  • Option B is correct. It would be correct if the code had compiled, and the subclass Alphahad been saved in ...
  • What will be the output of the program? String a = "newspaper"; a = a.substring(5,7); char b = a.charAt(1);...
  • What will be the output of the program? public class If1 { static boolean b; public static void main(String...
Play the full quiz 🎤 Practise this topic out loud
Advertisement
© Aliensbrain | all rights reserved
  • About
  • Contact
  • Terms and Condition
  • Privacy Policy