The language over the alphabet is:
View worked solution
Answer: B
To determine the class of the language over the alphabet , let us analyze its properties:
- Not Regular: The language requires matching the number of s before the marker with the number of s after the marker . Since a finite automaton has finite memory, it cannot keep track of an arbitrary count . Thus, is not a regular language (eliminating Option C).
-
Deterministic Context-Free Language (DCFL):
We can construct a Deterministic Pushdown Automaton (DPDA) to accept :
- For every read from the input, push it onto the stack.
- When the marker is encountered, transition to a new state without changing the stack. The marker uniquely determines when to stop pushing and start popping.
- For every read, pop a from the stack.
- If the input ends precisely when the stack becomes empty (except for the initial stack symbol ), accept the string.
- Recursive: Every deterministic context-free language is also a context-free language, and all context-free languages are recursive (decidable). Thus, is recursive (eliminating Option A).
Therefore, the language is recursive and is a deterministic CFL.
Free practice · Your answers on this page are not saved.
