For the regular languages and context-free languages which is not correct?
A. both are closed under union operation
B. both are closed under concatenation operation
C. both are closed under intersection operation
D. both are closed under complementation operation
E. both are closed under kleen star operation
Choose the most appropriate answer from the options given below :
Pick an option to check yourself, or open the answer below.
Show answer & explanation
Correct answer: C. C and D Only
Explanation
Both classes are closed under union, concatenation and Kleene star. Regular languages are also closed under intersection and complement, but CFLs are not — so statements C and D are not correct for both.
More Theory of Computation and Compilers questions
- Match List-I with List-II :
- For the given two machines which of the following is correct?
- Let L= {ab, aa, baa}. Which of the following strings are not in L*?
- Let A={a, b} and L=A*. Let X={anbn, n>0}. The languages L U X and X are respectively :
- Which of the following symbol table implementations is best suited if access time is to be minimum?
- The sum of minimum and maximum number of final states for a Deterministic Finite Automata (DFA) having ' P ' state is equal to :