edited by
9,908 views
34 votes
34 votes

Let $P$ be a regular language and $Q$ be a context-free language such that $Q \subseteq P$. (For example, let $P$ be the language represented by the regular expression $p^*q^*$ and $Q$ be $\{p^nq^n \mid n \in N\})$. Then which of the following is ALWAYS regular?

  1. $P \cap Q$
  2. $P-Q$
  3. $\Sigma^*-P$
  4. $\Sigma^*-Q$
edited by

2 Answers

Best answer
48 votes
48 votes

Correct Option: C

complement of regular Language is regular

edited by
14 votes
14 votes
The expression ∑* – P represents complement of P which is a regular language. Complement of Regular languages is also regular. Then a DFA that accepts the complement of L, i.e. ∑* – L, can be obtained by swapping its accepting states with its non-accepting states.
Answer:

Related questions

36 votes
36 votes
6 answers
1
go_editor asked Sep 29, 2014
10,820 views
A deterministic finite automaton ($\text{DFA}$) $D$ with alphabet $\Sigma = \{a, b\}$ is given below.Which of the following finite state machines is a valid minimal $\tex...
14 votes
14 votes
2 answers
3
go_editor asked Sep 29, 2014
4,851 views
Choose the most appropriate word(s) from the options given below to complete the following sentence.I contemplated _________ Singapore for my vacation but decided against...
25 votes
25 votes
5 answers
4
go_editor asked Sep 29, 2014
5,162 views
Consider the matrix as given below.$$\begin{bmatrix} 1 & 2 & 3 \\ 0 & 4 & 7 \\ 0 & 0 & 3\end{bmatrix}$$Which one of the following options provides the CORRECT values of...