🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: TOC Basics: all 10 questions

Quiz: TOC Basics · Question 10 of 10

In the Chomsky hierarchy, which language is context-sensitive but not context-free?

In the Chomsky hierarchy, which language is context-sensitive but not context-free?

  1. A.Strings ending in 01
  2. B.Balanced brackets
  3. C.aⁿbⁿcⁿ
  4. D.aⁿbⁿ
Answer & explanation

Correct answer: aⁿbⁿcⁿ

A single stack can match two counts but not three; aⁿbⁿcⁿ needs a linear bounded automaton.

Can you get the rest right without peeking?

Take the timed Quiz: TOC Basics quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →