Context Free Languages
Study notes are awaiting editorial approval. You can still practise the reviewed questions below.
Related previous-year questions
Practise this topic- 2026 · Consider the following grammar where $S$ is the start symbol, and $a$ and $b$ are terminal symbols. $S \to aSbS \mid bS \mid \epsilon$ Which of the
- 2026 · Which of the following grammars is/are ambiguous?
- 2026 · Let $\Sigma = \{a, b, c, d\}$ and let $L = \{a^i b^j c^k d^\ell \mid i, j, k, \ell \ge 0\}$. Which of the following constraints ensure(s) that the la
- 2026 · Consider the following context-free grammar $G$. $S \to abaABAbba$ $A \to aaBBAIn \mid bBabaa$ $B \to aBb \mid ab$ In the above grammar, $S$ is the
- 2025 · Consider the following context-free grammar $G$, where $S, A$, and $B$ are the variables (non-terminals), $a$ and $b$ are the terminal symbols, $S$ is
- 2025 · Which ONE of the following languages is accepted by a deterministic pushdown automaton?
- 2025 · Consider the two lists List I and List II given below: | List I | List II | |---|---| | (i) Context free languages | (a) Closed under union | | (ii)
- 2025 · Consider the following two languages over the alphabet \{a, b, c\}, where $m$ and $n$ are natural numbers. $L_1 = \{a^mb^mc^{m+n} \mid m, n \ge 1\}$ $
- 2024 · Consider the following grammar $G$, with $S$ as the start symbol. The grammar $G$ has three incomplete productions denoted by (1), (2), and (3). $S \t
- 2024 · Consider a context-free grammar $G$ with the following 3 rules. $S \to aS$, $S \to aSbS$, $S \to c$ Let $w \in L(G)$. Let $n_a(w), n_b(w), n_c(w)$ de
- 2024 · Let $G = (V, \Sigma, S, P)$ be a context-free grammar in Chomsky Normal Form with $\Sigma = \{a, b, c\}$ and $V$ containing 10 variable symbols includ
- 2023 · Consider the context-free grammar $G$ below $$\begin{align*} S & \to aSb \mid X \\ X & \to aX \mid Xb \mid a \mid b \end{align*}$$ where $S$ and $X$ a