in Theory of Computation
3,073 views
5 votes
5 votes
$L = \left \{ a^nb \ ; n\geq 0 \right \} \cup \left \{ b^na \ ; n\geq 1 \right \}$

Minimal DFA for the above language ?
in Theory of Computation
by
3.1k views

4 Comments

edited by

@saurabh rai   how did you constructed ? from NFA to DFA or directly ?

use this to draw http://madebyevan.com/fsm/

0
0
debashish wt i did i construct two different dfa and than i take union of two dfa might i have made some extra state during its construction . but your approach is much better than my approach
0
0
I understand you joined then using epsilon, and then minimized using table. rt ?
0
0

6 Answers

11 votes
11 votes

Two DFA's are shown for languages {anb | n>=0} and {bna | n>=1} respectively .

Take these 2 as M1 and M2 respectively .

DFA M using cross product of M1×M2 having start state as {x1,y1} and mark final state as any state contain x2 or y3 and then do minimization .

The table is as follows => ( Sorry, for the handwriting )

Hence, after minimizing it, there are total 6 states and 2 final states . 

Required M will be =>

edited by
by
7 votes
7 votes

 

Min no of states = 6.

4 Comments

Q3 state is extra here.you can simply add loop to q1.hence humber of states is 5.
0
0
@sabrina if we remove $Q_{3}$, then DFA will accept $b^{n}$ which it should not
1
1
@Sabrina Kaur Dhalla

then it will accept strings like bb , bbb , bbbb which are not in language
0
0
1 vote
1 vote

$L=\left \{ a^{n}b\, n\geq 0 \right \}\, \cup \left \{ b^{n}a\, ,n\geqslant 1 \right \}$

$L=\left \{ b,ba,ab,bba,aab,bbba,aaab\cdots \right \}$

Here is my DFA-:

Note -:you have to make a  Trap(Dead State) for language $ba\left ( a+b \right )^{+} \, OR \,\, ab\left ( a+b \right )^{+}$

0 votes
0 votes
first draw epsilon nfa----

convert it into nfa without epsilon(A ia initial state)

after that convert it into dfa and minimize it so now it has total 6(2 final states) states
in dfa state O represents dead state
edited by

Related questions