Which of the following statements is/are always true?
Given: Two languages $L_1$ and $L_2$ over a finite alphabet.
We must determine which statement is always true.
Analysis:
Counterexample: Let $L_1 = \{a^n b^n \mid n \ge 0\}$ (Context-Free, not Regular) and $L_2 = \{a^k \mid k \ge 0\}$ (Regular). Then $L_1 \cap L_2 = \emptyset$ (Regular). Here, $L_1$ is not regular, violating the statement.
Counterexample: Using the same $L_1$ and $L_2$ as above. $L_1 \cup L_2 = \{a^n b^n \mid n \ge 0\} \cup \{a^k \mid k \ge 0\}$. This language is context-free but not necessarily regular.
Counterexample: Let $L_1$ be a language known to be recursively enumerable but not context-free (e.g., the Halting Problem encoded). Let $L_2 = \emptyset$ (Regular). Then $L_1 \cap L_2 = \emptyset$ (Regular). Here, $L_1$ is not context-free, violating the statement.
Result: Only Option 3 is always true.
Which of the following are correct on regular expressions?
A. φ + L = L + φ = L
B. εL = Lε = L
C. φL = Lφ = φ
D. φL = Lφ = L
Choose the correct answer from the options given below:
The Kleene Star operation accepts the following string of finite length over set A = {0,1} | where string s contains even number of 0 and 1.
Given below are two statements: one is labelled as Assertion A and the other is labelled as Reason R
Assertion A: If L is regular, then its compliment L' is necessarily regular.
Reason R: Complement of a language can be obtained by swapping final and non-final states in a DFA.
In the light of the above statements, choose the most appropriate answer from the options given below