retagged by
5,603 views

5 Answers

3 votes
3 votes

Answer should be 2^n states i.e. option A.

Generalized Regular Expression for such a DFA will be: (0 + 1)*1 concatenated with a string of (n – 1) 0’s

Steps involved in drawing the DFA.

  1. Draw the corresponding NFA – It can be drawn easily. THE NFA WILL ALWAYS CONTAIN “n + 1” STATES. (Why n + 1 states always? ? : because you have to COUNT from 1 to N+1, & each state will remember a count).                     NOTE – On drawing the NFA you will notice that on the whole NFA there is ONLY A SINGLE NON DETERMINISTIC TRANSITION. That non deterministic transition will be from the start state, on input 1.
  2. Change the NFA to the minimal DFA – Subset Construction can be used in this step, to convert the NFA into a MINIMAL DFA (Subset Construction will give a minimal DFA for any value of n, you can check it by set partitioning etc.) Since it is known that there is only one Non Deterministic Transition for any value of n, we can guarantee that if the number of states in the NFA is x then number of states in the corresponding DFA HAVE TO BE 2^(x – 1).(Why ? ? : refer to CAUTION)

Summarizing:

For any value of n,

The number of states in the NFA have to be n+1.

In this question, if the NFA contains n + 1 states then the minimal DFA will have 2^((n + 1) – 1) = 2^n states.

Moreover The number of final states in the DFA will be 2^(n – 1).

Example: for n = 3,

The number of states in the NFA = 3 + 1 = 4, (say A (Initial state), B, C, D (Final State)).

The only non deterministic transition in this NFA will be delta(A, 1) = {A, B}.

The number of states in the minimal DFA = 2^((3 + 1) – 1) = 2^3 = 8.

The number of final states in the minimal DFA = 2^(3 – 1) = 4.

States in the minimal DFA: {A}(start state), {A, B}, {A, C}, {A, B, C}, {A, D}, {A, B, D}, {A, C, D}, {A, B, C, D}.

  Final States in the minimal DFA: {A, D}, {A, B, D}, {A, C, D}, {A, B, C, D}.

CAUTION: I have NO PROOFS for the argument & implication I made in Step 2 (i.e."Subset Construction will always lead to a MINIMAL DFA in this case" & "Since it is known that there is only one Non Deterministic Transition for any value of n, we can guarantee that if the number of states in the NFA is x then number of states in the corresponding DFA HAVE TO BE 2^(x – 1)").I concluded them by drawing DFAs for n = 1, 2, 3 and analyzing them, but my intuition says they must be true. wink

0 votes
0 votes

Regular expressions will be $(0+1)^*1(0+1)^{(n-1)}$


No of states will be $n+1$..

(Minimum length is $n$. So $n+1$ states without a Dead/Trap state.)

Related questions

359
views
0 answers
0 votes
ankit-saha asked Mar 24, 2022
359 views
What will be the minimal DFA for $\left \{a^{n} :n mod 3 =0 \right \}\cup \left \{a^{n} :n mod 5 =1 \right \}$
1.6k
views
2 answers
0 votes
aditi19 asked Dec 14, 2018
1,606 views
Given following NFAfind the minimal equivalent DFA
3.2k
views
1 answers
1 votes
sripo asked Nov 6, 2018
3,168 views
What is the number of states for the above DFA,please draw NFA,DFA and minimised DFA for the same.Also won't the language not accept epsilon?
432
views
0 answers
0 votes
Harshitha 123 asked Jun 12, 2018
432 views
How many states will be present in L={w/(n(a) + (2 n(b)mod 3)) lessthan 2} ? (I got 7 states is that correct)