Questions: Context-Sensitive Languages and Type 1 Grammars

5 questions to test your understanding

Score: 0 / 5
Question 1 Multiple Choice

Which of the following languages is context-sensitive but NOT context-free?

A{aⁿbⁿ | n ≥ 1} — equal numbers of a's followed by b's
B{aⁿbⁿcⁿ | n ≥ 1} — equal numbers of a's, b's, and c's in sequence
C{a*b*} — any number of a's followed by any number of b's
DAll regular languages, since regular ⊂ context-free ⊂ context-sensitive
Question 2 Multiple Choice

What machine model corresponds exactly to context-sensitive languages?

AA deterministic pushdown automaton (with a single stack)
BAn unrestricted nondeterministic Turing machine with unbounded tape
CA nondeterministic linear-bounded automaton (tape bounded linearly by input length)
DA nondeterministic pushdown automaton with two stacks
Question 3 True / False

Every context-free language is also a context-sensitive language.

TTrue
FFalse
Question 4 True / False

A context-sensitive grammar allows productions where the replacement string γ can be shorter than the nonterminal A being replaced, as long as the surrounding context strings are non-empty.

TTrue
FFalse
Question 5 Short Answer

What is the key syntactic constraint that makes a grammar 'context-sensitive' rather than 'unrestricted,' and why does it determine the computational power of the corresponding machine model?

Think about your answer, then reveal below.