retagged by
19,326 views
41 41 votes

Let $L \subseteq \{0,1\}^*$ be an arbitrary regular language accepted by a minimal $\text{DFA}$ with $k$ states. Which one of the following languages must necessarily be accepted by a minimal $\text{DFA}$ with $k$ states?

  1. $L-\{01\}$
  2. $L \cup \{01\}$
  3. $\{0,1\}^* – L$
  4. $L \cdot L$

5 Answers

Best answer
66 66 votes

Answer : Option C.

The question is asking about Number of states in minimal DFA.

If $L$ is regular then so is $L - \{01 \}$, so is $L \cup \{01 \}$ , so is $L.L$, so is $\{0,1 \}^* – L.$

But if minimal DFA for $L$ has $k$ states then can we guarantee that minimal DFA for $L - \{01 \}$ will have $k$ states ?? can we guarantee that minimal DFA for $L \cup \{01 \}$ will have $k$ states ?? can we guarantee that minimal DFA for $L.L$ will have $k$ states ?? can we guarantee that minimal DFA for complement of $L$ will have $k$ states ?? 

First we will check Option C. We will prove that if minimal DFA for a regular language $L$ has $n$ states then the minimal DFA for complement of $L$ will also have $n$ states.

Video Explanation of this Proof: https://youtu.be/3szxKVVUo1A 


Since $L$ is regular language, so, we have some DFA $D$ that accepts $L$.

We can describe D as following : $D(Q,Σ, δ, q_0, F)$

In this DFA $D$, If we make the accepting states be non-accepting, and make the non-accepting states be accepting, then this new automata $D’$ can be described as $D’(Q,Σ, δ, q_0, Q-F)$ (Because in $D’$, set of final states is $Q-F$) and this $D’$ has following properties :

1. $D’ $ is a DFA (Because we are not changing the transition function so for every state, on every alphabet symbol we still have exactly one transitions)

2. Since $D, D’$ have same states, same initial state, same transition function, So, on any string $w,$ both $D,D’$ will go to same state, say, $q.$ Now, we have two cases :

  • if $q$ is final state in $D$ then $q$ is non-final in $D’$, So, $w \in L(D)$ and $w \notin L(D’)$
  • if $q$ is non-final state in $D$ then $q$ is final in $D’$, So, $w \notin L(D)$ and $w \in L(D’)$

So, any string $w$, either it belongs to $L(D) $ or to $L(D’) $ But Not to both. So, $L(D)$ and $L(D’)$ are complement of each other. 

So, the conclusion is that :

If a DFA $D$ accepts language $L$, then DFA $D’$ will accept language $L’,$ where $D’$ is constructed from $D$ by changing the final states to Non-final and vice versa. 


So far we have proven that If $D$ is DFA for $L$ then $D’$ is DFA for $L’.$

Now, the second part is to prove that :

If $D$ is minimal DFA for $L$ then $D’$ is minimal DFA for $L’.$

This is easy to prove by contradiction. 

Let DFA $D$ be the minimal DFA of $L$ with $n$ states in it.

For contradiction, let us assume that DFA $D’$ is Not minimal DFA for $L’ $ then it means that $L’$ has some minimal DFA $M$ in which we have less than $n$ states.

Now, we construct $M’$ by swapping final and non-final states in $M$, So, $M’$ will accept complement of $L’$ i.e. $M' $ accepts $L.$ So, now we have a DFA ($M’$) for $L$ in which we have less than $n$ states. But this is contradiction because minimal DFA for $L$ has $n$ states. 

So, our assumption is false i.e. It is Not the case that DFA $D’$ is Not minimal DFA for $L’ .$

So, $D’$ is minimal DFA for $L’.$


So, we have proven that :

If a $D$ is a minimal DFA for a regular language $L$ then $D’$ is minimal DFA for $L’$.

Since $D$ and $D’$ have same number of states, so we can say that number of states in minimal DFA for regular language $L $ and number of states in minimal DFA for complement of $L$ is same.  


Option A is false :

For counter example, take $L = \{ 01 \} $, minimal DFA for $L$ has $4$ states. But minimal DFA for $L – \{01 \}$ has $1$ state only. 

Option B is false :

For counter example, take $L = \{  \} $, minimal DFA for $L$ has $1$ state. But minimal DFA for $L \cup \{01 \}$ has $4$ states.

Option D is false :

For counter example, take $L = \{ 0 \} $, minimal DFA for $L$ has $3$ states. But minimal DFA for $L.L$ has $4$ states. 

Detailed Video Explanation: https://youtu.be/3szxKVVUo1A 

edited by
38 38 votes
c is the correct option .

$\{0,1\}^{*}-L$ = complement of language L.

Since we have minimal dfa with k states for given language L,

we can just flip final and non final states to get the dfa which accepts complement of L without changing number of states
1 1 vote
if min. DFA with ‘k’ states accepts L(m) then the just by flipping states of same min.DFA it can accept L(m)’.

As in DFA  L(m’)=L(m)’ where L(m) language accepted by the the DFA ‘m’.

so option (C) is the answer.
1 1 vote

Easy 

minimal dfa so, Just flip the final and non final states then the complement of language also accepted by that many states 

so answer will be complement of that language which is option C

0 0 votes

This is a question about the closure properties of regular languages and their effect on the size of the minimal DFA.

The correct answer is C.

This language is the complement of $L$ (also written as $\bar{L}$).

 

Why C is Correct

 

  1. DFA for L: Let the minimal DFA for $L$ be $M = (Q, \Sigma, \delta, q_0, F)$, where $Q$ is the set of states and $|Q| = k$.

  2. DFA for Complement: To construct a DFA that accepts the complement of $L$, we simply take the DFA $M$ and swap its final and non-final states. The new set of final states becomes $Q - F$.

  3. State Count: This new DFA has the exact same set of states $Q$, so it also has $k$ states.

  4. Minimality: Swapping all final and non-final states preserves the "distinguishability" of all states. If two states were distinguishable in the original DFA, they remain distinguishable in the new one. Therefore, the new $k$-state DFA is also minimal.

 

Why the Other Options are Incorrect

 

The other operations (removing a string, adding a string, or concatenation) can all change the number of states in the minimal DFA.

  • A. $L - \{01\}$: (Removing a string)

    • Counterexample: Let $L = \{01\}$. The minimal DFA for $L$ has 4 states (a start state, two intermediate states, a final state, and a trap state). So $k=4$.

    • $L - \{01\} = \emptyset$ (the empty language).

    • The minimal DFA for $\emptyset$ has only 1 state (a start state that is non-final and transitions to itself). Here, $k \ne 1$.

  • B. $L \cup \{01\}$: (Adding a string)

    • Counterexample: Let $L = \emptyset$. The minimal DFA for $L$ has $k=1$.

    • $L \cup \{01\} = \{01\}$.

    • The minimal DFA for $\{01\}$ has $k=4$. Here, $k \ne 4$.

  • D. $L \cdot L$: (Concatenation)

    • Counterexample: Let $L = \{0\}$. The minimal DFA for $L$ has 3 states (a start state, one final state for "0", and a trap state). So $k=3$.

    • $L \cdot L = \{00\}$.

    • The minimal DFA for $\{00\}$ has 4 states (a start state, two intermediate states for "0" and "00", and a trap state). Here, $k \ne 4$.

Answer:
Position:
Show:

Related questions

74 74 votes
3 answers 3 answers
24.7k
24.7k views
Arjun asked Feb 18, 2021
24,705 views
​​​​​​Consider the following two statements about regular languages:$S_1$: Every infinite regular language contains an undecidable language as a subset.$S_2$: Every finit...
38 38 votes
9 answers 9 answers
20.0k
20.0k views
Arjun asked Feb 18, 2021
19,997 views
Consider the following deterministic finite automaton $\text{(DFA)}$The number of strings of length $8$ accepted by the above automaton is ___________
55 55 votes
4 answers 4 answers
19.3k
19.3k views
Arjun asked Feb 18, 2021
19,251 views
Suppose we want to design a synchronous circuit that processes a string of $0$’s and $1$’s. Given a string, it produces another string by replacing the first $1$ in any s...
35 35 votes
5 answers 5 answers
14.7k
14.7k views
Arjun asked Feb 18, 2021
14,701 views
The number of units of a product sold in three different years and the respective net profits are presented in the figure above. The cost/unit in Year $3$ was ₹$\;1$, whi...