Computer Science EngineeringVery hard
The intersection of a regular language and a context-free language is always
- A. regular
- B. context-free
- C. only context-sensitive
- D. undecidable
Correct answer: B. context-free
A PDA can be run in product with a DFA, so the result is still context-free.
Practise more Theory of Computation, Compilers & Digital Logic (ISRO CS) questionsTheory of Computation, Compilers & Digital Logic (ISRO CS): notes and key points
More Theory of Computation, Compilers & Digital Logic (ISRO CS) questions
- Compared with a parse tree, an abstract syntax tree
- How many states does the LR(0) automaton (canonical collection of item sets, including the augmented production) have for the grammar S ->…
- For the grammar S -> aSb | c, what is FIRST(S)?
- Eliminating the left recursion from E -> E + T | T yields
- When a code generator has no free register and stores a live value to memory to free one, the process is called
- By the Sethi-Ullman labelling, the minimum number of registers needed to evaluate (a + b) (c + d) without spilling is